Live data from Hacker News

Costs of running a Python webapp for 55k monthly users

keepthescore.co

31–40 of 264 posts

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

#31
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…

You can downsize, just start at a small size and don't increase storage (choose ram and cpu only when upgrading), then you can resize smaller if you want.

Getting to a place where you don't care as you can rotate in new instances at whatever spec you want is even better though.

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

#33
post #5
post #3

I wonder how much it would cost for the same app, if developed in Java or dotnet core. They could save a good chunk of the 69 USD they spend on Digital Ocean servers. edit : To clarify, What I meant was that to serve 55k users, perhaps using more efficient languages like C# or Java, would allow them to run on lesser spec machines. And as those users scale up, to say a million users a month, perhaps savings would also…

What're they going to host it on, when they're finished the full rewrite to save 69usd?

What I meant was that to serve 55k users, perhaps using more efficient languages like C# or Java, would allow them to run on lesser spec machines.

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

#34
post #7
post #3

I wonder how much it would cost for the same app, if developed in Java or dotnet core. They could save a good chunk of the 69 USD they spend on Digital Ocean servers. edit : To clarify, What I meant was that to serve 55k users, perhaps using more efficient languages like C# or Java, would allow them to run on lesser spec machines. And as those users scale up, to say a million users a month, perhaps savings would also…

Metabase is written in Java and normally take 1-2GB/ram and use a lot of CPU ;)

Specifically, Metabase is written in Clojure

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

#35
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.

It always amazes me how people are so free to judge other's situations. It's great that your web app only costs $10/month but others may have web apps that are more computationally intensive e.g. video processing or ML inference etc or simply can't join everything they need at runtime. And it's great that you're willing to deny those 50k users a day access to your service when that cheap VPS inevitably falls over. Bu…

The article does not mention video processing or ML. It describes their setup for what they describe as a generic web app.

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

#36
$30 dedicated from Hetzner can do this reliably enough for a non revenue generating blog, including blue green deploys, postgres, certs, cache, edge caches (Cloudflare I guess) and even Metabase (which admittedly can be a memory hog if you don't set it in the JVM).

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

#37
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.

I'v added this paragraph to the article:

the servers are oversized for the load we're currently seeing. The reason for that is that we tried to solve a production issue by increasing the server specs. It didn't solve the problem, and now we can't down-size the servers without re-provisioning them ️.

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

#38
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+.

Don't do blue-green deploys when you have no revenue. Downtime costs you nothing and at 3,400 visitors a day you'll be lucky to drop a single request while deploying.

Pre-compute and cache to reduce your need for beefy servers.

When you can run something on your machine or in the cloud, choose your machine.

EDIT: It's less about saving money and more about not spending it.

EDIT2: Forgot to mention: use SQLite.

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

#39
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…

Try https://redash.io/

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

#40
post #35

Earlier quoted context omitted.

It always amazes me how people are so free to judge other's situations. It's great that your web app only costs $10/month but others may have web apps that are more computationally intensive e.g. video processing or ML inference etc or simply can't join everything they need at runtime. And it's great that you're willing to deny those 50k users a day access to your service when that cheap VPS inevitably falls over. Bu…

The article does not mention video processing or ML. It describes their setup for what they describe as a generic web app.

If you want to provide uninterrupted service to your clients you’ll have to spend some $. You want to have redundancy, machines hosted in different different locations, backup prod servers, monitoring, analysis tools. Even if it is for 1k monthly users, if you want reliability - it will increase the costs.
Post reply on HN