RoutingAn API gateway provides a single address to clients and takes care of routing client requests to an appropriate service. For example, a market data service that publishes hundreds of services through an API gateway that can be accessed via a single domain name. The gateway performs a mapping between a requested URL and services.
DecouplingRouting decouples clients and services. This may allow you to change your services without impacting clients.
Load BalancingAPI gateways may implement load balancing whereby requests are distributed to many instances in order to achieve unlimited scale.
MicroservicesAPI gateways may connect to a wide range of API architectures. However, they are particularly associated with microservices, an architectural technique that divides functionality into small individually deployable services. Microservices are kept extremely lightweight and benefit from the ability to offload functionality to the API gateway.
CompositionThe ability to call multiple services to build a response for a single client request. This allows client interfaces to be simplified and designed for client needs while allowing implementation to be decomposed into lightweight and scalable microservices.
Latency ReductionComposition of services can be designed to reduce overall network latency. For example, an API gateway may allow a client to make a single request that results in dozens of API calls on behalf of the client by the gateway. Assuming the gateway is in close proximity to the deployed APIs this can significantly reduce total latency.
TransformationsTransforming the responses of services into a message format that is expected by a client.
Gateway OffloadingGateway offloading is the assignment of functionality to an API gateway that is common to many of your services. This allows you to keep your services lightweight and to standardize certain functionality such as authentication.
AuthenticationA gateway is client facing and must handle any required authorization and authentication of client requests.
FirewallIt is common for an API gateway to offer a web application firewall that provides network security functions such as IP whitelisting.
Rate LimitingControlling the rate at which a single client is entitled to a response in order to prevent a small number of clients from overwhelming your services.Encryption functionality such as handling SSL connections.
CompressionCompression of responses can be offloaded to an API gateway.cache responses to reduce load on APIs and improve response times. For example, an ecommerce API that returns a product description for an item id may safely cache these responses for several hours as this information doesn't change often.
MonitoringAs a central controller for a variety of API services, an API gateway is a natural place to monitor your APIs for performance, security and SLA management purposes. audit trail.integrated with an analytics tool.
|Overview: API Gateway|