02.1 ° Service 02 / API · Gateway

API gateway.
One entry point,
clear rules.

An API gateway accepts the calls to your APIs in one place, checks access and load, and forwards them to the backend systems. We implement API gateways, configure routing and policies, and support the migration of existing gateways. For a lottery company, we set up the Anypoint Platform so that the policies were in place before the first API needed them.

Tagline Routing · OAuth 2.0 · JWT · mTLS · Rate Limiting · Policies
° dl / service-02.1
° Overview · API gateway

What is an API gateway, and which tasks does it take on?

An API gateway is the component between the consumers of an API and the backend systems. It forms the shared entry point for all calls and takes on what every API would otherwise have to solve individually. That includes checking access, limiting load, and forwarding and logging calls.

Technically, an API gateway is a reverse proxy with additional tasks. The HTTP standard RFC 9110 uses both words for the same role. What is meant is an intermediary that acts like the actual server toward the client and forwards the requests inward. An API gateway builds on that. It knows the APIs behind it, maps every call to an API and a calling application, and applies the rules that hold for this combination. The backend systems stay hidden from the clients and can evolve without the address of the API changing.

The API gateway pattern in microservices architectures

In a microservices architecture, the API gateway pattern describes a single entry point for all clients. A client addresses the gateway and does not need to know the individual services. The gateway forwards the call to the responsible service or calls several services and combines their responses. One variant is the Backend for Frontend (BFF) pattern, in which each type of client, such as a web application and a mobile app, gets its own gateway with a matching API.

Which tasks an API gateway bundles

The benefit lies in the bundling. TLS termination, authentication, rate limiting, response caching, and logging are solved once at the gateway and apply to every API behind it. The teams of the individual services concentrate on the business logic. A project for a lottery company shows how these tasks work together. There, the APIs for mobile apps and the online shop are secured with OAuth 2, and caching sits in front of the resource-intensive backend calls. The cache answers recurring queries when many customers retrieve their tickets at the same time as the results are announced. Details are in the case study.

API gateway architecture and where the gateway sits

An API gateway sits at the boundary between two zones, the clients outside and the services inside. A load balancer is often placed in front of it and distributes the calls across several gateway instances, so the failure of one instance does not interrupt traffic. We know this redundancy from operations. For a booking portal, the MuleSoft runtimes ran in HA mode, and we applied security patches instance by instance during ongoing operation. A gateway can run as a standalone service, in a container, on Kubernetes, or as a service of a cloud provider. Which form fits depends on where your APIs run and who operates the gateway.


° Four tasks

What an API gateway handles on every call.

Every call passes through the same stages at the gateway. We align the configuration of an API gateway with these four tasks.

01

Routing

The gateway maps every call to an API based on host, path, or header and forwards it to the responsible backend. Clients only know the address of the gateway.

02

Authentication

Credentials such as OAuth 2.0 access tokens, JSON Web Tokens, or client certificates with mTLS are checked before a call reaches the API.

03

Rate limiting

Quotas define how many calls an application may send per time window. The gateway answers anything beyond that with status code 429.

04

Logging

The gateway sees every call. It delivers access logs, metrics, and trace context to your monitoring, uniformly for all APIs behind it.

° Platform · Building blocks

What we build at the API gateway

Six building blocks that come up when implementing and configuring an API gateway, from token validation to the load test.

°01 · Access
OAuth 2.0
The gateway validates the access token of every call, either by the signature of a JSON Web Token or by querying the authorization server.
OAuth 2.0 · JWT · JWK Set · Token Introspection
°02 · Routing

Routes, versions, environments

We define which path leads to which backend, how versions of an API remain reachable side by side, and how test and production differ.

°03 · Load protection

Rate limiting per application

Quotas per application and API protect the backends. Above the limit, the gateway responds with 429 and can state the waiting time in the Retry-After header.

°04 · Certificates
mTLS
With mutual TLS, the client also identifies itself with a certificate. The gateway checks it when the connection is established, for example for partner integrations.
°05 · Policies

CORS, IP lists, caching

Rules for browser access, permitted networks, and cached responses are created as policies at the gateway. The code of the API remains untouched.

