The sidecar design pattern
The sidecar design pattern is an extremely useful one. It is good for when you want to extend the features of your main containers with features it would normally not be able to achieve on its own.
Just like we did for the ambassador container, we're going to explain exactly what it is by covering some examples. Then, we're going to discover some concrete examples.
What is the sidecar design pattern?
Think of the sidecar container as an extension or a helper for your main container. Its main purpose is to extend the main container to bring it a new feature, but without changing anything about it. Unlike the ambassador design pattern, the main container may even not be aware of the presence of a sidecar.
Just like the ambassador design pattern, the sidecar design pattern makes use of at least two containers:
- The main container, the one that is running the application
- The sidecar container, the one that is bringing something...