API gateways for microservice-centric applications

The unique contributions of API gateways for operationalizing microservices in a beneficial fashion are growing as days pass. The main features of an API gateway are  the following:

  1. Adds flexibility: API gateways are supposed to hide internal concerns from external clients. An API gateway decouples external APIs from internal microservice APIs. This abstraction facilitates the addition, replacement, displacement, and substitution of advanced microservice implementations in place of legacy ones. The APIs of internal microservices can be changed without affecting the requesting microservices. Services can be freshly registered and referenced in a service registry or repository. The service discovery of newer services can be smooth and error free. Services can be versioned.
  2. Adds an additional layer: As microservices are not contacted directly, the security of services is greatly strengthened. Through using an API gateway, it is possible to stop all kinds of malicious attacks on internal microservices. Every microservice has its own data store. Thus, not only service security but also data security is enabled. Through rate limiting/throttling offered by API gateways, distributed DoS attacks can be thwarted easily.
  1. Enables support for data and protocol translation: There are disparate data transmission and communication protocols. There are synchronous and asynchronous communications and their corresponding protocols. Besides HTTP, there are other protocols such as ProtoBuf (https://developers.google.com/protocol-buffers/docs/reference/overview), AMQP (https://www.amqp.org), COAP, and more, for integrating with third-party applications and services in order to produce and sustain integrated applications. This is the essence of API gateway solutions. Precisely speaking, all the common capabilities of microservices are safely abstracted and incorporated into API gateways. The idea is to have the business logic in any microservice implementation. This best practice keeps microservices simple and easy to manipulate. All the security, networking, third-party integration, adding volumes, fulfilling QoS attributes, and other cross-cutting concerns are accumulated together and accomplished through API gateways, which act as a centralized and clustered middleware solution.

The following diagram illustrates how an API gateway solution links microservices with service clients:

Essentially, the API Gateway is a reverse proxy to microservices and serves as the single point of contact for the growing list of clients to enter into the system. This implements the age-old facade pattern for the microservice era. Further on, API gateway solutions simplify and standardize API design, implementation, and management. The consistency of microservices, their instances, and the software infrastructure is ensured. Because of this consistency, it is quite easy to establish and enforce the service level and security requirements of microservices. Formulating and firming up policies at different layers and levels of the system stack become vital for the intended success of microservice architecture. The gateway ultimately helps to address the key challenges and concerns such as security, caching, monitoring, and much more. It can handle heterogeneous clients, multiple backend microservices, and their instances. Service discovery is automated through the API gateway. The following diagram shows various features and functionalities of an API gateway solution:

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

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