°06 · Evidence
Load tests
Load tests reproduce expected peaks in advance. For a lottery company, we did this with JMeter and Gatling ahead of the announcement of the results.
° Requirements and standards that touch an API gateway
As of November 2026
NIS2
Policies for cryptography and access control (Art. 21)
GDPR
Security of processing (Art. 32)
OWASP API
Top 10 2023, including authentication and resource consumption
RFC 9700
Best Current Practice for OAuth 2.0 security
RFC 8705
Mutual TLS for OAuth clients, certificate-bound tokens
BSI TR-02102-2
Recommendations of the German Federal Office for Information Security (BSI) on the use of TLS
° In context · Terms
As of 2026  ·  3 min read

API gateway, reverse proxy, load balancer, and ESB, the terms compared.

Around the API gateway, there are terms that are often mentioned in the same breath. They denote components that each have their own task and usually work side by side in an architecture. This overview shows what each one stands for and how they complement one another.

01

API gateway, load balancer, reverse proxy, and ingress

A load balancer distributes incoming connections across several instances of a service. A reverse proxy accepts requests on behalf of the servers behind it and forwards them. An API gateway is a reverse proxy that knows the APIs behind it, maps every call to an API and an application, and applies rules for access and quotas. In an architecture, the components are arranged one behind the other, often with a load balancer in front of several gateway instances.

In Kubernetes, an Ingress governs access from outside to the services in the cluster, usually over HTTP. The Kubernetes Gateway API has a similar name and a different role. It is an interface made up of Kubernetes resources that describes network access to services, and some API gateways can be configured through it. A web application firewall applies rules to HTTP traffic in order to detect attack patterns such as SQL injection. It complements the gateway, which checks identity and quotas. More on this is in the article Web Application Firewall.

02

API gateway vs ESB, what is the difference?

An enterprise service bus (ESB) is an architecture pattern in which a central component handles the integration between applications. It transforms data models, routes messages, translates protocols, and composes several calls into one flow. An API gateway works one layer in front of that. It exposes finished interfaces in a controlled way, checks access and load, and passes the call on. The difference between an API gateway and an ESB lies in the task. The ESB connects systems, while the gateway governs access to their interfaces.

The two complement each other. In our projects, an integration layer does the work on the existing systems. For a payment provider, it translated between IDoc and JSON, and at an energy utility, it communicates with SAP IS-U and S/4HANA Utilities via OData and RFC. Whether an API comes from such a layer or from a single service is irrelevant to the gateway. It governs access. The API Design & Architecture page describes how we design such layers based on API-led connectivity on the Anypoint Platform.

  • °
    API gateway   Governs access to interfaces with routing, authentication, rate limiting, and logging.
  • °
    ESB   Connects systems by transforming data models, routing messages, and translating protocols.
03

API gateway and API management, runtime and administration

The API gateway is the runtime component that processes every call. API management is the broader term. Besides the gateway, it includes a management layer in which APIs and policies are maintained, and a portal where developers find the APIs and obtain access. The gateway enforces what has been defined there. The API Management page describes how lifecycle and governance are organized, and the API Portal page covers the catalog for the consumers.

On MuleSoft's Anypoint Platform, this division is easy to see, because API Manager manages the policies and the gateway in the Mule runtime or Omni Gateway (formerly Flex Gateway) enforces them. For a lottery company, we set up the platform so that the policies were in place before the first API needed them and so that the APIs are documented and discoverable in Anypoint Exchange. The API Management & Security page covers policies and gateways on Anypoint.

°Best practices and selection criteria

Six principles
for an API gateway.

This is how we work when we implement an API gateway or review an existing one. The principles also serve as criteria for judging whether a gateway fits your architecture.

01 Role

The gateway governs access.

Routing, authentication, and quotas sit at the gateway. Business logic and extensive transformations stay in the services or in the integration layer behind it.

02 Policies

Rules come before the first API.

Which policy applies to which API is defined before the first interface goes live. This is how we set up the Anypoint Platform of a lottery company.

03 Configuration

Every change takes the same path.

Routes and policies are kept as configuration in version control and reach the environments through the pipeline. That keeps a traceable record of what was changed and when.

04 Identity

The identity provider remains authoritative.

The gateway validates tokens, and the identity provider issues them. For the apps and online shop of a lottery company, we connected the SSO provider for this purpose.

05 Observability

The gateway feeds your monitoring.

Access logs, metrics, and trace context go to the system you already operate. The IT Monitoring page shows how APIs become visible there.

06 Availability

Several instances, tested load.

