-
Book Overview & Buying
-
Table Of Contents
Microservices Design Patterns in .NET - Second Edition
By :
Microservices promise autonomy, agility, and scalability, but these promises come with a cost: complexity. Each service must handle not only its domain logic but also concerns such as logging, monitoring, configuration, and communication with other services. Embedding all these responsibilities into every microservice leads to bloated code, duplication, and consistency challenges.
The Sidecar pattern was created to address cross-cutting concerns by enabling reusability, clear separation of duties, and increased resilience. It involves auxiliary components that operate in a separate process or container, yet run closely with the main service. The name “sidecar” is derived from motorcycles, where a small car is mounted on the side of a bike. Analogously, a sidecar process is connected to the primary service, sharing its life cycle and environment while maintaining distinct responsibilities.
In practice, a sidecar is typically implemented...