Member-only story
Microservice Architecture: Sidecar Pattern
In a microservice architecture, it’s very common to have multiple services/apps that often require common functionalities like logging, configuration, monitoring & networking services. These functionalities can be implemented and run as a separate service within the same container or in a separate container.
Implementing Core logic and supporting functionality within the same application:
When they are implemented in the same application, they are tightly linked & run within the same process by making efficient use of the shared resources. In this case, these components are not well segregated and they are interdependent which may lead to failure in one component and can in turn impact another component or the entire application.
Implementing Core logic and supporting functionality in a separate application:
When the application is segregated into services, each service can be developed with different languages and technologies best suited for the required functionality. In this case, each service has its own dependencies \libraries to access the underlying platform and the shared resources with the primary application. It also adds latency to the application when we deploy two applications on different hosts and add complexity in terms of hosting, deployment and management.