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. I will still try to list them in points as the pros of the API Gateway.

Pros:

  • Microservices 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
  • It 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

In addition to the preceding mentioned pros, some of the trade-offs are also to use this pattern.

Cons:

  • It can cause performance degradation due to lots of happenings on the API Gateway
  • With this, the 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

So, before using the API Gateway, both of the aspects should be considered. The decision to include the API Gateway in the system increases the cost as well. Before putting effort, cost, and management into this pattern, it is recommended to analyze how much you can gain from it.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset