Live data from Hacker News

Costs of running a Python webapp for 55k monthly users

keepthescore.co

121–130 of 264 posts

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

#122
post #99
post #53

Earlier quoted context omitted.

I get what you're saying, but I think you're being a bit harsh. In my mind, choosing a dual redundant prod platform so you can do blue/green deployments is _totally_ unnecessary for a 55k MAU site generating no revenue. Same with cloud hosted metabase. You could run that on your own hardware - a spare laptop or probably even a raspberry pi for effectively nothing. On the other hand, a hobby project/side gig where you…

Given that he's complaining about the price I don't think the wasteful costs here are justified. I'll also note the article was just edited and the costs are now up to $171 / month. This app could easily be run on the AWS free tier, although even in the paid tier he could probably be managing a lot more than this workload for under $40 / month. (That's for two servers - which as has been pointed-out is wholly unneces…

Is he complaining much about the cost?

Maybe I read his conclusion differently, but he said "would be peanuts" about the cost and "The bigger issue is that on the revenue side there’s a big fat zero."

Seems to me he's acknowledging he's built a thing that requires generating revenue to support itself, but that he's neglected the revenue generation part of his project, rather than complaining too much about the price of running it?

I'm mostly agreeing with you (and tristanperry and TekMol), but I'm probably being more sympathetic and ascribing un-supported motivations for why he's happy enough building it this way and spending this much money to run it. (Probably because I've been there before myself, and sometimes that expensive hobby project has paid off, sometimes it hasn't. I've never spend so much I've seriously regretted any of my failures though...)

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

#123
post #42

Earlier quoted context omitted.

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

As a data point, we're using Redash (https://github.com/getredash/redash/), an alternative to Metabase, in a VM on Digital Ocean. It's a US$15 VM (2 cpu, 2GB ram) and seems to be fine. That's using a PostgreSQL instance running on the same VM, and nothing seems to be unhappy.

The graphs it generates are used both publicly (auto-updating):

https://sqlitebrowser.org/stats/

... and we have a bunch more private graphs and dashboards for metrics.

Everything is close to instant in responsiveness, apart from the "public" stats above. Those take some time to display purely on the browser side, as they feed way too much data to a browser for easy rendering. (will be fixed at some future point). ;)

Probably the only down side to Redash is a need to understand SQL. That can start out pretty simply though. :)

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

#125

Earlier quoted context omitted.

It's 50k MONTHLY users. It's just 3000 a day

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

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

#126
post #69

Earlier quoted context omitted.

To be fair, the post show that about 2/3rds of that spend is from the decision to run twice the needed capacity to be able to do green blue deployments, and to cloud host their metabase analytics. And it explains there's currently zero revenue. So it seems fair to judge the situation there based off those pieces of information we've been given. As I posted elsewhere, the OP's choice to run dual redundant green/blue c…

That's not how green/blue deployments work. You don't keep both colors up unless you have completely failed to understand the concept. Green/Blue is all about saving resources and costs, not keeping them around. You misread the cause here. It has nothing to do with deployment strategies.

That's not how I read what the OP's doing in the article. Sure, maybe he's not doing "proper blue/green", but that is what he uses to explain running a duplicated pair of web/app servers full time...

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

#127
post #17

Earlier quoted context omitted.

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.

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.

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

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

If $171 month is discouraging, let me reassure them.

There’s statistically a 95-99%+ chance you’ll never get to 55k monthly users with your app so don’t worry!

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

#129

Earlier quoted context omitted.

The language has nothing to do with it, this site could be ran on a $5/mo droplet (or a pair of them for their deployment strategy).

Wouldn't the same app, written in Python & C#, have different throughput on the same hardware?

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.

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

#130
post #95

Earlier quoted context omitted.

Not really hidden when it is one of the most widely deployed pieces of software on the planet.

Sure, but as an underlying dependency for iOS/Android, it's pretty well hidden from casual users...

That's true for even a casual website user. They have no idea or care about the underlying database.

Every app developer is aware about SQLite.

Post reply on HN