by Mo3 · 4y ago · 0 comments
> If you also use containers you even get quite a bit of flexibility and agility.
Yeah... and then the only difference is between a single host and multiple hosts. Guess which one Kubernetes is for?
With all due respect and no offense intended, your perspective sounds a lot like "I've never attempted to scale so I can't understand the problems"
> can get away with not knowing basic sysadmin stuff
I promise you that the knowledge you need for your single dedicated server is also needed for k8s clusters, and I definitely can't imagine anyone who can maintain a k8s cluster but can't maintain a single linux host. It's more like that scaling horizontally comes with exponentially more difficult problems than what you're used to or have heard of.
Obviously the billing is an issue but that doesn't negate the whole concept. They should definitely implement better expense controls. A simple hard cap to activate if you want would fix this for good.
You have a script that needs to run, without fail, at a certain time every day.
You have an endpoint that is mission-critical and even a second of downtime would cause insane manual workload.
You have an endpoint that needs to have as little end-user latency as physically possible.
These are all real examples from my work in fintech. The solution to all of them is a few dollars in cloud functions in Lambda and Lambda@Edge. Now imagine having to provision, orchestrate and maintain dozens of dedicated hosts all by yourself, simply for these handful scripts. The expense of employee time alone would make it absolutely idiotic to go that route and if anything this would equal massive scale day - but even worse, because you didn't even plan for it beforehand.
I prefer aws over metal for these kind of setups, but for many other cases I definitely do not; just a dedi or a vps with docker or k8s and/or something like openfaas is enough for almost all startups and beyond. Making it literally impossible to make mistakes like OP. And when needed maybe failover or load balancing.
We also have a few dedicated servers, but mostly only for infrequently accessed data and logging that doesn’t need to be highly available.
I really can’t understand why this argument keeps coming up. Different solutions for different usecases. Yet anytime Kubernetes or cloud functions are discussed people come in and go like “hurr durr my single Hetzner dedicated server can do all of that and doesn’t have these problems”
If you need the lowest possible latency then you should definetly do it yourself. Lambda, even with provisioned concurrency has a very high latency...
Your problems compound if you have to consider disaster recovery (DR) and need an offsite location you can failover to. Now you have to contend with data replication and all its concerns.
So even if your application only has a few dozen users things can get quite complex quite fast. AWS makes it simple, practically push-button. Deploying in multiple Availability Zones (AZ) is a no-brainer, and it isn't horribly difficult to deploy in multiple regions, complete with data replication. All while having no servers to configure and maintain. No containers to contend with, no Kubernetes to fight with. To me it's the most stupid-simple solution available today and it's ridiculously cheap! At least so long as you test before you deploy for world exposure!
Try doing this [0] with your dedicated servers in under 10 minutes.
And then try attaching highly-available scripts/cloud functions and dozens of different integrated functionality in seconds.
And then try setting up good Network ACL, firewalls, route tables, NAT gateways, load balancers with a few clicks.
... and people here are seriously suggesting that instead using AWS would equal a massive forced scaling operation. Lol.
Why does everyone assume everyone else works at tiny startups?
I've never worked at a startup, until last year I never worked at a company with less than 100k employees.
With all due respect, I don't think you've ever actually put together a local cluster.
A simple 4 machine k8s cluster sitting literally on dirt in my basement can scale out to the equivalent of thousands of dollars of AWS spend a month. I broke even on the initial purchase outlay for my workloads in less than a year.
The problems are almost never scaling the web servers. The problem is scaling the infrastructure that those servers need to be useful.
Generally - your DB is the first pain point, your network is the next.
If you can run it in a container, that service probably isn't the bottleneck for scaling, it's going to be whatever is providing the persistent disk for that service, and the network between the two.
Both of those things happen to also be fairly expensive to scale in the cloud as well.
I've used both comcast and google fiber while running my basement cluster. I think on google fiber I would have said production usage would be fine - I would pretty reliably get 1gbs down and ~800mbps up.
I wouldn't have redundant net, but the upload speeds are fine.
On Comcast... Comcast is really kind of a joke. Even on expensive business plans they cap upstream at 35mbps in my area (down is 1gbps) and the fastest way to get throttled to actually try using that upstream capacity.
Comcast does give me redundant failover to 5g by default now, which I guess is nice, but it's not worth much when I can't send a ton of data over the line anyways.
So point taken - if you're going to have to rent a room in a major metro for fiber access anyways, you probably want to be paying for cloud services (sadly - you'll pay a lot, since outbound traffic costs are high, and if 30mbps upstream isn't doing it for you, you're gonna blow through the free 100gb fast)
I have, and still do. It's neither redundant nor highly available. The power source isn't, the internet connection isn't and it's also located in my basement and not multiple regions.
> The problems are almost never scaling the web servers. The problem is scaling the infrastructure that those servers need to be useful.
There you go..
> Both of those things happen to also be fairly expensive to scale in the cloud as well.
No. [0]
My internal transfer costs are also.... drumroll... zero. (ok - technically, at some point I bought a 10gbs switch and 500ft of ethernet cable)
Lets talk about what it costs you put data back out onto the net, or into a different region. Then lets compare long term storage costs.
Because that shit is only cheap in the "hobbiest" range. Outside of that, outbound data and storage is fucking expensive in the cloud.
Really? In completely different physical locations with inter-region routing and NAT gateways for each region that route into a redundant load balancer? Then you're right and don't need AWS any more. However, I'd suspect your costs would not be very affordable either.
> Lets talk about what it costs you put data back out onto the net, or into a different region.
If you're seriously trying to compare your residential internet connection with something like this I'm not going to go there..
> Then lets compare long term storage costs.
Same logic applies.
For a lot of projects this doesn’t matter. The cost of downtime might be lower than the cost of high availability and occasional downtime is OK.
Most projects don't even actually suffer for modest downtime, although you can achieve AWS-comparable downtime even without AWS/Google/Azure-style "cloud" architecture.
It can make a huge difference in operating and engineering costs to know which bucket your project fits in. Good architectural foresight can even let you smoothly move from one to other if unexpected growth or a pivot indicate that it's warranted.
Engineering is about understanding the scope/scale of problems, not about being dogmatic or getting caught up in problems that don't apply.
Just curious - have you really researched cloud solutions or did you just compare the price of hosting EC2 instances in AWS vs having your own server? Because that's not what cloud is about.
And you are overpaying by a significant chunk. My raspberry pi - the old cheap one - can handle 10 million requests a day without breaking a sweat. If I push it, I can get up around 90 million requests a day without too much effort (it's only about 1 request/ms)
I really don't think most devs understand how fucking cheap hardware that's comparable to these services is.
Now - you might be using a host of other valuable features that your cloud provider gives you (things like edge servers near your customers, or truly significant outbound network traffic flows, or a very robust multi-region setup, or disk backing of some sort, etc).
But generally speaking - you ARE overpaying for cpu cycles in the cloud. It's not really up for debate.
SQS is so good and that there isn't a great, easily deployed (sorry, RabbitMQ) option for exactly what it does is a real push towards AWS. (GCP Cloud PubSub is close enough, but I know AWS way better than I do GCP.) If I didn't need this, and I felt confident managing RabbitMQ as a queueing solution, I don't think AWS would be a compelling solution because $60 in Hetzner nodes, in a HA configuration, could do a lot of work.
(If this thing works I'll need an on-prem solution anyway, so I'll probably have to build that too--but that's "good problems to have".)
Totally agree on SQS, knowing PubSub as well I'd say they're pretty much on the same level. All the interconnectedness is where cloud platforms shine
Plus the OP has already decided that free tiers don't work.