7 ms·
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
by threeseed 6y ago
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. But others may be monetising that traffic and will want a HA solution so their revenue isn't impacted.
All of those add complexity and cost to an architecture.
- TekMol 6y agoThe article does not mention video processing or ML. It describes their setup for what they describe as a generic web app.
- FrozenSynapse 6y agoIf 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.
- TekMol 6y agoI 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.
- tristanperry 6y agoAgreed. 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.
- bigiain 6y agoAt work, I aim for four nines. (We put three nines in the legal paperwork). 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.
- CapriciousCptl 6y agoI think ec2 gives 99.99% availability in their SLA, no need to scale across regions or even AZs. Multi AZ RDS is 99.95%. We have a simple ELB/EC2/RDS/S3 stack on us-east-1 and need high availability for a very small amount of users and run very cheap.
- smt88 6y agoI have a VPS that has not gone down in 5 years. It still has a redundant slave because I'm not going to bet my reputation on everything going right.
- jmnicolas 6y agoMe too, with the cheapest Kimsufi server from OVH (something like 3€ a month). To be fair I can't be sure because a less than 5 minutes downtime would probably go unnoticed, but the fact is I never hear about this server.
- httpsterio 6y ago> 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 with running everything off a single VPS and if that datacenter has network or hardware problems, then your service is down. Is redundancy necessary for the scale of OP's app considering it provides 0 income? Most likely not, but that's a decision they've decided on and there's nothing wrong with that. What does excellent uptime mean in your book? With Digital Ocean's AM2 region I had regular downtime every few weeks and while I'm alright with it, if I had another VPS in another datacenter it would've had next to no effect on the customer experience. But an hour or more of downtime every two weeks isn't excellent.
- TekMol 6y agoWhat 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.
- FrozenSynapse 6y agohttps://aws.amazon.com/message/41926/ 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.
- TekMol 6y agoThat was a "S3 Service Disruption". A perfect example of a problem you do not have with a single VPS setup.
- sweeneyrod 6y agoIf Digital Ocean is giving you an hour of downtime every two weeks (two 9s and a 7) then they're breaking their SLA (four 9s).
- karlerss 6y agoA 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).
- tristanperry 6y agoTwo 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 needed in the future. Y'know, do what HN regularly preaches?
- bigiain 6y agoMy 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.
- goldcd 6y agoI 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.
- bigiain 6y agoIf your 55k MAU want uninterrupted service, they need to be paying for it (in dollars or monetisable attention and/or privacy). On a site currently generating zero revenue, I hope the OP is happily enough paying most of that $145/month as a learning experience or for resume bullet points (which are perfectly valid was to spend your money). They've admitted elsewhere in the comments that the two $40/month droplets are way oversized (from an attempt to solve a problem that turned out not to be droplet size/resource related) - so without redundancy and without AWS hosted metabase, this would be about $100/month less expensive to run. I still think that's over provisioned or under engineered. Like others have commented, I'd be surprised if the features you can see on the site require any more than the $15/month the FAQ claims it costs to run, plus perhaps the $10/month Discus expenses. That seems about where a hobby/side-gig project should sit for a lot of devs before you start thinking about how to make it pay for itself... YMMV, especially if you're not comfortable earning at least junior dev salary already in some reasonably well paying part of the world.
- maxk42 6y agoTekMoi 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". The matter is worsened by the fact that the application is so simple that it doesn't even support user accounts. There is room for discussion here about efficiency in application architecture. More importantly, an article billing itself as "Costs of running a Python webapp for 55k monthly users" is silly because there is no way this is representative of anything. I'm afraid new hackers will be scared by the high costs listed here and be discouraged in their own efforts.
- cinquemb 6y agoSimilar situation (sub $1k/month) to the setup im doing for a start up in indonesia (top 7k in alexa, top 150 in indonesia), except we have to pay extra for media because we need to process the logs (long tail pdf/data/docx hits, and we need to control the dns and how other domains route to use so we cant use cloudflare). And still plenty of room to cost optimize. Another consultant that came in and try to do this, made our costs go up by 10x per month… so i'm not surprised when I see stuff like this here… The knowledge of ones tools available at ones finger tips and the relative costs of such seem to make the difference for these things.
- ramraj07 6y agoIt's 50k MONTHLY users. It's just 3000 a day
- matt42 6y agoAnd 2.5 per minute
- runbyfruity 6y agoOr 0 per minute and 25,000 per hour for two days a month. Traffic can be bursty; don't assume that X/month means they're getting exactly X/30 per day..
- bigiain 6y agoTo 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 capable instances and cloud hosted metabase might have good reasons, but right now those reasons are not "wanting a HA solution so revenue isn't impacted"...
- ianamartin 6y agoThat'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.
- bigiain 6y agoThat'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...
- yread 6y agoI have a web app that's struggling if there are more than 2 concurrent users per CPU core. It's displaying incompressible large resolution images with <100ms latency EDIT: not sure why I'm downvoted, I'm just presenting my use case. They are multigigabyte images encoded with custom wavelet compression that are cut into tiles (think google earth), each user needs 5-10 tiles every second
- csande17 6y agoThat's a lot of CPU usage per user! Is it doing some super-intensive process to generate the images on the fly?
- deleted 6y ago[deleted]
- justinclift 6y agoIs it doing anything weird or fancy with those images? If you're just serving them (eg no image manipulation), that sounds like there's a problem somewhere.
- matt42 6y agoWhat http server do you use ? Are they static images ?
- mping 6y agoMy 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)?
- yread 6y agoWhat'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.