From the GoReplay team

GoReplay reproduces production bugs. Proof catches them before production.

See Proof
Published on 9/28/2026

What Is API Gateway: Architecture and Core Features

What Is API Gateway: Architecture and Core Features

An API gateway is a centralized reverse proxy between clients and backend microservices, handling routing, authentication, rate limiting, and other cross-cutting concerns. The API gateway market was estimated at about USD 5.21 billion in 2025, with one projection reaching USD 6.29 billion by 2033, although another forecast puts the market at USD 22.50 billion by 2034, a reminder that market estimates vary widely.

You’re likely dealing with the problem before you’re using the term. A web app calls one service for accounts, another for payments, a third for inventory, and several more for search or notifications. Each service has its own deployment cycle, security assumptions, and internal address. Exposing that topology directly to clients creates brittle integrations and spreads routing and authentication logic across the entire system.

An API gateway gives clients one controlled front door. It can authenticate a request, apply a policy, route traffic to one service or several, reshape the response, and record what happened. That centralization is useful, but it doesn’t make the gateway a universal answer for production testing, internal service communication, or API lifecycle management.

Understanding the Core Concept of an API Gateway

A team can start with a handful of backend services and still keep the architecture simple. As the system grows, however, a mobile client might need account data, order status, recommendations, and delivery information from separate services. If the client must know every internal endpoint, service change becomes a client release problem.

An API gateway solves that coupling by acting as a single entry point between clients and backend services. In a microservices architecture, it commonly operates as a reverse proxy. It forwards a request to one service or fans it out to several services, then returns a client-facing response without exposing the internal service map. This is the core pattern described in the API Gateway pattern documentation.

A diagram illustrating the concept of an API Gateway, showing its role as a central entry point.

What happens when a request arrives

A typical request flow looks like this:

  1. A web app, mobile app, partner, or automated client sends a request to the gateway’s public endpoint.
  2. The gateway checks transport and request-level policies, such as TLS handling, authentication, authorization, validation, and rate limits.
  3. It selects a backend route using information such as the path, method, headers, or deployment configuration.
  4. It forwards the request, possibly transforming the payload or adding internal context.
  5. It returns the backend response, or combines responses when the client-facing operation needs data from multiple services.

The gateway centralizes concerns that otherwise get reimplemented in individual microservices. Authentication, SSL/TLS termination, routing, request transformation, caching, and external traffic observability can be handled at one boundary rather than copied into every service.

Practical rule: Keep the gateway responsible for traffic and policy. Put business decisions in the services that own the underlying data and behavior.

The trade-off is real. Every request now passes through an additional network hop and a component that sits on the critical path. A gateway needs high availability, capacity planning, sensible timeouts, and low-latency processing. If it becomes overloaded or misconfigured, many otherwise healthy services can appear unavailable at once.

Essential Features Every Gateway Provides

A gateway earns its place through the policies it can apply consistently at the edge. The exact feature set differs between products, but the practical responsibilities are familiar.

A diagram illustrating the four core features of an API gateway: routing, authentication, rate limiting, and monitoring.

Routing and client-specific shaping

Routing maps an incoming request to the correct backend. The gateway can use paths, methods, headers, hostnames, or deployment rules to select a service. That lets clients call a stable public contract while teams move or split internal services behind it.

Request and response transformation extends this separation. A mobile client may need a compact response, while a browser application may need additional fields or a different structure. The gateway can shape those contracts without forcing every backend service to understand every client type. Aggregation can also combine responses from multiple services, though complex orchestration can make the gateway harder to operate and test.

Authentication and authorization

The gateway is a useful first enforcement point for authentication and authorization. It can validate credentials or tokens, then check whether the caller has permission to access a route. That prevents obviously invalid traffic from consuming backend resources.

This doesn’t eliminate service-level authorization. A gateway can verify that a caller has a broad scope, but the service still needs to enforce ownership and business-specific permissions. A request for an account resource may be authenticated at the edge and still be forbidden by the account service.

Rate limiting and validation

Rate limiting controls how much traffic a consumer, route, IP, or deployment can send. Limits may apply globally or at narrower scopes, depending on the abuse model and the capacity of the protected service. Rejected requests can receive a retry-oriented response or a 429-style response, allowing clients to back off rather than repeatedly increasing pressure.

The Apache APISIX guidance on API gateway security frames this as part of broader edge policy enforcement, alongside request validation and authN/authZ. The important operational principle is to fail fast before expensive downstream work begins. A poorly chosen global limit can block legitimate users, so limits should reflect consumer behavior, route sensitivity, and backend capacity.

Caching and traffic visibility

Caching can reduce repeated work for stable responses, but it requires careful invalidation and privacy controls. Don’t cache sensitive or rapidly changing data because the gateway supports caching.

