How much does running a webapp in production actually cost? An interesting and related question is: what services does an app like this use? In this post, I will dive into both questions for the product I'm building. I'll also provide some explanation for each service.
First, a quick bit of background information. My product, Keepthescore.com, is built using Python Flask for the backend and Vue for the frontend. In a typical month, it has 250k visitors and 1.3 million pageviews. If you want to discover more about my journey and lessons learned, read this.
Let's look at the operating costs per month. I will include non-tech related costs (such as an SEO tool subscription), but not the costs of freelancers, which I consider to be investments.
This is the stuff without which the app would stop working immediately.
The app runs on two DigitalOcean servers (8 vCPUs, 16GB RAM, 320GB disk). I use a blue-green deployment, which is a great way of running and hosting a webapp but it does mean that you need 2 identical production servers.
The database is a hosted Postgres instance also on DigitalOcean.
By the way: it has been pointed out several times that my setup is oversized. This is true. What is also true is that I don't care enough to optimize it.
I use Google Firebase for the realtime sport scoreboards. Firebase is a great product which takes a lot of work out of my hands.
Overall it must be said that the Google Cloud APIs are great value for money.
I registered my domain with DNSimple.com.
CloudFlare is a security behemoth that sits in front of a large number of internet-facing applications. In my case, I am using it for
The servers run Ubuntu as the operating system, which is free!
Ubuntu is totally great, by the way. I used to use it as my desktop operating system, but am now on Mac.
I use the SendGrid API to send transactional mails. Currently those are:
My app currently sends 4000 mails per month.
I host images uploaded by users on AWS in an S3 bucket.
This is an API I use to create screenshots of scoreboards and leaderboards. These generated images are used to:
It may seem like an immense expense for such a non-critical feature, but I tried building a solution for this myself and then gave up.
This is a commenting system that adds comments to my blog (including this post) and also to leaderboards. In the past I used Disqus for this, but that product turned into a privacy nightmare.
These are tools that allow me to find errors in production quickly.
Sentry is an error tracking service that helps developers monitor and fix crashes in real time.
Papertrail provides cloud-hosted log management, enabling developers to aggregate, manage, and analyze logs from all parts of their application in one place.
I think that the feature-set of Papertrail has not changed in 10 years. But it doesn't need to, it's a fantastic product.
I don't really use Office much, but like everyone else, sometimes I come across Microsoft files that I need to open.
I only use this to have Gmail for the keepthescore.com domain.
My product can be integrated in Sharepoint, hence this subscription.
Stock images are waaay too expensive. I suspect that this industry will get totally flattened by generative AI.
I use Buffer to schedule social media posts. It's definitely not a critical tool, but it saves time and Buffer seems like a very nice company.
Midjourney is a generative AI tool for creating images. I use it create images for my blog posts.
I work on a Mac but I sometimes need to run Windows software. ShadowPC allows you to run a Windows PC in the cloud and connect to it whenever required. It's not as quick as running it locally (e.g. using Parallels) but it's good enough for my needs.
This is the tool I use for sending my monthly newsletters. It's a low-cost version of MailChimp. It's not perfect and has (in my opinion) messed up the upgrade path to their new version. I will probably switch to something else in the future.
I use PyCharm as my IDE for coding. I love it.
ChatGPT helps me write blog posts, generate images for use in blog posts (including the one at the top) and for writing code.
Like most people who have tried it, I can no longer imagine working without it.
This is a tool which directly integrates into PyCharm and helps me write code. It's really slow, so I usually use ChatGPT instead.
Ahrefs is a SEO tool. I use it for research and gathering data on my own product and my competitors. It's fairly expensive but worth every cent: SEO (and content marketing) is my main way of acquiring new users, and I spend a lot of time on it.
Fathom Analytics is a privacy-friendly version of Google Analytics. It has very few features, but is good for what it does.
Metabase is an open source tool for creating dashboards and querying data in a database. It is absolutely awesome. I use it to track long-term data in aggregate like revenue and user stats.
I used to run the free version on an AWS instance, but the cost was almost the same as the hosted version, and I had the hassle of doing manual upgrades to the software. So I switched to the hosted version.
Amplitude is an industrial-grade product analytics solution. Whenever a user clicks something in my product, it gets sent to Amplitude. I use it for basic A/B tests and to understand user behavior. In the end, I use about 5% of what Amplitude can do.
I am currently on a "Startup Scholarship" plan, which means I can use the product for free. However, this expires in March 2024 and the cost after that is ... spicy. I'm not sure how I will proceed once I have to pay for it.
This is a tool that provides subscription analytics -- if you are not running a SaaS you have no idea how deep this particular rabit hole is.
ProfitWell also takes care of chasing up customers whose credit card payments have failed using automated email sequences.
It comes bundled for free with my payment provider, Paddle.com, which is nice.
Adding all of this together results in approximately $1,300 per month.
Considering my gross monthly revenue of $11 000, this results in a gross margin of just under 90%. This is an average margin for these types of businesses, so I am content. I could invest a lot of time in optimising some of these costs and finding cheaper solutions, but I want to spend my time on product development and acquiring new customers.
That's all for now! Thanks for reading and feel free to ask questions below.
This is a great look into the backend costs, thankyou for sharing.
Interesting. What do you use to keep track of your costs?
Very useful, thank you. WPS Office might be worth checking out; its a free Microsoft 365 alternative. Can open Microsoft docs aswell
Cool, thank you!
Thank you for this detailed article. Very helpful
Aren't you overpaying for Ahrefs, or should I ask is that worth it considering what it is meant for and the Google tools which is available for free
so so good to know, cheers for sharing
Wonderful post.
Thank you for sharing. It was wise not to share the freelancer/team cost in this post . But probably in another post, you can share how to hire the right people and what it will cost you and what is the cost if they leave you.
Great post! Very helpful.
Just in case, may you want to also suggest not virtual CPU, but usual ones. Gonna be cheeper to reduce some of the costs.
Thanks for sharing Very informative post.
Very impressive, thanks for sharing. This was the first time I’ve heard of green-blue deployment — very clever. I have three diff sites running on one server now and always have to restart the service or container. Not dealing with a ton of traffic but still some meaningful downtime.
Great post, I did not expect to see so many tools. I think you should include development, maintenance and support in your costs, not just the amount you invest in the tools you use. But other than that, congrats, you are doing great. I hope you can keep growing your SaaS Business.
Great info. Thank you!
I also use Sentry.io and Papertrail for a SAAS product I am working on. Excellent tools.
Why do you use S3 instead of Digital Ocean's file storage?
How long have you been running it and where do you get most of your customers?
The tooling is better for S3
send upto 60000 emails monthly with Google Workspace. 😅 (loop hole)
To save $20?
Cool post, thanks for sharing. It's rare to see people share the actual costs behind what they do. I completely agree with the build first, optimize later approach. I've always found users to be the best catalysts for optimization. Overall, this is great info for anyone building a web app.
Thanks!
Thanks for yet another useful post, Caspar!
Looking back, do you think your content marketing/SEO efforts were significantly helped by your embeddable widgets boosting your domain authority and backlinks?
Yes, I think they were. A lot!
Very nice!
I am going to have to look into ahrefs, seems useful.
FWIW, I don't think the Digital Ocean costs are crazy high. Could they be lower? sure - but IMO, being oversized with a site that has the possibility of spiky traffic is way more important than squeezing every penny of costs.
I'm curious about all the non-technical bits -- how often do you find yourself evaluating new tools? Do you churn through diff products a lot? For example, finding different/ better stock photo options or new options for Buffer, etc?
I don't evaluate a lot of tools. Even though the list is long, in the end it's probably one new tool every 2-3 months. I try and be pragmatic. If its good enough, I use it.
I appreciate the breakdown! Very cool! This was really helpful as I lead a tech team in saas so nice to see this! Super helpful too as I’m currently building a tool to merge some of the products you mentioned in a sim to reduce costs!
Anyways thanks I enjoyed the read
Cool, glad it was helpful.
HIRE A REPUTABLE HACKER BLISS PARADOX RECOVERY
Over 3 years of research about a reputable recovery company to reclaim defrauded bitcoin, I came across Bliss Paradox recovery which remained the best and renown recovery firm that victims which have been defrauded can trust and work with.
Thanks to them. I was left no other choice but to admit that funds recovery is real. Contact details you can reach out to. Mail: Blissparadoxrecovery @ aol, WA 1 3 8 0 2 0 6 9 7 1 2, Telegram: Blissparadoxrecovery.
Regards!