Live data from Hacker News

Costs of running a Python webapp for 55k monthly users

keepthescore.co

141–150 of 264 posts

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

#141
post #50

Earlier quoted context omitted.

If you want to provide uninterrupted service to your clients you’ll have to spend some $. You want to have redundancy, machines hosted in different different locations, backup prod servers, monitoring, analysis tools. Even if it is for 1k monthly users, if you want reliability - it will increase the costs.

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.

A single VPS set-up might be OK for serving content over web, but in my experience, the pain begins when your software starts doing async processing - long-running cron jobs, queue processing. If you're doing it on your web server machine, there will be downtime.

I know this, because I have gone through these issues with each of my projects. Just recently an infinite loop bug in a cron job ground my "single VPS" setup to a halt (and took the web server with it).

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

#142
post #45
post #9

Cost of running it myself on my $30/mo colocation server: $30 oh yeah, and 10$ a year domain fee

Contabo VPS: 4 Cores, 8GB RAM for 5€/mo. That should be able to handle the whole thing with plenty of room to scale. Maybe I am old fashioned, but I don't see what all those cloud providers that are so much more expensive bring to the table.

Damn, this seems so cheap. I didn't know about Contabo before. What's your experience with them?

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

#143
I believe that most of the comments complaining about overspecing the runtime mentioned in this article (if at all, I find it reasonable), are extrapolating on their experience and referring to a general problem of overspecing in the industry.

1. Whenever I see a new company's/project's runtime, I have come to expect a massively overcomplicated system that is "built to scale". But ends up costing a lot and taking way too much time from product-development. A real issue with this is that when looking at the project's feasibility to actually do scale, the runtime-cost will be estimated to a multiple of the current runtime cost which will appear larger than if the systems were built to handle the current load.

2. To me, this seems like a failure of cloud computing, which has a very compelling promise of letting you start with small servers, then easily switch up to bigger servers when needed. This was, in fact, hard before cloud.

3. The biggest issue I have with overspeced and overly complex deployments, is that to me it appears like (novice) developers is led to believe that they have to do the job in a complicated way. Look at a typical tutorial from the big and trend-setting players how something should be deployed. The first hit on my favourite search engine for a "Hashicorp Vault deployment" [1] recommends using nine hosts. I know from experience that it runs fine on ONE host of the smallest kind I could find for our non-trivial use-case. Also, in that use-case it doesn't matter that it is not HA, because it has turned out to be more stable than any of our other stuff, and can be restarted in a less than a minute. (I wouldn't mind at all, if the actual motivation for a large deployment was: "it is fun this way" or "we do this for our own training and experience" or "we choose to do it this way because of specific requirements" or anything of the sort.)

4. It seems to me that, what is needed is enough experience and courage to say: let's do our deployment and setup in a simple way that will work, because we know that we are competent to solve scale issues when they appear and we are not building ourselves into a corner. Also, we can afford to take responsibility if scaling problems do occur because we did not follow industry "recommendations" (i.e. trends).

[1] https://learn.hashicorp.com/tutorials/vault/deployment-guide

Edit: - clarified HA needs in point 3

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

#144
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.

Thanks for that warning. Was planning to migrate there. Do you still host there and if so, where do you backup to?

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

#145
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.

For OP it might be a good idea though, given that the infrastructure is their biggest cost and they have not revenue.

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

#146

I'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/

DNS over Git, it's a very interesting concept. Thanks for sharing.

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

#147
The author says he wants to switch Disqus to Commento but I wouldn't just do that. I didn't have a great experience with Commento. I like the idea and mostly the execution of it (including the OAuth) but I found some major bugs (Firefox just didn't work at the time) and I didn't get any response to reporting those. I asked a few more questions by mail and also no response. After that I'm gone pretty quick.

Not that I'm saying you should use Disqus since they have some privacy issues

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

#148
post #131

Earlier quoted context omitted.

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.

so true

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

#149
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.

Being well versed in setting up your own database server bereft of cloud provider hand holding easily pays for initial time investment over time. I don't think most understand just how much a mastery of the basics is capable of generating in value when you're essentially vendor lock-in proof. There is so much blindness to voluntary hanging of one's arose out the window created by vendor overreliance.

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

#150

Earlier quoted context omitted.

Two Hetzner CPX31 boxes sounds like it'd do just fine here too, providing the redundancy you mention for a fraction of the cost. Or get the boxes from different companies, for the same sort of overall price. Yes some of the other tools could arguably be worth paying for, but if the author's concern is that he's short on money and $140 is a lot, why didn't they KISS and only use what they need? Then scale as and when…

My guess is he's doing resume engineering. And $140/month is pretty good value there probably... Even if that's just being able to point potential employers/recruiters at this blog post as evidence of experience building and running an HA website with more-advanced-than-free-Google-Analytics user behaviour tracking.

I was just thinking along similar lines.

Article mentions in a few places that money could be saved - but lowering the cost doesn't seem to be the driver.

Makes sense to me that if you're building the site as a hobby/practice/demo it makes sense to "build it properly" - and it's fun.

Post reply on HN