Gateway logs and metrics provide a unified view of external traffic. They can show which routes receive requests, where errors occur, and how consumers behave. That view is valuable for edge operations, but it shouldn’t be confused with full internal observability. The gateway sees the request boundary. It doesn’t automatically explain every downstream database query, queue delay, or service-to-service dependency.

Architecture and Deployment Patterns

API gateways became important as teams moved from monolithic applications toward cloud-native and microservices architectures. A monolith may expose one application boundary, while a distributed system creates many independently deployed services. The gateway provides a stable external contract while the internal topology changes behind it.

The pattern has also become a distributed operational layer rather than a single universal proxy. In Postman’s 2025 State of the API report, 31% of organizations said they use multiple API gateways, with 20% using two and 11% using three or more. The same report recorded AWS API Gateway at 47% adoption and Azure at 26%, figures that indicate how gateway products are embedded in major cloud ecosystems. These figures are available in Postman’s 2025 API report.

A separate market report found that enterprises with more than 500 microservices in production rose from 23% in 2022 to 67% in 2025. That data appears in the API gateway market analysis from MarketIntelo. As service estates become more distributed, teams have more reason to centralize external routing and policy enforcement.

Common deployment choices

A managed gateway reduces infrastructure ownership. The cloud provider handles much of the scaling and platform maintenance, but the team accepts the provider’s integration model, pricing structure, and operational boundaries.

A self-hosted gateway offers more control over networking, plugins, configuration, and portability. It also makes the team responsible for upgrades, capacity, resilience, certificates, policy distribution, and incident response.

Multiple gateways can be sensible when traffic has different requirements. A public consumer API, an internal platform API, a partner interface, and traffic in separate regions may need different policies or release lifecycles. The mistake isn’t using multiple gateways. The mistake is allowing each gateway to develop incompatible security and observability practices without governance.

A gateway deployment is an availability decision, not just a routing decision.

Run gateway instances redundantly, make configuration declarative, and test failure behavior. Whether the runtime is managed or self-hosted, the gateway remains part of the request path and must be treated like production infrastructure.

Comparing Gateways to Service Meshes and Proxies

Teams often use “proxy,” “gateway,” and “mesh” interchangeably, then discover that the tools solve different problems. The cleanest distinction is based on traffic direction and operational scope.

A standard reverse proxy forwards requests to backend servers and may terminate TLS or cache responses. An API gateway builds on that role with application-aware policies such as authentication, authorization, rate limiting, transformation, and API-specific routing. A service mesh focuses primarily on communication between internal services, where teams care about service identity, mTLS, retries, timeouts, traffic shifting, and east-west observability.

For a practical explanation of the reverse proxy layer, see this guide to a reverse proxy server with Apache.

Traffic Control Technologies Compared

TechnologyTraffic DirectionPrimary Use CaseOperational Scope
Reverse proxyExternal to backendForwarding requests, TLS termination, cachingBasic request forwarding
API gatewayClient to internal APIRouting, authentication, authorization, transformation, rate limitingExternal API runtime control
Service meshService to serviceInternal identity, mTLS, retries, resilience, traffic policyEast-west service communication
API management platformAPI consumers and lifecycle teamsRuntime gateway control plus documentation, portals, governance, and lifecycle workflowsBroader API product and governance management

Where the boundaries matter

An API gateway usually controls north-south traffic, meaning requests entering or leaving the service environment. A service mesh controls east-west traffic, meaning calls between internal services. A deployment can use both, but one doesn’t automatically replace the other.

API management is broader still. The gateway is the runtime enforcement engine. An API management platform may add a developer portal, API catalog, onboarding workflows, versioning, analytics, governance, and monetization capabilities. Buying a gateway when the actual requirement is a partner onboarding platform leaves important work undone.

The right question isn’t “Which product has the longest feature list?” Ask where the traffic originates, which policies must be enforced, who operates them, and whether the problem is runtime control or API lifecycle management.

Recognizing When a Gateway Is the Wrong Choice

An API gateway is powerful at the edge, but architectural overreach starts when teams expect it to solve every traffic problem. It governs requests in flight. It doesn’t recreate production behavior, validate a release against real user sequences, or explain every internal dependency.

A gateway can log a request, attach correlation data, reject an invalid payload, and route traffic to a staging or production service. Those actions help operators understand the boundary. They don’t provide a faithful replay of the traffic patterns that produced a difficult production failure.

An empty airport security screening area with metal detectors and X-ray machines behind stanchion belt barriers.

What the gateway cannot prove

A gateway can’t prove that a new service version handles the ordering, headers, payload variation, timing, and session behavior found in real production traffic. Synthetic tests can cover known scenarios, but they may miss combinations that only appear under actual usage.

It also shouldn’t become a business workflow engine. Aggregating a small number of related calls can be useful for a client-specific contract. Encoding extensive business logic, retries with domain meaning, or complex state transitions in the gateway creates a second application that is difficult to version independently.

