News for hackers. Stuff that matters.
Re:Do not do in code what can be done in infrastructure (2017) by BiteCode_dev on Friday August 13, 2021 @10:42AM (#28169492)
Yeah, no.

Infra is hard to get right, to change, and standardize.

That's why people use cloud providers, but they are very expensive.

With code, you can solve problems using cheap fleets of heterogenous vps from different providers.

And when you have a small budget, that makes a x10 difference in hosting cost. Not to mention you don't need to hire a super dupper 300k <cloud brand> expert to manage your system, a regular dev will do.

Most products don't need unlimited scaling, zero downtime and so on. It can even crash in prod once in a while, espacially in the early years.

You can alway migrate from code to infra later when you need to scale up and standardize. The opposite is way harder, if you even reach the point at all.

E.G: on a video streaming plateform with a decent audience (800k users a day), we had to transcode user uploaded videos then ensure we had several copies of them load balanced accross more or less servers depending of the media popularity. Today you would put some web scale key value store to manage that, maybe a cloud virtual FS or at least some CDN. At minimum, you'd spawn docker instances, kubernatis if you feel fancy. We solved the problem with redis, nginx and the cheapest naked vps possible. The site ran using only 7 servers, including encoding, streaming, database and the django app itself and was super fast.

To this day it is still maintained by one single dev working part time. It's 10 years old and still uses python 2.7, jquery and a hellish handcrafted css mess.

So sure, infra is the clean solution. But Pareto has something to say about it.

Re:Do not do in code what can be done in infrastructure (2017) by betaby on Friday August 13, 2021 @10:46AM (#28169539)
That's in fact how I read the author. He advocates using already written well know software like Traefik, LinkerD, Envoy and so on, and not to reinvent their functionality in your code.
Re:Do not do in code what can be done in infrastructure (2017) by BiteCode_dev on Friday August 13, 2021 @11:01AM (#28169724)
Or k9s ? But then it's so hard to manage you end up paying a cloud provider to do it for your or hire the dupper k9s expert.
Re:Do not do in code what can be done in infrastructure (2017) by sascha_sl on Friday August 13, 2021 @12:30PM (#28171087)
k0s is a lightweight ready made runtime

k3s is similar, but older

k8s is kubernetes

k9s is a canine joke and terminal client for k8s

Just so I'm not just nitpicking, k0s and k3s are both good solutions to hosting kubernetes on bare metal or cheap VPSs. Hetzner in particular is starting to get most of the features you typically lack on VPS providers in that price range (software-defined networks, load balancers, storage) packaged in a kubernetes cloud-controller.

Re:Do not do in code what can be done in infrastructure (2017) by vinceguidry on Friday August 13, 2021 @04:10PM (#28173915)
I found k0s to be fairly skin deep, much is missing compared to the other solutions.
Re:Do not do in code what can be done in infrastructure (2017) by sascha_sl on Friday August 13, 2021 @04:37PM (#28174202)
That is by design. k3s installs a bunch of things that assume you’re on bare metal, k0s knows you’ll probably bring your own ingress and cloud controller. It is just kubeadm, but in one binary.
Re:Do not do in code what can be done in infrastructure (2017) by gpp666_999 on Friday August 13, 2021 @04:16PM (#28173973)
Sure but one single dev part time costs somewhere between 1/2 south of 80T€ or 200T$ per year - running this on AWS managed services probably will cost you no more than 15T€ and this is really exaggerated calculation
Re:Do not do in code what can be done in infrastructure (2017) by systemvoltage on Friday August 13, 2021 @05:54PM (#28175048)
You still need a dev. Probably two more.
Re:Do not do in code what can be done in infrastructure (2017) by BiteCode_dev on Saturday August 14, 2021 @01:35AM (#28178313)
Service don't maintain themself, you need a team anyway. The question is which one.
Re:Do not do in code what can be done in infrastructure (2017) by Supermancho on Friday August 13, 2021 @02:26PM (#28172457)
> That's why people use cloud providers,

What do the cloud providers use? That's what you're doing whether you know it or not. I'm gonna bet it's a mix.

Re:Do not do in code what can be done in infrastructure (2017) by tuldia on Friday August 13, 2021 @04:31PM (#28174114)
> ... a regular dev will do.

Oh, the classic "There is one administrator" falacy.

> kubernatis if you feel fancy

I hear this mindset about kubernetes very often from people who can do some stuff with, but don't get infrastructure at all.

EDIT: thinking that a regular dev can do what an admin does is simply naive.

Re:Do not do in code what can be done in infrastructure (2017) by jokab on Friday August 13, 2021 @05:44PM (#28174936)
Any disclaimers? This opinion coming from a dev or an administrator?