Earlier quoted context omitted.
If you support 4 million monthly visitors on a media site, and have multiple EC2 instances running, I'd love to see a cost breakdown structure, because in my (obviously incomplete and possibly naive) calculations, the bandwidth alone would cost more than $200/mo.
CloudFlare covers the media bandwidth costs for a mere $20 / month. The uploading and media conversion is the difficult and costly (in terms of CPU) portion.
Costs of running a Python webapp for 55k monthly users
91–100 of 264 posts
Re: Costs of running a Python webapp for 55k monthly users
#92I'm not familiar with Python as a web stack but to me it looks that the DO instances are a bit over-scaled for 55k monthly users. But what caught my eye was DNS Hosting: 5$/Month? Maybe it's a typo, shouldn't be more like 10$ per year to host a domain and its DNS? Anyway, thanks for sharing, very interesting.
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:
Re: Costs of running a Python webapp for 55k monthly users
#93$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).
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.
Re: Costs of running a Python webapp for 55k monthly users
#94It 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.
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…
Re: Costs of running a Python webapp for 55k monthly users
#95Earlier 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.
SQLite Really is a bit of a hidden gem.
Re: Costs of running a Python webapp for 55k monthly users
#96It'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…
-> Facebook is making far more than 10$ per user? Jesus Christ.
Re: Costs of running a Python webapp for 55k monthly users
#97It 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.
Re: Costs of running a Python webapp for 55k monthly users
#98Earlier 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.
Agreed. I'll probably be downvoted, but these setups strike me as people who prefer to drink the cool aid than be pragmatic and only use what they need. I've also had very high reliability rates with a single VPS. They've actually given me less downtime than AWS services at times.
I can't hit four nines reliably with single VPS platforms on my typical workloads, I need load balancers and redundant app servers. I could quite likely hit three nines using single VPSes. But if a client wants 99.9% SLAs, they'll be paying for HA and I'll deploy redundant ec2 instances, multi region RDS, and an ELB. And charge them 3 or 4 times what the OP is spending for it. (And I'll almost always deliver 99.99% availability.)
For my stuff or friends or people I'm doing cost saving favours for, I'll explain how much extra it costs to guarantee less then an hour of downtime a month, the realistic expectations and historical experience of how much downtime an non-HA platform might have in their use case, and often choose along with them a single VPS (or even dirt cheap cpanel hosting) while understanding and accepting the risks associated with saving upwards of a couple of hundred bucks per month.
Re: Costs of running a Python webapp for 55k monthly users
#99It 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 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…
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 unnecessary for an app of this size.) The price he's paying is presently listed at $95.
Re: Costs of running a Python webapp for 55k monthly users
#100It'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…
8$, just for infrastructure? So their costs per user is even higher? -> Facebook is making far more than 10$ per user? Jesus Christ.
Source: https://www.statista.com/statistics/234056/facebooks-average...