The Apache APISIX explanation of API gateways highlights the unresolved boundary between gateways, API management, and service meshes. That boundary is operationally important because routing and policy enforcement aren’t the same as internal resilience or lifecycle governance.

Pair edge controls with traffic replay

For release validation, capture representative HTTP traffic and replay it against an isolated target. The capture layer should protect sensitive data, preserve the request context needed for testing, and prevent test traffic from causing side effects.

A team evaluating an external integration may also review a resource such as Nimbio’s gate access API to understand how a third-party API exposes its own access boundary. That kind of API still needs gateway policies, but the gateway doesn’t replace testing the integration’s actual behavior.

Use the gateway for admission control and traffic policy. Use distributed tracing for dependency paths, application telemetry for internal behavior, and replay or integration testing for release confidence. Treating those tools as interchangeable is what causes gaps.

Real-World Use Cases and Implementation Best Practices

A gateway is easiest to justify when it removes a repeated operational burden without absorbing business logic. Consider a mobile application that needs data from several backend services. A Backend for Frontend, or BFF, can expose a mobile-specific contract, aggregate the required responses, and keep the mobile client independent from internal service changes.

A separate web-facing gateway may need different payload shaping, caching rules, or authentication flows. Partner traffic may require stricter quotas and clearer audit records. These are different consumers, so forcing every client through one identical contract can create unnecessary coupling.

An infographic showing five key real-world use cases and best practices for implementing an API gateway.

Build the gateway around policy

Treat gateway configuration as code. Store routes, authentication rules, transformations, rate limits, and timeout policies in version control. Review changes alongside application changes, and promote the same tested configuration through environments instead of editing production manually.

A useful implementation sequence is:

  • Map the traffic: Identify clients, public routes, backend owners, authentication requirements, and dependencies.
  • Start with enforcement: Add authentication, request validation, rate limits, timeouts, and structured logging before adding elaborate aggregation.
  • Keep routes thin: Let services own business rules. Use the gateway to translate, route, and protect traffic.
  • Test failure paths: Exercise rejected credentials, exhausted limits, unavailable services, slow responses, and malformed payloads.
  • Measure the gateway itself: Track request latency, status codes, rejected requests, upstream failures, connection reuse, and saturation.

The gateway can prevent a burst from reaching an expensive downstream service, but only if the limit is placed at the right scope. A single global cap may protect the system while unfairly blocking a quiet tenant. Per-consumer and per-route policies usually express the underlying capacity model more accurately.

Roll out without creating a choke point

Load test the gateway as a production component, not just as a configuration file. Test routing, policy evaluation, transformations, and upstream connection behavior under representative concurrency. Include failure injection so the team knows whether a backend timeout causes fast rejection or ties up gateway resources.

For broader service design guidance, keep the gateway work aligned with these microservices best practices. The gateway should make service boundaries easier to consume, not conceal ownership so thoroughly that no team knows which service is responsible for a failure.

Finally, design for rollback. A route change can be syntactically valid and still direct real traffic to the wrong version. Versioned configuration, staged rollout, clear ownership, and observable rollback signals matter more than adding another plugin.

Evaluating Your Next Steps for API Traffic

The answer to “what is API gateway” is architectural, not merely definitional. It’s a centralized runtime boundary that protects and shapes client-to-service traffic. Its value increases when multiple clients need a stable interface and when teams are tired of duplicating authentication, routing, validation, and rate limiting across services.

Market estimates show strong demand for this layer, but the forecasts differ sharply. One report estimates the market at USD 5.21 billion in 2025 and projects USD 6.29 billion by 2033, while another forecasts growth from USD 4.85 billion in 2025 to USD 22.50 billion by 2034. A separate snapshot says gateways represented 38.2% of the global API management market in 2026. These estimates from the TrendX Insights market reference aren’t a substitute for architecture analysis, but they reflect the gateway’s central role in API infrastructure.

Before adopting or replacing one, audit the current request path:

  • Which client-facing routes expose internal service topology?
  • Where do services duplicate authentication and rate-limit logic?
  • Which policies belong at the edge, and which require service-level context?
  • Do you need a gateway runtime, a service mesh, API management, or a combination?
  • How will you validate changes against representative production behavior?

Prototype the gateway in staging, define failure and rollback behavior, and test both accepted and rejected traffic. Keep the gateway thin, observable, redundant, and explicit about what it doesn’t do.


GoReplay captures live HTTP traffic and replays it to a specified endpoint, which lets teams test a new service or gateway configuration against representative requests before deployment. Visit GoReplay to evaluate traffic capture, shadowing, and replay as a complement to edge routing and gateway policy enforcement.

Ready to Get Started?

Join these successful companies in using GoReplay to improve your testing and deployment processes.

Talk to the GoReplay team

Describe what you want to capture or replay, your deployment, and any PRO requirements. Or email [email protected].

Google Forms will display your submission confirmation. Please leave out credentials and production request data.