Organisations should use an API gateway when the primary need is to manage client to service communication, centralise cross cutting concerns, and support distributed or microservice based delivery. An ESB can still serve legacy integration needs, but the gateway is better suited to leaner, API first systems where discovery, policy enforcement, orchestration, and lifecycle management matter most.
How to choose the right integration layer for the job
The first decision is architectural intent, not product category. An api gateway is strongest when you need a consistent front door for many clients, uniform policy enforcement, and a clean separation between consumers and backend services. A legacy ESB is usually justified when the problem is enterprise integration across heterogeneous systems, message transformation, protocol mediation, and central orchestration of older application flows.
That distinction matters because the control point changes. A gateway is designed to govern inbound API traffic at the edge, while an ESB often sits deeper in the integration fabric and can become a heavy dependency if it is used for every interaction. In modern architectures, the better choice is usually the one that matches the dominant communication pattern, rather than the one that can technically do more.
For teams evaluating API-led delivery, OWASP API Security Top 10 is a useful lens because it reflects the kinds of failures that gateways are often asked to help reduce, including broken authorisation and API abuse. When the main issue is protecting exposed interfaces, the gateway is the more natural control plane.
When a gateway is the better fit than an ESB
Use an API gateway when the system is organised around services that are discovered and consumed through APIs, especially in microservice, platform, or partner-facing environments. The gateway helps centralise authentication hooks, request routing, throttling, schema-aware validation, and policy enforcement without forcing all integration traffic through a single enterprise bus.
That is particularly valuable when different clients need different access rules, when you want to standardise observability at the edge, or when backend services are intentionally kept small and independent. A gateway also suits organisations that want to iterate on services faster, because it reduces coupling to a central integration layer that can become a release bottleneck.
A gateway is also easier to justify when the architecture is already designed around least privilege and bounded exposure. NIST SP 800-207 Zero Trust Architecture aligns with that model because it treats each request as something that must be explicitly verified and constrained, which is consistent with API-first systems. In practice, that makes the gateway the better enforcement point for modern client-to-service traffic.
When a legacy ESB still makes sense
An ESB remains useful when the organisation still has to integrate packaged applications, mainframe-adjacent systems, asynchronous messaging, or complex data transformations that were built around central mediation. In those environments, the ESB can reduce friction by translating protocols, normalising payloads, and coordinating long-lived workflows that do not map cleanly to simple request-response APIs.
The risk is using an ESB as a default integration pattern for new digital services. That often creates hidden coupling, heavier governance overhead, and a central point where all change requests accumulate. If the new architecture is meant to be modular and independently deployable, forcing it through an ESB can undo much of the benefit of service decomposition.
Where the integration problem is dominated by transformation and hub-style orchestration, the ESB may still be the right tool. Where the problem is exposure of well-defined APIs to clients, partners, or internal apps, the gateway is usually the more direct and maintainable fit.
Risk and Threat Considerations
The main security risk is choosing a layer that matches the old operating model but not the threat model of the new architecture. A gateway can become a choke point if it is overloaded with business logic, but an ESB can create a much larger blast radius when it concentrates transformations, credentials, and routing for many downstream systems.
Failure mechanism: Over-centralising integration makes one platform responsible for too many trust decisions, which increases the impact of misconfiguration, privilege errors, and abuse of shared interfaces.
Impact: Attackers or internal users who reach that layer may gain broader access than intended, while defenders also inherit a single high-value dependency that is harder to segment, monitor, and evolve safely.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP API Security Top 10 addresses the attack and risk surface, while NIST Zero Trust (SP 800-207) sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP API Security Top 10 | API5 — Broken Function Level Authorization | Gateway choice often hinges on controlling exposed API actions. |
| API1 — Broken Object Level Authorization | API gateways are used to reduce object access abuse in client-service APIs. | |
| API8 — Security Misconfiguration | The gateway-vs-ESB decision is partly about where to centralize safe policy enforcement. | |
| Recommendation — Enforce function-level authorization at the API edge. Validate object-level access checks on every API request. Harden gateway defaults and remove unsafe route or policy settings. | ||
| NIST Zero Trust (SP 800-207) | Zero Trust Architecture | API gateways support explicit verification and least-privilege request handling. |
| Recommendation — Place policy enforcement where requests can be continuously verified. | ||
Practitioner Guidance
What to prioritise: Decide based on the dominant workload pattern, not vendor terminology. If the architectural goal is API exposure, client policy enforcement, and service autonomy, start with a gateway. If the real requirement is enterprise mediation across legacy systems, keep the ESB in the conversation.
What to verify: Check whether the candidate platform is being asked to do routing and policy enforcement only, or whether teams are also loading it with transformation, orchestration, and integration logic. The more “other jobs” it takes on, the more likely it is becoming an architectural liability rather than an enabler.
Practitioner takeaway: The best choice is the layer that fits the natural shape of the traffic. Gateways optimise modern API control, while ESBs optimise integration of legacy complexity, and problems appear when one is forced to impersonate the other.
Related resources from NHI Mgmt Group
- How do organisations decide when to use a shared AI gateway instead of relying on per-seat subscriptions alone?
- When should organisations use gateway measurement instead of application measurement?
- How should organisations decide whether to use a gateway and an evaluation workflow together?
- How do organisations decide whether an MCP gateway belongs in their identity architecture?