6 ms·
Truth is, most web projects made today can run on a raspberry pi or mini PC and be just fine. If you have enough users that you need to scale to more machines,
by bschwindHN 2y ago
Truth is, most web projects made today can run on a raspberry pi or mini PC and be just fine. If you have enough users that you need to scale to more machines, you'll be in a position to know what to do to handle it, or hire someone who does.
- valenterry 2y agoIt depends. If you want a service that doesn't have downtime because of a hardware issue, then you should have at least 2 machines. And then, you probably want to do deployments in a way where you spin up 2 new machines and then, only once confirmed that the deployment works, shut down the old 2. That is super easy to do on AWS (and many other providers) but not so easy (or even impossible) anymore when you do things on-prem. EDIT: due to the replies, let me clarify; this is not an argument for AWS specifically but for services that make it easy to spin up machines and that handle deployments and failover for you. Also, there are more reasons to have more than one machine, e.g. being able to deploy with zero downtime and therefore without having to think when to deploy and what to do if a deployment fails etc.
- esquire_900 2y agoSuper easy? Getting that setup for the first time from zero knowledge will probably take a few days. And that's before understanding all the intricacies like your AWS bill, the hidden costs of cloud, properly securing IAM and setting up your VPC etc etc
- wontondisregard 2y agoNot once in my entire career have I seen people successfully avail themselves of the cloud's purported benefits. I have, however, seen a lot of happy account managers in Las Vegas during Re:Invent, oh yes.
- pinoy420 2y agoI got downvoted for saying something similar for standing up a web app from scratch and getting it deployed securely. You are absolutely correct
- valenterry 2y agoComparably easy, yes. I'm not talking specifically about AWS btw, but even there it is easy. If someone has zero knowledge, then everything will take them a long time, including hosting on-prem or so.
- 2030ai 2y agoDigital Ocean I believe is pay as you go and supports this for anyone who can click "link my Github account" and auth themselves.
- valenterry 2y agoDigital Ocean is not equal to "run on a raspberry pi or mini PC and be just fine".
- 2030ai 2y ago[dead]
- wontondisregard 2y agoI'm sorry, but the ten billionth CRUD web app really doesn't need nine nines.
- 2030ai 2y agoJust a blue green! But I agree somewhat. Single machine running Docker compose is pretty decent. Pets! Not cattle. (I'd rather care for a dog than a 100 sheep)
- valenterry 2y agoI agree. It doesn't change my argument though.
- freeone3000 2y agoIt is exactly as easy, or easier, to do this in proxmox than it is in AWS console, and would have a price breakeven point of less than a year (you only need two physical nodes).
- valenterry 2y agoProxmox is just a way to virtualize things. You need hardware to run it. So what hardware are you talking about?
- vidarh 2y agoMissing the point that you don't need to be able to spin up/down servers. You can just rent 2 and spin up/down containers.
- valenterry 2y ago> You can just rent 2 and spin up/down containers. Missing what point? You are apparently agreeing with me and disagreeing with the OP who said: "can run on a raspberry pi or mini PC".
- vidarh 2y agoNo, you most definitely can just spin up/down containers on a raspberry pi or mini PC as well. This is what I objected to: > And then, you probably want to do deployments in a way where you spin up 2 new machines and then, only once confirmed that the deployment works, shut down the old 2. You don't need to spin up more machines or shut down machines. As long as you ensure you have the headroom you spin up containers and shut down containers. By doing that, it's also relatively easy to set up hybrid setups where you can handle load-spikes by scaling into EC2 or similar if you should ever need to.
- valenterry 2y ago> As long as you ensure you have the headroom you spin up containers and shut down containers. Are you very sure you are not introducing potential additional problems with that approach? Because if you do, then I wouldn't say it's "not needed" to spin more additional machines - it would depend on those additional problems.
- snackbroken 2y agoMost web projects can tolerate an hour of scheduled downtime a week and the occasional (< 1/year) unscheduled hour of downtime to replace broken hardware. Running on a single machine with 2 disks in RAID1 right up until the point where the ~50 hours of downtime a year equal one engineer's salary in lost revenue makes sense if you pick a DC that will sell/rent you replacement hardware and do replacements for you. Just make sure you have offsite backups in case the DC burns down. If your office/home is near a well stocked computer store, most web projects can skip the DC altogether and just put the server in the closet under the stairs or whatever. The company will likely die before the server does anyways.
- valenterry 2y ago> Most web projects can tolerate an hour of scheduled downtime a week and the occasional (< 1/year) unscheduled hour of downtime to replace broken hardware. An hour? What happens if it breaks while I'm on vacation and no one is there to take care? Nah, that argument might work sometimes but not in general.
- snackbroken 2y agoYes, an hour. In practice, most scheduled maintenance will take closer to a minute than the full scheduled hour. If it's good enough for the government and the bank, it's probably good enough for you. What happens if you're on vacation and something breaks is that you call/email the DC and ask them to replace what's broken, same as if you were not on vacation. In my experience most DCs will have the replacement done in less than 30 min from receiving the ticket, good ones will do it in under 15. If the project is ran by more than one person, simply don't all take a vacation at the same time. Worst case scenario you point DNS to a free static page host that reads "Server broke. Working on a fix, check back tomorrow." (or the appropriate corporate-PR phrasing of the same if applicable) while you wait for the computer store to open so you can buy a new one. Even if you are once-in-a-lifetime unlucky and the damn thing breaks while you're on vacation and for some reason your monitoring fails to notify you, big whoop. You can probably get away with just apologizing for the inconvenience and moving on. If a week long outage is enough to make or break your business, your business isn't gonna work out anyway. This applies to practically all web projects from the home page of the pizza place on the corner of your street to 100-employee e-commerce sites. If a single machine can run it, it can probably run on a single machine. Use the dumbest tool that will get the job done, switch to a smarter tool when it won't.
- znpy 2y ago> That is super easy to do on AWS (and many other providers) but not so easy (or even impossible) anymore when you do things on-prem. False. You can run kubernetes and/or some virtualisation engine as well and do the same on prem. and overprovisioning physical hardware is much cheaper.
- valenterry 2y agoWell, yes. I would categorize "running kubernetes on prem" as "not so easy".
- deleted 2y ago[deleted]
- theshrike79 2y agoAnd you can easily have a separate clean environment for every pull request easily. Can't do that with your own hardware unless it's also a Kubernetes cluster, which is a whole new set of crap you need to manage.
- sgarland 2y ago> not so easy (or even impossible) on-prem It’s as if an entire generation of tech workers are utterly unaware that these have been solved problems for decades. You put two machines behind HAProxy with keepalived. If you want to do a new deployment, you can spin up new machines in the same manner, and cut them over (or any of the many other ways to accomplish this). AWS isn’t inventing any of the HA stuff they offer; they’re taking existing technologies and packaging them.
- valenterry 2y agoSo how do you do all of that with "a raspberry pi or mini PC"? You would need at least 4 of them.
- sgarland 2y agoI was replying to your comment, not the other. But sure, get 4 RPis if you want. You could also be using containers on them, and not need to swap whole computers. Or run each app in its own chroot jail. Or run VMs. There are many, many ways to accomplish this goal.
- bschwindHN 2y agoMost web projects can afford to be down for a bit. Even the big guys have outages fairly often. It's not like AWS is always running smoothly either, and there are so many "_ is down" posts on HN alone. I do agree that your projects should be designed to be well contained and easy to create a new instance of it, though.
- 2030ai 2y agoIf you have enough users that you need to scale to more machines ... run the rpis in a 3d printed 1u rack adaptor as a kubernetes cluster.
- ZYbCRq22HbJ2y7 2y agoSeems like a pointless thing to talk about, "most web projects today". You don't know what specific requirements people have, and people have been making "web projects" with limited resources since the web started. Yet, for some reason, I see this repeated everywhere, always. Does it make the people who repeat it feel better? Are they actually informing anyone of anything? Who knows.
- addicted 2y agoI don’t see a refutation or even disagreement with the claim in your comment. Are you saying that this is too obvious to restate?
- lvturner 2y agoI just went down the rabbit hole of trying to host a small app for free(ish) on cloud solutions, only to remember that I have a 2GB fiber line and a raspberry pi sitting idle - if it ever gets so popular that I outgrow this, it'll be a nice problem to have.
- fm2606 2y agoYeah I did the same thing about a year ago only on GCP. I tried to stay in the free tier but "hidden" networking costs got me at $20/month. The site was a blog with traffic of 1, load balancer, cloud run and storage bucket. I shut it down. It was a nice exercise but not worth it to me long term.
- puchatek 2y agoIsn't that a security risk? Having to open a port for the pi and then always keeping an eye on it in case the next heartbleed, etc. is discovered?
- bongodongobob 2y agoNo, it's literally what firewalls and DMZs are for.
- post-it 2y agoYou could set up a DMZ if you're concerned. But even if someone gets on my LAN, it's not the end of the world. They could send goatse to my Chromecast, I guess.
- bongodongobob 2y agoYou're absolutely right. A little off-topic, but I've seen a similar problem on the on-prem side of things. Their server setups are a lot of the time completely overblown "because this is what the nice vendor recommended, they are great partners!" Awesome, your 5 node Nutanix setup with 15 whole VMs is peaking at 5% of its total compute, 5% of its RAM, and 8% of its disk. Granted, I do work with medium sized businesses in the manufacturing sector, but so many get tricked into thinking they need 5 9s, when 3 is enough, and their setup isn't even providing 5 anyway because nothing else is downstream. Then 5 years later their warranty is up and they scrap it all and replace. It's crazy. Kills me how many businesses contract this shit out and get tricked into spending a million on infra when they could just run 2 servers and pay a mid level engineer to manage it. "Not in the budget." Yeah, I wonder why.
- baq 2y agoYeah but OTOH I’ve just set up a vm host + guest on a N100 minipc for home assistant (migrating from a bare metal pi 4) and while I’m happy with the result, I’ve spent more hours than I’d like or planned to get it working reliably vs click ‘make a vm please’ and have it waiting for an ssh connection after a coffee break. (Started with proxmox but the installer’s kernel doesn’t have the Ethernet driver and they don’t provide WiFi because it’s stupid for the installed system - but they allow upgrading to a kernel which supports my adapter, so got a bit catch 22’d. Moved to Ubuntu server that would stop booting after creating a bridge interface because ‘waiting for network. no timeout’ and then a few more interesting issues.)