Pros and cons of API Gateway
Using the API Gateway itself has its own pros and cons.
In the previous section, we have described the advantages of using the API Gateway already.
Pros
Microservice can focus on business logic
Clients can get all the data in a single hit
Authentication, logging, and monitoring can be handled by the API Gateway
Gives flexibility to use completely independent protocols in which clients and microservice can talk
It can give tailor-made results, as per the clients needs
It can handle partial failure
Addition to the preceding mentioned pros, some of the trade-offs are also to use this pattern.
Cons
It can cause performance degrade due to lots of happenings on the API Gateway
With this, discovery service should be implemented
Sometimes, it becomes the single point of failure
Managing routing is an overhead of the pattern
Adding additional network hope in the call
Overall. it increases the complexity of the system
Too much logic implementation in this gateway will lead to another dependency problem