Sunday, 25 October 2026

Sidecar Pattern

Sidecar Pattern: Introduction

The sidecar pattern is a bit like "aspects" in aspect-oriented programming.  

So your primary application with core functionality runs in its own bubble, and your "sidecar" deals with peripheral tasks (like logging, performance measurement, proxying to remote services). 

Sidecars can be written in a different language to the primary application. 

The most common implementation of this pattern is in containers, where you have sidecar containers, also known as sidekick containers.

Sidecars in Kubernetes

Sidecars in Kubernetes are secondary containers that run along with the main application container within the same pod. These containers enhance or extend the functionality of the primary app container providing services like logging, monitoring, security or data synchronization without altering the main app code.

They can be started and stopped independently of the main container.

Further details, including notes on sidecars and pod lifecycle, can be found on the kubernetes docs website.

No comments: