Live data from Hacker News

Costs of running a Python webapp for 55k monthly users

keepthescore.co

41–50 of 264 posts

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

#41
post #8

Nice, we need more of these "real world expenses" posts on HN. I wonder how much it would cost to run the same app powered with Java. More? or Less?

As with every language it depends on the framework.

Based on the Techempower benchmarks: https://www.techempower.com/benchmarks/

You can find Java frameworks that are significantly than any of the Python ones. Or you can find ones that are significantly slower.

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

#42
post #11

Earlier quoted context omitted.

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 :)

Thanks. It's on my todo list ;-)

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

#43
post #21

Cost of servers and DB don't match DO's current pricing. 4 vCPUs, 8GB RAM, 80GB disk costs $40/month now so two servers alone cost $80 which is higher than $69. Either DO raised pricing or they got some special discount.

Also, pricing of Digital Ocean seem to be quite steep for larger machines. E.g., Hetzner offers AMD Ryzen 3600 dedicated servers with 64GB RAM and 2x 512GB SSD for 42.16 per month including VAT.

Or if you really insist on a VPS, you can get the same configuration with double the disk space at Hetzner for 15.38 per month at Hetzner.

I have a Hetzner VPS and it has been rock-solid.

(I know that they are in Europe, but I assume that there are similarly-priced competitive US counterparts.)

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

#44
post #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 ️.

But as they are redundant this should be a no-brainer?

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

#45
post #9

Cost of running it myself on my $30/mo colocation server: $30 oh yeah, and 10$ a year domain fee

Contabo VPS: 4 Cores, 8GB RAM for 5€/mo. That should be able to handle the whole thing with plenty of room to scale. Maybe I am old fashioned, but I don't see what all those cloud providers that are so much more expensive bring to the table.

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

#46
post #15

5 bucks a month for dns hosting is also quite expensive since most domain hosting offer them for free. Definitely look into autoscaling with AWS for a simple 'poor man's cluster'

That caught my eye too. Not only that, the service being used here charges more for wildcard LetsEncrypt certs somehow.

I'm very confused what the value add is for this service.

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

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

I don't disagree that another language/runtime could reduce the cost. But why do you value developer time at 0 USD? Unless this is a hobby, the hourly rate of a developer is higher than that monthly Digital Ocean bill.

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

#50
post #35

Earlier quoted context omitted.

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.

I beg to differ.

In my experience, the complicated setups that are justified by the argument of "reliability" have more downtime then a single VPS. The reason is probably that there are more moving parts and more has to be maintained / can go wrong.

These days, a single VPS in the right datacenter has excellent uptime.

Post reply on HN