5 ms·
Can the majority of webapps run on a single machine? Probably. Do most of your customers expect close to 100% uptime? Yes. Does one machine provide the uptime
by master_crab 3y ago
Can the majority of webapps run on a single machine? Probably.
Do most of your customers expect close to 100% uptime? Yes.
Does one machine provide the uptime required by your customers? Most definitely not.
- userbinator 3y agoMake it two machines then.
- master_crab 3y agoYa. 1<n<6 has worked 99% of the time for me.
- Jgrubb 3y agoThe correct answer to question 3 is "it depends".
- sjducb 3y agoMaster slave failover will give you less than a second of downtime.
- hparadiz 3y agoPretty much any provisioned vm can be split down the middle. Got 4 cpus and 4gb of ram? Congrats you have two vms with 2 cpus and 2gb of ram. Throw them into a 50/50 load balancer and never have any downtime.
- toast0 3y agoTwo vms on the same machine doesn't help when the machine fails. Also, I sure hope your loadbalancers don't suck. I've worked with some that had worse uptime than my servers, and worse capacity too. Went back to putting the two host addresses in DNS, which is mostly fine, but means a lot of waiting when you want to take a host out of rotation for disruptive maintenance.
- hparadiz 3y agoI do this on AWS so the load balancer is managed for me. Never had issues. Two randomly provisioned vms are unlikely to be on the same bare metal.
- aflukasz 3y agoYou do have some control (quite typically?): https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placemen..., https://docs.hetzner.com/cloud/placement-groups/overview https://docs.hetzner.com/cloud/placement-groups/overview.
- viraptor 3y agoVMs going down is not an unexpected event. It's not going to happen even day, but hosts crash, network goes down, datacentres experience thermal events, etc. Your solution may work for your own system crashes, but not most of the rented platform failure modes.
- Puts 3y agoWell if you can spin up a new environment in less than a minute – does it matter? I mean if you are Facebook yes, but having worked with a lot of people building things like web shops – having a minute downtime I would say is fine because I've seen so many of these people shoot themself in the foot trying to build high-availability solutions and having constant downtimes just because they can't handle their own complexity.
- ardel95 3y agoIf you have the ability to spin up a new machine when the old one fails, and deploy your app onto it in one minute, it’s not a big leap to also run your app on two machines and avoid that downtime altogether.
- Nextgrid 3y agoRunning two instances of a stateful application in parallel forces you to consider nasty and hard problems such as CAP theorem, etc. If your requirements allow, it's much easier to have an active-standby architecture over active-active.
- ardel95 3y agoTotally. But most applications are not stateful.
- echoangle 3y agoIs it really an application if it’s not stateful? Maybe you’re managing the state client-side which makes it easier but I wouldn’t call a plain website an application, or am I missing something?
- Nextgrid 3y agoAt the smallest level, even every byte of an in-flight HTTP request is still state. State, and for that matter "uptime" really depend on what the application/service ultimately does and what the agreement/SLA with the end-customer is. The correct high-availability solution should take business requirements into account and there is no silver bullet. Running everything on a $5 VPS is no silver bullet, but neither is your typical "cloud-native" "best practice" stack that everyone keeps cargo-culting which often leads to unnecessary cost while leaving many hard questions (such as replicating CAP-bound stateful databases) unanswered.
- fabian2k 3y agoI don't think the point here changes all that much if you change this to two servers and a load balancer. That's still a pretty simple setup. But I also think that many applications are far more tolerant of small outages than you imply. And a more complex setup also adds more points that can lead to an outage even though it reduces the chance that hardware will cause one.
- kasey_junk 3y agoNearly no one is competent and able to setup a true load balancer. If you have one either it’s provided by your (most likely vm based) hosting provider or you are a big enterprise. If you are in one of those two categories then setting up something more robust than a single server isn’t much more complicated than a single server. That is to say, I think it very much does change the equation around the original statement.
- Aachen 3y agoWouldn't you also need two load balancers then? Otherwise you've still got a single point of failure. And how do you keep the failover system in sync? It's a whole can of worms to promise 100% uptime. It's super rare that a server physically breaks and suddenly goes dark with less than a day's warning, and for most applications such a once-in-5-years event is tolerable if that means the hosting costs are divided by five as well (so far I'm ~10 years in and haven't experienced such an event yet; disks in RAID have broken but not a cpu or other SPOF)
- erik_seaberg 3y ago> super rare that a server physically breaks I kinda want to know where you shop, because commodity hardware has a reputation as just utter crap. Before cloud went mainstream, I worked somewhere that had some racked servers in a colo literally catch fire. (The remote hands put them out, disconnected, and refused to touch them ever again.)
- ocdtrekkie 3y agoYou'd be surprised how close to 100% uptime you can get on one machine with well-engineered software. Schedule an automated update and reboot for a time and day of the week you have the fewest customers monthly, and if you have an SSD as the boot drive, unless you are a huge company nobody will notice or care that at 4 AM on Sunday your service was down for a minute and a half.
- NorwegianDude 3y agoYou can also avoid most reboots by livepatching the kernel.
- ocdtrekkie 3y agoIndeed. I come from the Windows world where things are a lot slower and there are less options for things like livepatching. So my "minute and a half downtime" is definitely pessimistic compared to what you can accomplish on a Linux server.
- maxcoder4 3y ago>Do most of your customers expect close to 100% uptime? Yes. I think this is mostly a self imposed requirement. Banks regularly have overnight technical breaks. My country national rail has 30 minutes of downtime every night (!). Unless your product is already global, most people won't have a problem with occasional overnight scheduled downtime.
- Solvency 3y agoBanks have most people by the balls. Most SaaS don't and wish they did.
- SkyPuncher 3y agoYou’d be surprised. Most people never even test number 2. If your a novel or niche product, you can afford a “lot” of downtime For number 3, it really all depend on your load. I’ve run most early stage startups on an incredibly simple setup with a proxy placed in front of an app server. Occasionally, our monitoring will start reporting high p99’s so we go in and bump the servers to the next tier or scale horizontally just a bit more. Eventually, that breaks down but many startups will be well into Series A or Series B point. At that point, you know your customer’s needs and can hire dedicated engineers to solve reliability and uptime.
- nektro 3y agohow many websites out there realistically need close to 100% uptime?
- watermelon0 3y agoMultiple machines don't automatically mean a better uptime. Outside of the regular maintenance, many problems can affect multiple instances, not just one. (Regular maintenance meaning OS updates needing a reboot, which happens like what? Once per month for a minute?)
- NorwegianDude 3y agoServers are a lot more stable than you think.