Live data from Hacker News

Costs of running a Python webapp for 55k monthly users

keepthescore.co

131–140 of 264 posts

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

#131
post #18

It's tough to generalize from things like this because "a webapp for 55k monthly users" can mean drastically different things. A user could be loading a few static pages, or that same user could be opening websocket connections or making requests that require expensive database queries. Your average user could stick around a minute, or an hour. Different apps can easily have per-monthly-user infrastructure costs that…

> It isn't that Facebook is wasting the vast majority of their infrastructure, though, it's that the application does a lot more for each user. I don't think we can be sure Facebook isn't wasting money on their infrastructure. They've shown themselves to be pretty wasteful in the past.[0][1] They're just rich enough to get away with it. Facebook's application may be doing a lot more to their users than a simpler app,…

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.

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

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

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.

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

#134
post #131

Earlier quoted context omitted.

> It isn't that Facebook is wasting the vast majority of their infrastructure, though, it's that the application does a lot more for each user. I don't think we can be sure Facebook isn't wasting money on their infrastructure. They've shown themselves to be pretty wasteful in the past.[0][1] They're just rich enough to get away with it. Facebook's application may be doing a lot more to their users than a simpler app,…

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.

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

#135

Earlier quoted context omitted.

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.

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#

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

#136
post #104

Earlier quoted context omitted.

I charge £1/zone/month for DNS-hosting, and while most of my clients only have a single zone there are people with 50+ DNS hosting can be cheap (free if you use cloudflare, etc), or very expensive. My prices give me a 50% margin over the raw AWS Route53 costs, but the appeal is that I store records under revision control and let you make changes using git: https://dns-api.com/

interesting .. is the price flat even If there are lookups in billions ?

Yes.

AWS charges you a flat-fee per zone, and then additional-fees based on volume of queries. In my case I don't host any domains that go over the threshold where it is billed for - but if I did those costs would be offset by the profit of the other low-volume zones.

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

#137
post #83

Earlier quoted context omitted.

> 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. Again, maybe in your experience but that's not universal. There's literally no redundancy wit…

What does excellent uptime mean in your book? Something like less then an hour of downtime per year. Over the last years, across multiple datacenters, I have seen maybe one or two short downtimes per year. None ever lasting more then 5 minutes.

https://aws.amazon.com/message/41926/ this lasted hours and affected almost everyone using us-east-1, large portion of internet was unavailable because they had no multi-region setups.

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

#138
Majority of HN seems very heated about $171/month. My company pays 100x that just for our RDS instance (granted we store a lot of data). If you told me 5 of our users ended up costing us 10k/month in operational costs, I wouldn’t even blink.

55k users is very valuable. If you make a single cent per user per month, you’re in the black operationally (not counting dev time). If you make that into a dollar, you get to quit your job and be upper-middle class indefinitely.

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

#139
post #82
post #24

Earlier quoted context omitted.

Ok, here is a quick tutorial: Step 1: Copy Peter Levels stack: https://www.nocsdegree.com/pieter-levels-learn-coding/ If he serves hundreds of thousands of monthly users and makes a million a month with a single VPS, you certainly won't have scaling issues when you start out or just have tens of thousands of users. Step 2: If you really scale beyond that, resist the urge to bloat your stack. Think long and hard about…

While this article has steps in the right direction, it's a lot of "use this thing". I operate a simple Flask/PostgreSQL webapp for CS Education through the luxury of my university. If/When I graduate from my program, what are the aspects I can do to minimize my costs for hosting the app? Of course I'll look for best approaches but why does that need to be forbidden knowledge known to a select few? Its an aside, but…

I run a cheap website and here is what I do

- cloudflare free tier for caching, DNS, page rules, etc

- run everything on one VPS(digital ocean, linode, etc) pick cheapest that has specs you need

- any non-trivial storage (media, big files) move to Backblaze B2 it's cheap (you can use free tier cloudflare workers to redirect to B2 for free bandwidth due to Bandwitdth Alliance)

- free static page from Netifly (I can redirect to this with cloudflare in case my VPS falls over or something to provide info/links)

- If I want to look at logs or something I rsync it my local machine (if I cared I could set up a process to push logs/backup etc to private B2 bucket)

You may not need exact same setup, I am optimizing for caching and cheap storage because my site stores/serves lots of media files.

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

#140
post #18

It's tough to generalize from things like this because "a webapp for 55k monthly users" can mean drastically different things. A user could be loading a few static pages, or that same user could be opening websocket connections or making requests that require expensive database queries. Your average user could stick around a minute, or an hour. Different apps can easily have per-monthly-user infrastructure costs that…

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.
Post reply on HN