4 ms·
This is really a book ad. So, what's going on here, I think, is that you have some microservices which call each other. Each microservice is apparently put in
by Animats 6y ago
This is really a book ad.
So, what's going on here, I think, is that you have some microservices which call each other. Each microservice is apparently put in a container to avoid dependency issues. Now you have a network overhead problem if the containers are on different machines, so there's something called a "pod" to make them run on the same machine. This is what the author calls a "sidecar". The author may be tangled in his own jargon. Cloudflare says a "sidecar" is another container inside a "pod", but one that is for some auxiliary function rather than being one of the main microservices doing the work. Hence the name "sidecar". The link in the article for "sidecar" is to the author's book, so you have to pay to find out for sure.
Now you have to connect up the messaging, start, stop, and update things, scale to multiple instances and machines, log, and monitor. So you need an orchestration system of some kind. The "operator" decides what to do, and the applications and the Kubernetes system, via the Kubernetes operator API, do it. The "operator" is shoved into the "pod" as a "sidecar".
Since making an operator that does the right thing is a hard problem, there's quite a collection of buzzword-intensive products to do some part of that job.
A better explanation is in the Kubernetes documentation.[1]
Did I get this right?
(About 15 years ago, I had to write something which did this sort of thing for QNX real time programs for a robot vehicle. Had to deal with things like inserting monitoring into a message passing system. The Robot Operating System (which is not an OS, it's a message management layer on top of Linux) does something similar. Now it's gone mainstream. Does it make things easier or harder?)
[1] https://kubernetes.io/docs/concepts/extend-kubernetes/operator/ https://kubernetes.io/docs/concepts/extend-kubernetes/operat...
- NicoJuicy 6y ago> Since making an operator that does the right thing is a hard problem An API that sets a cookie. According to the cookie, connect to the correct "instance". No?
- marmaduke 6y ago> The "operator" is shoved into the "pod" as a "sidecar" I didn't really follow this part, since the operator should be running on the master nodes as a k8s extension, not in the pod which it manages. btw, I don't thing the k8s docs does a good job of explaining why one would do this much less push someone think that way. The article might be just a long ad but at least it pushes you to think about it.
- seneca 6y ago> I didn't really follow this part, since the operator should be running on the master nodes as a k8s extension, not in the pod which it manages I agree it should be separate, but operators in no way need to run on k8s masters.
- ragebol 6y ago> Robot Operating System ... Does it make things easier or harder? Some things. Pub/sub over ROS topics makes it easy to introspect and check on what is being published, why which node and at what frequency, bandwidth, who is subscribed etc. For orchestration there are launch files that can also start ROS node son other machines in the network.
- barrkel 6y agoSidecars are extra containers that run alongside the main container in a pod. Both sidecars and pods are k8s jargon terms. Pod is what k8s calls a running image, a container in Docker lingo. Pods have metadata like resource claims that k8s uses for scheduling. The point of the article is a bit like the distributed system analog of aspect oriented programming. A typical problem might be that you want all your network communications to be encrypted, but you don't want to configure SSL for every service, because the libraries are all different, configuration files to point at rotating certificates are all different, etc. So instead you run an SSL proxy in a sidecar, and make the traffic go through that instead. You sort of bolt on extra horizontal functionality onto your existing set of services. Operators are slightly orthogonal IMO. I think the core pattern of k8s, the control loop, is great for operational resilience, but it's a bit alien to many existing bits of software, so operators are the glue which converts an otherwise high-maintenance service into the control loop idiom. I think the article does have a point, it points to a unifying theme for writing apps for k8s, and it's not necessarily just a book ad.
- kasey_junk 6y agoCorrection: a pod in Kubernetes is a collection of running containers deployed on the same host at the same time.
- barrkel 6y agoSure. And sidecars share a bunch of things with the main container. I am simplifying in an inexact handwavey way. You should still think of a pod as primarily a single container, and design deployment around that.
- commandlinefan 6y agoI definitely read every word of that post and still haven't got the slightest clue what it was talking about.
- rumanator 6y ago> Now you have a network overhead problem if the containers are on different machines, so there's something called a "pod" to make them run on the same machine. This is not correct. A pod is a collection of processes which share the same life cycle. They are expected to scale simultaneously, shut down simultaneously, and restarted simultaneously. > This is what the author calls a "sidecar". The author may be tangled in his own jargon. This assertion is also quite wrong, and appears to sprout from your misconception of what a pod is. The concept of a sidecar is very old and well established. A sidecar is a process that is designed to run alongside a master application to augment or offload is functionalities. You can define a pod so that one process is the master application and one or more applications are sidecars. There is no overlap or misconception. > Cloudflare says a "sidecar" is another container inside a "pod", but one that is for some auxiliary function rather than being one of the main microservices doing the work. Hence the name "sidecar". The link in the article for "sidecar" is to the author's book, so you have to pay to find out for sure. The concept is decades old, probably older than you and me. No need to depend on Cloudflare or the author's books to check that out.
- manigandham 6y agoNo you didn't get this right, although I'm sure you do know what the right explanation is and are exaggerating for effect. Operators and sidecars are definitely not the "new model" but a pretty old concept with various names and are effective for what they do. You can simply call it a layer of abstraction, the same way NGINX can serve as a reverse proxy to abstract authentication and load balancing while your app just serves HTTP requests.