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…
If we were on a site called "CV News" that teaches people how to get jobs in dull cooperations, I might agree with you. On the other hand, I would not frequent such a site. So we would never have had this discussion.
Costs of running a Python webapp for 55k monthly users
181–190 of 264 posts
Re: Costs of running a Python webapp for 55k monthly users
#182Earlier 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…
Re: Costs of running a Python webapp for 55k monthly users
#183Earlier quoted context omitted.
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…
It is really great in situations where non-SQL people ask if you can run a query or report for them.
It is amazing how quickly you can build up instrumentation with it.
Re: Costs of running a Python webapp for 55k monthly users
#184I'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.
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/
Re: Costs of running a Python webapp for 55k monthly users
#185Earlier 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.
Re: Costs of running a Python webapp for 55k monthly users
#186They mention using a blue-green deployment strategy and a managed database service. That implies their web servers are stateless, or at least stateless enough to switch between the servers seamlessly.
But then they go on to say they don't want to downgrade because it means provisioning new servers.
Even in the worst case scenario of not using configuration management tools, aren't we talking a few hours of work here to save yourself let's say $40 a month which is 25% of their monthly bill? That would be the cost savings of downgrading to a lesser server x 2.
With configuration management tools, spinning up a new server would typically be running 1 or 2 commands and waiting 5 to 10 minutes. That's about how long it takes me to spin up a new server on DO to run a Flask application using Ansible and most of that time is because Ansible isn't exactly well known for its speed to execute tasks.
Re: Costs of running a Python webapp for 55k monthly users
#187Earlier quoted context omitted.
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.
They sent me a boilerplate e-mail that there was a problem with my account and to contact them to resolve it. I called them within 10 minutes, and they told me 'your account doesn't exist'
They restored my 'account' which means i had a user with the same login and password, but all of the assets to the account were tossed to the wind.
I can only guess that someone jumped the gun, (assuming they had an internal process at all).
Re: Costs of running a Python webapp for 55k monthly users
#188Earlier quoted context omitted.
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.
I think the point here is, SQLite setup would provide satisfactory results at this scale.
If the choice is betweeen a PAAS database offering and SQLite, you can pick SQLite. If you have skills / are prepared for managing dbserver yourself, then do that.
Re: Costs of running a Python webapp for 55k monthly users
#189Earlier quoted context omitted.
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.
Thanks for that warning. Was planning to migrate there. Do you still host there and if so, where do you backup to?
I'm mostly just using digital ocean these days. Their API is fantastic.
These days I do a better job of keeping code in github even if I'm the only user, and backups can go anywhere as long as you're not relying on the same provider.
Re: Costs of running a Python webapp for 55k monthly users
#190I 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 heard it boys, unplug those DNS servers, delete 4chan, teardown XKCD, they are worthless!