From the course: Microservices: Design Patterns
Unlock the full course today
Join today to access over 24,600 courses taught by industry experts.
Sidecar pattern
From the course: Microservices: Design Patterns
Sidecar pattern
- The sidecar pattern is used to offload processing of some kind to a separate module. With the sidecar pattern, you deploy the sidecar as a module associated with every applicable microservice in your system in order to offload the processing through a single code path in an isolated process. The sidecar pattern is more about removing repetitive code across services than anything else. The reason that it is helpful in a microservices architecture is things like logging, monitoring, and network services can be offloaded to a separate module. So essentially, the problem we are solving is repeating code paths that don't have to be accomplished through repeating code. The details of this design are actually very straightforward. You start with the process itself. The key here is you need to write the module specific enough for your immediate needs while being generic enough for other parts of your system. This really is the hardest part of sidecars because you have to be willing to get…