Patterns
35 items
35 items
Per-service auxiliary processes for cross-cutting concerns
The Sidecar pattern deploys helper functionality in a separate container alongside your main application container. The sidecar handles cross-cutting concerns like logging, monitoring, configuration, networking, and security without modifying the main application. This enables polyglot architectures (any language gets the same capabilities), consistent infrastructure features across services, and separation of concerns. Service meshes like Istio and Linkerd use sidecars extensively. The pattern trades deployment complexity for operational consistency.
Sidecar provides capabilities regardless of main app language. Java, Go, Python all get same logging, tracing, mTLS. No need to reimplement in each language.
Application developers focus on business logic. Platform team maintains sidecar. Clear boundary between application and infrastructure.
Sidecar intercepts traffic. Application calls localhost, sidecar handles routing, retries, TLS. No code changes needed.
Each pod runs additional container. Memory and CPU cost per sidecar. Thousands of pods = thousands of sidecars.
Traffic goes through sidecar proxy. Adds milliseconds per request. For high-performance apps, this matters.
Issues could be in app or sidecar. More components to troubleshoot. Need good observability.
Common Sidecar Use Cases:
| Aspect | Advantage | Disadvantage |
|---|---|---|