Live data from Hacker News

Costs of running a Python webapp for 55k monthly users

keepthescore.co

11–20 of 264 posts

Re: Costs of running a Python webapp for 55k monthly users

#11
post #6

Nice writeup! Always appreciate transparency with these sorts of things, as someone who writes a lot of tiny personal projects and sometimes wonders how much I'd have to invest if they ever actually gained any traction. Congrats on having so many users, and good luck on monetization. For the server instances, I can't imagine 4 CPUs/8 gigs RAM is really needed 24/7, but can imagine it being needed in bursts, and I ass…

Thanks for the compliments!

Yes, the server instances are definitely too large. I was previously running on 2 instances that were half the size and ran into some problems which I thought I could fix by increasing specs. Turns out the problems were not related to specs and now I'm stuck with the instance size (on DigitalOcean you can only up-size not down-size)

I use Postico too, but don't have enough SQL chops to get the answers I need.

Re: Costs of running a Python webapp for 55k monthly users

#13
post #6

Nice writeup! Always appreciate transparency with these sorts of things, as someone who writes a lot of tiny personal projects and sometimes wonders how much I'd have to invest if they ever actually gained any traction. Congrats on having so many users, and good luck on monetization. For the server instances, I can't imagine 4 CPUs/8 gigs RAM is really needed 24/7, but can imagine it being needed in bursts, and I ass…

Unlike AWS GCP has fewer options and I would argue nothing would fit out of the box. App engine is a PaaS that has various limitations and constraints that can take significant amounts of dev time and customer support time to get through. Spot instances require ops work, as would something like GKE combined with horizontal autoscaling via kubernetes. Their best bet would be to identify hot paths in the code base and move them to cloud functions at the cost of latency then scaling down the servers.

Often in cloud computing it’s dev time, ops time, cost savings, choose one.

Re: Costs of running a Python webapp for 55k monthly users

#14
post #6

Nice writeup! Always appreciate transparency with these sorts of things, as someone who writes a lot of tiny personal projects and sometimes wonders how much I'd have to invest if they ever actually gained any traction. Congrats on having so many users, and good luck on monetization. For the server instances, I can't imagine 4 CPUs/8 gigs RAM is really needed 24/7, but can imagine it being needed in bursts, and I ass…

We run Metabase on a 2GB VM on DigitalOcean, costing $15/month, and using the DO's Postgres cheapest plan (still pretty expensive imo). It's a JVM app so using quite a bunch of memory, 60% atm. So total cost of Metabase is $30 per month. We could definitely just run Postgres on the same VM to get the cost down.

As for web servers, you're totally right. At feeder.co we serve 25 requests / second (on Rails) per VM (we use 4 web servers and one loadbalancer) and we're still database constrained. They are $20 per month and the 4GB 2VCPU "basic" plan.

Hardware is insanely fast nowadays, and it feels like we forget to realise it sometimes.

Re: Costs of running a Python webapp for 55k monthly users

#17
post #12

It always makes my head dizzle when I read and hear how much people manage to bloat their stack because they think they need to "scale". I have web applications running that reliably serve 50k users per day and cost me $10/month, running on a single, cheap VPS.

Not to sound mean, but if there aren't posts/blogs/whatever explicitly telling people how to minimize costs... then they'll continue to follow the ones that make them pay $100+.

Re: Costs of running a Python webapp for 55k monthly users

#18
It's tough to generalize from things like this because "a webapp for 55k monthly users" can mean drastically different things. A user could be loading a few static pages, or that same user could be opening websocket connections or making requests that require expensive database queries. Your average user could stick around a minute, or an hour. Different apps can easily have per-monthly-user infrastructure costs that are two orders of magnitude different.

For comparison at the other end of the scale:

Facebook said that in the first quarter it spent $3.7 billion on data centers, servers, office buildings and network infrastructure.

https://www.datacenterdynamics.com/en/news/facebook-signific...

That's something like $8 per user per year. If you had that level of expenditure for your 55k-user app, it would cost $400,000 per year, 200x the cost given by this blog post. It isn't that Facebook is wasting the vast majority of their infrastructure, though, it's that the application does a lot more for each user.

Re: Costs of running a Python webapp for 55k monthly users

#19
post #17
post #12

It always makes my head dizzle when I read and hear how much people manage to bloat their stack because they think they need to "scale". I have web applications running that reliably serve 50k users per day and cost me $10/month, running on a single, cheap VPS.

Not to sound mean, but if there aren't posts/blogs/whatever explicitly telling people how to minimize costs... then they'll continue to follow the ones that make them pay $100+.

Or people could do some quick research what options there are. Not everything needs to be spoon fed.

Re: Costs of running a Python webapp for 55k monthly users

#20
post #11
post #6

Nice writeup! Always appreciate transparency with these sorts of things, as someone who writes a lot of tiny personal projects and sometimes wonders how much I'd have to invest if they ever actually gained any traction. Congrats on having so many users, and good luck on monetization. For the server instances, I can't imagine 4 CPUs/8 gigs RAM is really needed 24/7, but can imagine it being needed in bursts, and I ass…

Thanks for the compliments! Yes, the server instances are definitely too large. I was previously running on 2 instances that were half the size and ran into some problems which I thought I could fix by increasing specs. Turns out the problems were not related to specs and now I'm stuck with the instance size (on DigitalOcean you can only up-size not down-size) I use Postico too, but don't have enough SQL chops to get…

Hey, good job on your project!

The only thing I wanted to say is that the time spent learning a bit of SQL pays off massively. Perhaps something for your todo list :)

Post reply on HN