Microservices Design Patterns - Proxy



Problem Statement

Microservice architecture structures an application as a set of loosely coupled microservices and each service can be developed independently in agile manner to enable continous delivery/deployment. When a large, complex application is to be built using microservice architecture, we often need to prepare a unified interface which can do the common work like authentication and authorization before each service call.

Solution

Proxy microservice pattern is a variation of the aggregator model. In this model we will use proxy module instead of the aggregation module. Proxy service may call different services individually.

Proxy Pattern

In Proxy pattern, we can build one level of extra security by providing a dump proxy layer. This layer acts similar to the interface.

Advantages

  • Proxy pattern provides a uniform interface instead of different interface per microservice.

  • Proxy pattern allows to apply uniform concerns like logging, security etc at one place.

Advertisements