Live data from Hacker News

Costs of running a Python webapp for 55k monthly users

keepthescore.co

201–210 of 264 posts

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

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

For a relatively small scale project (5K users) I am running metabase using my production postgres* on a free heroku dyno (Metabase even have a 1-click deploy for this). Takes about 30 seconds to wake up, but the price is unbeatable. I don't get any of the scheduled features ofc. Would recommend for keeping costs low.

*using a heroku standard-0 db, so $50/mo with relatively good performance

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

#203
post #131

Earlier quoted context omitted.

But if they can choose between saving 10% on infrastructure or adding 5% ad revenue (through more optimizations), the additional revenue is worth more. Just running Facebook, Instagram & Co as a platform would probably be much cheaper than $8 per user.

Absolutely. Profligacy is often the rational course in a capitalist system.

In any system, there will be a tension between shrinking cost/benefit, and spending more to achieve better benefit-cost. This has nothing to do with capitalism. It's a fundamental aspect of systems where there is a non-fixed relationship between investment and return (i.e. almost all systems of any kind).

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

#204

Earlier quoted context omitted.

It's 3.4k (3400) daily users. Not 34k (34000). Dont worry, I nearly missed the dot at first, as well :)

I'm such a klutz - sorry. This is what I get for reading HN when I'm still in bed and without putting my glasses on first. This is a terrible habit that I need to break.

Username now in question

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

#205
post #65

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…

TekMoi is right. I have an Alexa top 6k site which is vastly more complicated (media hosting, load balancing, multiple VMs, DDOS protection, transactional emails, automated backups) which costs $200 / month on AWS. The fact that this person is spending nearly as much to support 50k users a day as I do to support more than 4 million cannot be hand-waived away by "people are so free to judge other's[sic] situations". T…

Wow! Congrats, and what is your site? Would love to read more about it.

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

#206

Earlier quoted context omitted.

The Facebook comparison is nowhere close though. Firstly, even purely from a services perspective, the per user compute needs per person are quite insane if you take a step back and think about what all has to happen in the background. Then you have to think about how much each user uses facebook and instagram, not to mention other services like video calls and live. Further, Facebook also ostensibly spends a bunch o…

All of this just seems to be agreeing with the parent comment's point that different websites do different amounts of work per user.

It does not just agree; it suggests explanations.

I suspect that one particular aspect of Facebook's operations - the nation-state level of spying on its users and the people they mention - accounts for a significant part of the difference.

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

#207
post #172
post #167

Earlier quoted context omitted.

My guess would be that your webapp is serving images in a blocking fashion, meaning every time a use requests an image it will fetch the image for the user AND block the http serving thread until the image is uploaded. Can you provide more context (eg: tech stack)?

What's blocking is number of http connections between browser and server. Most browsers only allow 6, each tile takes about 100ms so getting 10 in under second doesn't always happen.

But this itself wouldn't cause the "struggling" you mention with more than 2 concurrent users per core

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

#208

I don’t understand some of the comments quibbling over how this person has a “bloated” stack because it costs more than whatever irrationally frugal setup they’ve created for an app that does X specific thing. Here’s a bigger point: If you’ve got 55,000 monthly active users, and $171 per month doesn’t feel like a rounding error to you, then what you made isn’t actually valuable. Spending any amount of hours to reduce…

This is the opening line of the article:

How much does running a webapp in production actually cost? Maybe more than you think.

So they seem to be trying to "educate" people, when they are wrong and basically giving away a lot of money to Amazon and DO.

And that's why everyone's chiming in with "lots of unnecessary YAGNI crap you got running there!".

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

#209
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?

We use Google cloud run for this. They bill per request and you can run whatever docker container you want. I currently have a small setup with two separate kotlin based server applications running there (one based on spring boot and one on ktor). We use firestore as a cheap datbase (billed per read & write). Both have a free tier. So it's costing us next to nothing currently because neither docker container is getti…

how does the kotlin server perform on cloud run? is the startup time slow? does spring take a lot of memeory etc?

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

#210

The author says he wants to switch Disqus to Commento but I wouldn't just do that. I didn't have a great experience with Commento. I like the idea and mostly the execution of it (including the OAuth) but I found some major bugs (Firefox just didn't work at the time) and I didn't get any response to reporting those. I asked a few more questions by mail and also no response. After that I'm gone pretty quick. Not that I…

Ditto.

I was excited for Commento and signed up for a paid plan. I even contributed code.[0] The author sent me an onboarding email which included the line, "please reply to this email (I'm a real person)." I replied with some questions about the service and billing, but he never responded. Four months later, nobody has responded to my merge request, either.

I canceled my service at the end of the month.

[0] https://gitlab.com/commento/docs/-/merge_requests/41

Post reply on HN