Live data from Hacker News

Costs of running a Python webapp for 55k monthly users

keepthescore.co

161–170 of 264 posts

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

#161
post #65

Earlier quoted context omitted.

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…

Both you and TekMoi should probably value your own time higher. The cost savings are great, but once you spend 4 hours on configuring a database server, that'll probably be $200+ worth of your time and, thus, wipe out most of the savings.

Except that now you know how to configure a database server, and know how your database server is configured. So if you ever get a problem with the database in the future, you'll know how to solve it faster. Which will save you time and money in the future.

And you're less likely to make mistakes like upgrading your server instance to try and solve a problem that can't be solved like that.

And the more you do it, the cheaper and faster it gets. That knowledge and skill has value.

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

#162

Earlier quoted context omitted.

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.

Why use SQLite? My postgres process doesn't come close to using up enough resources to push me out of even the cheap VPS tiers and I don't have to worry about locking if there's a heavy write load.

Backing up an SQLite database is as simple as copying a single file. As long as nothing is writing in the file, you're good.

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

#163

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…

You're assuming that the goal is to make something valuable.

There are forums with more traffic than this, which don't make money. They're hobby projects.

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

#164
I get 55k unique users to my personal site, per DAY. I’ve got a number of very popular tools I host for Minecraft and Dev work.

It’s written in PHP/Go/MySQL

I am on a $10 a month Digital Ocean Droplet hosting like 7 other sites as well, and it’s probably overkill.

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

#165
post #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).

I put some VMs in Hetzner for a project I was working on, and found out you get what you pay for. They mistakenly deleted all of my virtual machines and all of my backups. If you host anything with them, or anyone I guess for that matter, make sure you have your backups hosted somewhere else.

Did they ever give you an explanation? I've used Hetzner for 6-7-ish years, and _never_ had any problems with them. I have mostly used their dedicated servers service, though.

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

#166

Earlier quoted context omitted.

It says in the article that the author gets 34k daily users, and 50k unique users/month. It would have been clearer if the author had talked about sessions (which are therefore > 1M/mo) for sure, but you're still making a very big (and invalid) assumption. EDIT: Please disregard the above. I need an eye test, or maybe just to put my glasses on! Daily users are 3.4k (3400), not 34k. My apologies, I take it all back!

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.

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

#167
post #94

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…

I have a web app that's struggling if there are more than 2 concurrent users per CPU core. It's displaying incompressible large resolution images with EDIT: not sure why I'm downvoted, I'm just presenting my use case. They are multigigabyte images encoded with custom wavelet compression that are cut into tiles (think google earth), each user needs 5-10 tiles every second

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

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

#168

Earlier quoted context omitted.

Why use SQLite? My postgres process doesn't come close to using up enough resources to push me out of even the cheap VPS tiers and I don't have to worry about locking if there's a heavy write load.

Backing up an SQLite database is as simple as copying a single file. As long as nothing is writing in the file, you're good.

That's not a reason.

Plus setting up a nightly back up of any SQL database, regardless of creed, is like a 10 line cron job.

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

#169

Earlier quoted context omitted.

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.

Why use SQLite? My postgres process doesn't come close to using up enough resources to push me out of even the cheap VPS tiers and I don't have to worry about locking if there's a heavy write load.

Yeah, fair point. From a cost standpoint it's more about using the same server for your application and your database.

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

#170

Earlier quoted context omitted.

Yes, but a python app can be efficient enough to serve that many users on the smallest size droplet. Any additional speed gains would only be useful for scaling and MAYBE latency.

So you agree that throughput would be different. Sure, a Python app can be efficient to serve 55k users. But scaling it to a million users, say. A python app would consume way more resources than an app in C#

Use whichever language you're most comfortable with. You can always add more hardware to the problem; and if you get really big then hire people to start re-writing parts of it.
Post reply on HN