A gateway runs in several instances so that the failure or maintenance of one instance does not interrupt traffic. Load tests show in advance how it behaves under peaks.

° Stack & tools

Standards and tools for the API gateway

Standards that the configuration of an API gateway builds on, along with platforms and tools from our projects and their surroundings.

01

Gateways & platforms

Anypoint PlatformAnypoint API ManagerMule GatewayOmni GatewayCloudHub 2.0KongApigeeAzure API ManagementAWS API GatewayKubernetes Gateway APINGINX
02

Access & standards

OAuth 2.0OpenID ConnectJSON Web TokenJWK SetmTLSTLS 1.3CORS
03

Testing, delivery & monitoring

JMeterGatlingKarateJenkinsGitLab CI/CDOpenTelemetryCheckMKLogPoint
° Approach

From assessment to a production API gateway

Four steps, from taking stock of your APIs to the handover to your team. A gateway migration follows the same order.

01

Assessment

Take stock of APIs, calling applications, identity providers, and infrastructure. Record the requirements for access, load, and operations.

02

Target architecture

Define the placement of the gateway, the routes, and the policies per API. Document the criteria for selecting a gateway.

03

Setup

Configure the gateway, connect the identity provider, and onboard the first APIs. Verify the behavior with integration and load tests.

04

Cutover & handover

Move further APIs to the gateway step by step, route by route. Documentation and knowledge go to your team.

° From our projects
Policies
set up before the first API,
Anypoint Platform, 2016 to 2017
OAuth 2
APIs for the apps and online shop
of a lottery company
HA
runtimes of a booking portal,
patches during ongoing operation
Load tests
with JMeter and Gatling ahead of the
announcement of the results
° Frequently asked questions about the API gateway

Questions and answers on the API gateway.

01 What is an API gateway?

An API gateway is the component between the consumers of an API and the backend systems. It accepts all calls in one place, checks credentials, enforces rules such as rate limits, forwards calls to the responsible backend, and logs the traffic. For the clients, this means a single entry point, regardless of how many services run behind it.

02 What is the difference between an API gateway and an ESB?

An enterprise service bus connects systems by transforming data models, routing messages, and translating protocols. An API gateway governs access to finished interfaces and checks which application may call an API and how often. The two fulfill different tasks and work together in many architectures, with the integration layer behind the gateway.

03 Which criteria do you use to select an API gateway?

Your own architecture is the deciding factor. Where do the APIs run, in your own data center, in the cloud, or on Kubernetes? Which identity provider is in place, which policies are needed, how is the gateway configured and delivered, and who operates it? This also determines whether open source software or a commercial product fits and whether you operate the gateway yourself or obtain it as a service. For a lottery company, we supported a middleware evaluation based on this principle. The requirements and criteria were settled first, and the comparison followed.

04 How does an API gateway check access with OAuth 2.0 and JWT?

The client sends an access token that an authorization server has issued. If it is a JSON Web Token, the gateway verifies the signature with the public key of the issuer, which it usually obtains through a JWK Set, along with claims such as expiration time and audience. It has other tokens checked by the authorization server through token introspection (RFC 7662). Our articles on OAuth 2.0 and JSON Web Token explain the fundamentals.

05 What is the difference between rate limiting and throttling at the API gateway?

Rate limiting defines how many calls are permitted in a time window. Anything beyond that is rejected, with status code 429 according to RFC 6585. Throttling usually refers to slowing calls down, where they are delayed or queued instead of rejected. Vendors do not use the two terms consistently. The question behind them matters more, namely whether an agreed quota is to be enforced or a backend is to be protected from load peaks.

06 Who implements an API gateway, and how does a migration work?

dataliquid implements API gateways, configures routing and policies, and supports the switch from one gateway to another. Our project experience comes mainly from MuleSoft's Anypoint Platform, which we have worked with in client projects since 2016. We also work with the widely used gateways of other vendors, including Kong, Apigee, Azure API Management, and AWS API Gateway. In a migration, we first take stock of the routes, policies, and connected applications of the existing gateway. The APIs are then moved step by step, so the old and the new gateway work side by side during the transition period.

API gateway

Let's talk about your API gateway.

In the initial call with an engineer, we discuss your APIs, the existing infrastructure, and a sensible next step.

01 Submit a request
* Required field
Topic
Encrypted transmission · TLS 1.3