What is a sidecar in the context of microservices?

8/23/2017

I'm currently looking through an Istio and Kubernetes talk and mention the management of services along with the use of sidecars. I'm not sure what that is.

-- richard_d_sim
istio
kubernetes
microservices

2 Answers

8/23/2017

I think of them as helper containers. A pod can have 1 or more containers. A container should do only one thing, like a web server or load balancer. So if you need some extra work to be done inside the pod, like github sync or data processing, you create an additional container AKA sidecar.

-- rod
Source: StackOverflow

9/26/2017

The best (original?) description of the "Sidecar"-pattern I know of is from Brendan Burns and David Oppenheimer in their publications on "Container Patterns for Distributed Systems". Check out the paper + slides here: https://www.usenix.org/conference/hotcloud16/workshop-program/presentation/burns

There are other design patterns too, like "Ambassador" or "Adapter". I'm not really sure whether the istio implementation is really a sidecar in the way they describe it there, but anyway I think that's where the term originates from.

-- Florian Georg
Source: StackOverflow