In order to deal with the microservice architecture, it's often used alongside a Reverse Proxy (such as nginx or apache httpd) and for cross cutting concerns implementation API gateway pattern is used. Sometimes Reverse proxy does the work of API gateway.
It will be good to see clear differences between these two approaches. It looks like the potential benefit of API gateway usage is invoking multiple microservices and aggregating the results. All other responsibilities of API gateway can be implemented using Reverse Proxy. Such as:
- Authentication (It can be done using nginx LUA scripts);
- Transport security. It itself Reverse Proxy task;
- Load balancing
- ...
So based on this there are several questions:
- Does it make sense to use API gateway and Reverse proxy simultaneously (as example request -> API gateway -> reverse proxy(nginx) -> concrete microservice)? In what cases ?
- What are the other differences that can be implemented using API gateway and can't be implemented by Reverse proxy and vice versa?