News for hackers. Stuff that matters.
Re:Small Teams by danjac on Thursday January 05, 2023 @03:37AM (#34257419)
My favourite tin-foil hat conspiracy theory is that Kubernetes, microservices etc are promoted by big tech to lure potentially disruptive small teams into adopting momentum-killing rabbit-hole solutions because they are "best practice"...

This also holds for project management practices such as Scrum.

Re:Small Teams by gloosx on Thursday January 05, 2023 @03:52AM (#34257517)
Actually used k8s for the first time ever to set-up a new product from scratch. I would call it essentially an Autobahn whereas everything else was a dirt road. Our team is just 3 people, and it took me just 1 week and 1 youtube video to setup a 100% availability load-balanced production env cluster with 5 node.js microservices, and it is working like a charm, rollout deployment takes 30-60 seconds and i can monitor it all at glance without leaving my terminal. UPD: I was into your theory too before:)
Re:Small Teams by lmarcos on Thursday January 05, 2023 @04:19AM (#34257683)
This is the equivalent of "My cousin can build me a website in a weekend. Why are you charging me so much Mr. software engineer?"
Re:Small Teams by concordDance on Thursday January 05, 2023 @04:02AM (#34257589)
What was the video?
Re:Small Teams by gloosx on Friday January 06, 2023 @03:18AM (#34272283)
Happy to share! This guy just made it a breeze for me. https://www.youtube.com/watch?v=heQbbrSu8LM
Re:Small Teams by TeMPOraL on Thursday January 05, 2023 @04:51AM (#34257823)
At this point it could be simply that enough bodies were thrown at k8s and related tooling that, though oceans of sweat, blood and tears, rough edges were filed down or at least marked as dangerous, and enough iterations of guides and tutorials were made that, finally, you can set up a production cluster with one week and one YouTube video and no human sacrifice.
Re:Small Teams by danjac on Thursday January 05, 2023 @05:32AM (#34258063)
Getting something up and running and managing something long-term are two different things.

I'm sure - even though I'm not particularly smart - I could get a simple k8s solution up and running in a week with the help of a YouTube video.

What happens six months in when I hit some critical k8s related issue and I lack the basic understanding of where to even begin to debug and fix it? For example I may introduce a serious security issue in a CI pipeline or whatever just due to inexperience and unfamiliarity.

I'm not saying Kubernetes (or for that matter, microservices) is the wrong pick for a small 3-person team. You know your own business better than I or anyone else and I'm sure you made the right choice. But personally I would be cautious about adopting a core production technology where my experience consists of one week and a YouTube tutorial.

Re:Small Teams by steveBK123 on Thursday January 05, 2023 @07:33AM (#34258820)
Yes.

As long as your k8s is some self contained island of code needing no R/W access to resources on k8s, maybe I'll believe it's easy to setup AND to support. Additionally if you are in some type of small shop environment where you have basically unfettered permissions in AWS console to do what you need, doubly so.

Now try to get access to/from RDS, S3, EFS, Netapp NFS, some HTTP endpoint on-prem, some other HTTP endpoint on EC2, non-MSK Kafka, cross account, etc? Pain.

Oh you need to submit a ticket to your Linux sysadmins, Infra team, CloudOps, DevOps, Networking or Infosec for each of the above permissions? And sometimes need 2-3 of those teams to coordinate to make it happen? Death.

Re:Small Teams by thegginthesky on Thursday January 05, 2023 @08:05AM (#34259078)
I've worked on 2 companies where I was in a team of 4/5 devs + 1 SRE in charge of the infra. In both cases, once the SRE guy created the appropriate terraform modules and CI template, he had to move on to a new team because there was literally no work left for him to do. Once things are infra as a code and the happy path is defined and implemented as a process, we rarely lost time thinking about infrastructure. Or anything.

The system needs permission for AWS S3? Here is the component. Does it need to setup secrets? Here is the component. Does it needs to be in the same VPC as a Redshift cluster, or whatnot? There's a component for that. Do you need a SQS/RDS/Redis service? You get it.

K8s, terraform and Atlantis have been such huge enablers I cannot overstate. Everything is so nimble and cheaply setup that our current infra bill is about 500USD/month to generate over 100k MRR for the company.

And better yet, we rarely ever think of our infra unless we want to do something brand new (such as testing Sagemaker), or there's unexpected traffic above our current scaling limits (about once a year). Plus, if we need to fix anything infra related there's an internal cookbook for that.

I also feel I have acquired useful skills by learning all of this.

Re:Small Teams by steveBK123 on Thursday January 05, 2023 @09:54AM (#34260386)
That sounds like a smaller shop maybe. The problem is big, established shops, with dozens of teams of dozens of people.. 300 developers, etc.. think they can get all the above with 2 CloudOps guys.

Instead zero happy paths get defined in a timely manner, everything you are trying to do is hamstrung and waiting in the CloudOps queue, and you can't self-serve around them because you cannot do it yourself due to permissions.

Imagine an org where "the happy path for RDS will be ready in 2-3 months, and only support one database type and 3 instance sizes" is somehow acceptable. Rinse & repeat for an alphabet soup of 25 other AWS services.

Re:Small Teams by dpkirchner on Thursday January 05, 2023 @10:25AM (#34260929)
That's more a problem with bad organizations than cloud or kubernetes. Besides, a common complaint about ops (called IT back then) was how long it took to provision and deploy resources. Months was common, unless the org had the foresight and budget to have lots of cold hardware on standby.
Re:Small Teams by steveBK123 on Thursday January 05, 2023 @10:36AM (#34261133)
Yeah, the challenge is that after decades many of these firms actually had their onprem solutions dialed in. VMs can exist in the datacenter as well, and by the year 2022 most places have this stuff unbooked & behind a ticketing system with a defined SLA.

Unfortunately when these slow moving medium/big firms then move into the cloud, they re-invent all the opacity, inertia, and other issues that they had solved onprem already. Some think they can just replace 25 DC ops people with 2 cloudOps and somehow its going to all just work out.

Re:Small Teams by hbrn on Thursday January 05, 2023 @10:59AM (#34261629)
> Once things are infra as a code and the happy path is defined and implemented as a process, we rarely lost time thinking about infrastructure.

> we rarely ever think of our infra unless we want to do something brand new

That just means your infra is stable. It would be exactly the same without terraform/k8s.

Re:Small Teams by gloosx on Friday January 06, 2023 @04:48AM (#34272859)
As long as it's all in the same VPC everything goes through HTTP and other protocols like a knife thru butter, you don't even have to think about it knowing it is all in the same private network
Re:Small Teams by gloosx on Friday January 06, 2023 @03:32AM (#34272377)
The point is – k8s essentially simplifies the solution, so what you'd get up and running will serve you for the time being without any maintenance. You're talking about it like it's a whole different framework of thinking which you will need to adopt from scratch, but it's not. Containerisation and virtualisation concepts are here since the beginning of time, just this thing makes it real easy to grasp, apart from that it is all same technology. It literally allows anyone to spin-up amazing production clusters quickly with zero overhead – assuming you know what you're spinning up, something that just took months of configuration works – now abstracted to few funny .yaml files.
Re:Small Teams by danjac on Friday January 06, 2023 @05:20AM (#34273063)
There's literally a web site of Kubernetes failure stories: https://k8s.af/ where people experienced in Kubernetes have shot themselves in the foot.

To be fair, it's over a year old, and probably the state of the art and best practices have advanced to the point where many of these are unlikely to happen. But in general, Kubernetes is widely considered a very big complex thing full of footguns for the unwary for a reason.

So while I agree with you that sure, you can get up and running by watching some videos and copy-pasting a few YAML files, the problem is when you are deep into critical production and you run into issues (the classic "I get woken up at 3am by an alert or my boss and we need to fix this in 10 minutes") and you lack the deeper understanding of the framework to even know where to start.

Or even worse, you insert an insidious security issue through a misconfiguration and you are not even aware you have been owned. Security is notoriously difficult to get right, even for people with experience in frameworks and systems, let alone a newbie. Kubernetes is not "secure by default" and again, there are footguns for the unwary:

https://snyk.io/learn/kubernetes-security/

None of these things make Kubernetes bad, per se, and I'm sure the benefits outweigh the costs. But personally I would be cautious about adopting it for serious production without having some solid real-world experience first.

There's a bigger question here as well, regarding small teams (as in startups, not just pizza teams in a tech giant). Where do you want your very limited time and focus to be? If I'm building some SAAS application I want to put my coding focus close to 100% towards the business model. If that model requires me learning new tech then fine, but otherwise it's a case of "use what you know", because new tech that isn't focused on that is going to waste my precious time and resources down the line.

Re:Small Teams by tored on Thursday January 05, 2023 @06:43AM (#34258471)
Thus you wasted 1 week, you can build a prototype for a new product in that time.
Re:Small Teams by pammf on Thursday January 05, 2023 @06:52AM (#34258530)
I don’t understand all the blame that k8s get as well. Using the defaults, it can be as simple as you’ve made it; a reverse proxy load balancing multiple instances of a containerized application. I wonder what other simpler tools/solutions could be used to address scalability and high availability requirements.
Re:Small Teams by steveBK123 on Thursday January 05, 2023 @07:34AM (#34258832)
Because managers read about k8s and then mandate it for much more complex apps than "a self contained CRUD website / dockerized 3 microservices behind a load balancer"
Re:Small Teams by kasey_junk on Thursday January 05, 2023 @07:18AM (#34258704)
The “old fashioned” way of doing that would be to just have some base images and init scripts running on vms with a load balancer.

That will scale a small number of containerized services just as readily as kubernetes and will have a lot less moving parts.

Where a more robust container orchestration system shines is when you have many disparate teams deploying disparate workloads and need to encode conventions around things like networking, service discovery and security policies.

Re:Small Teams by danjac on Thursday January 05, 2023 @07:32AM (#34258814)
Or use a PAAS (Fly.io, Render, maybe even Heroku I guess) if you just want to get your MVP out there while you focus on your product and business.
Re:Small Teams by pammf on Thursday January 05, 2023 @05:09PM (#34267566)
I think that the level of complexity to set it up is not far below and you would miss some features that you get out of the box with k8s: - Proper monitoring of the health of the instances (simple load balancer health probes rely only on ports listening, which is quite brittle) - Dynamic resource management I.e. does this vm have enough cores/memory to host this number of application instances - Centralized/automatic port mapping. If your app listens on port 5678 for example, to be able to run more than one instance in a single vm you need to map it to different host ports and keep your load balancer configuration up to date with that.
Re:Small Teams by kasey_junk on Friday January 06, 2023 @01:18PM (#34278655)
You will definitely add complexity if you want to run multiple app instances per node. I do not view that as particularly compelling for any runtime that supports concurrency out of the box in a virtualization environment.

As for health probes, I worked with load balancers in the late 90s that could use endpoint health checks so I’m not sure what you mean.

Re:Small Teams by pammf on Saturday January 07, 2023 @08:49AM (#34287926)
I think it’s compelling from a scalability perspective given that deploying one OS for each app instance you want is quite wasteful and increase entropy: deploying from a single image doesn’t guarantee the os won’t change over time, and if you have 100 instances, keeping all of them consistent will require solutions that will inherently increase the overall complexity, which is the main argument against k8s.

Regarding the endpoint health probes, I agree that’s possible if you have an app with a call that’s lightweight and representative enough to be used for that. But again, we are already deviating from the “pretty simple” solution here as well.

And we didn’t even start talking about how to make the Load Balancer highly available…

That said. I agree that the solution you’ve mentioned is a feasible one, I just don’t think that it’s way simpler than k8s if you truly have more demanding scalability and availability requirements.

Re:Small Teams by nine_k on Thursday January 05, 2023 @08:32AM (#34259306)
Would you save a week if you just ran it from 2 boxes behind a HAProxy / ELB?

Would it save more if you did not choose microservices, but wrote a monolith (for purposes of deployment) neatly divided into modules (for purposes of architecture and splitting the work)?

I'm not assuming positive answers. But I know that current hardware is absurdly performant, and you can serve a surprising number of real users from a $60/mo instance, plus some database.

(Managing monoliths via k8s is a thing though, and it works reasonably well.)

Re:Small Teams by gloosx on Friday January 06, 2023 @05:06AM (#34272979)
Yeah, I mean my prior level was - spin up a single EC2 instance and do all the dirty stuff there, or just throw everything at vercel interfaces. In a short timespan I was able to learn how to spin up some kind of alien future technology servers. I don't need AWS Elite Certificate now to be able to navigate their bulky GUIs. I don't even need the GUIs or some hefty cli multiliners, just some very clean and declarative .yaml configs in the dark vasts of my vim, and it spins up. Next level stuff.