Glossary

What is an API gateway? Meaning, functions and examples

What is an API gateway? It is the single entry point that sits between the applications calling your APIs and the services that answer them. Every request passes through it, and the gateway decides where the request goes and whether it may go at all: it checks who is calling, applies limits, validates the request and records the call. The services behind it then do not each have to repeat that work. Below: the API gateway meaning, its eight core functions, and how it differs from a load balancer and a service mesh.

In short

  • API gateway meaning: one layer in front of many APIs that receives every call, applies the same rules and passes the call to the right service.
  • Why it exists: without it, each service carries its own authentication, limits and logging, each slightly different and each reviewed separately.
  • What it is not: the whole of API management, and not a security programme on its own. It enforces rules; somebody still has to write them.
  • Choosing one: if you are past the definition and planning a gateway, read Interkey's API gateway page on deployment shapes and what to require.

Definition

What is an API gateway, in plain terms

Think of the reception desk of a large office building. Visitors do not walk straight to the floor they want: they stop at one desk, show who they are, and are sent to the right place. Nobody has to post a guard on each floor. An API gateway does the same for software. A mobile app, a website, a partner's system or another internal application sends its request to one address, and the gateway works out which service should answer it.

Read more
Request flow through an API gateway A request travels from the calling application to the gateway, which checks identity, applies limits and routes it to one of three services. Calling app mobile, web, partner API gateway Check identity Apply limits and checks Route and log Accounts service Orders service Payments service
Every request passes one point that applies the same rules before it reaches any service.

Unlike a network device, an API gateway understands requests, paths, headers, tokens and consumers, not only IP addresses and ports. It usually sits at the edge of your platform, and often in front of internal APIs too.

Functions

The eight core API gateway functions

The eight core functions of an API gateway, with examples
FunctionWhat it doesExample
RoutingSends each request to the right service and versionCalls to /orders go to the orders service; /v2/orders to its new version
AuthenticationChecks who is calling before the request reaches a serviceA partner presents an API key or a token issued by your identity platform
Access controlDecides which consumers and networks may call which APIOnly the finance application may call the payments API
Rate limitingCaps how many calls a consumer may make in a periodA partner is held to an agreed number of calls per minute
Request validationRejects malformed or unexpected requests earlyA request with a missing field or an oversized body is refused at the gateway
TransformationAdjusts headers or payloads between caller and serviceAdds a correlation ID header, or removes an internal header from responses
CachingAnswers repeated requests from a stored copy for a short timeA product list that changes hourly is served without calling the service each time
ObservabilityRecords and measures every callLogs and metrics show which consumer is failing, and since when

For these functions as Kong Gateway implements them, see the API gateway page.

Compared

API gateway vs load balancer vs service mesh

API gateway, load balancer and service mesh compared
API gatewayLoad balancerService mesh
Main jobApply API rules and route each callSpread traffic across healthy copies of a serviceSecure and observe calls between services
Traffic it handlesNorth-south: callers into the platformAny traffic sent to the address it frontsEast-west: service to service inside the platform
Knows about consumersYes: keys, tokens, plans, limits per consumerUsually notKnows services, not outside consumers
Typical policiesAuthentication, rate limits, validation, transformationHealth checks, balancing method, TLSMutual TLS, retries, timeouts, service-level access rules

The three often work together: a load balancer in front of several gateway nodes, the gateway in front of the services, and a mesh between the services themselves.

Load balancer

API gateway vs load balancer

A load balancer answers "which copy of this service should take the request?". An API gateway answers "may this caller make this request, and which service should handle it?". The two overlap, since many gateways balance load and many load balancers read paths. The difference is the consumer: a gateway knows this call comes from a specific partner with a specific limit; a load balancer generally does not.

Service mesh

API gateway vs service mesh

A service mesh places a small proxy beside each service so that calls between services are encrypted, retried and measured in the same way, without changing the services' code. It is aimed at traffic inside the platform. A gateway is aimed at the front door. A handful of services rarely needs a mesh; many services on Kubernetes may justify both. The service mesh page covers when a mesh is worth its operating cost.

Examples

API gateway examples: where it is used

  • A mobile app back end: the app calls one address; the gateway checks the user's token and sends each call to the accounts, orders or payments service.
  • Partner and open banking APIs: each partner gets its own credentials and limits. Interkey's open banking page covers that case.
  • Microservices: dozens of small services share one place for authentication and limits.
  • AI traffic: calls to language models pass a gateway that applies token budgets and prompt rules, described on the Kong AI Gateway page.

Limits

When a gateway is not the first step

A single application calling a single service, with no outside consumers, may not need a gateway yet. And a gateway cannot make an unsafe service safe: weak authorisation inside a service, responses that return too much data and unpatched dependencies still have to be fixed in the service. Listing your APIs and writing down who may call what usually comes before choosing a product; that work is API management, and the gateway is where it is enforced.

Kong and Interkey

Kong Gateway and how Interkey helps

Interkey implements Kong Gateway, a product of Kong Inc., one of Interkey's technology partners. Kong documents three ways to run it: traditional, with a database; DB-less, with configuration loaded from a declarative file; and hybrid, with a control plane that holds configuration and data planes that carry traffic. Some plugins are Enterprise only, so the edition follows the functions you need.

Interkey designs the gateway, writes its policies as version-controlled configuration, connects it to your identity and monitoring platforms and operates it afterwards. The API gateway page sets out the deployment shapes and a requirements checklist you can use to judge any proposal, including ours.

In a Saudi context

API gateways in a Saudi context

For organisations in the Kingdom the first design question is usually where the gateway runs, because the part that inspects payloads runs wherever the traffic flows. If payloads may not leave Saudi Arabia, that part must run in the Kingdom too; with a self-managed deployment, both the traffic plane and the configuration plane can run on infrastructure you operate locally. Interkey's engineers support the gateway from Riyadh, in Arabic and English, and test Arabic and mixed-script payloads.

Questions teams ask about API gateways

Is an API gateway just a reverse proxy?

It builds on one. A reverse proxy forwards requests to servers behind it; an API gateway adds what an API needs on top: consumer identities, per-consumer limits, request validation and call-level logging.

Does an API gateway add delay to every call?

It adds one step, so there is some overhead. How much depends on the rules applied to each call and where the gateway runs relative to the services. Measure it on your own traffic.

Where should the API gateway run if our data must stay in Saudi Arabia?

The part that carries and inspects traffic should run on infrastructure in the Kingdom. With Kong Gateway self-managed, the configuration plane can run there as well. Your data classification decides which shape is acceptable.

How is an API gateway licensed, and what drives the cost?

For Kong Gateway, the main driver is the edition: some plugins are Enterprise only. Beyond the licence, the cost follows the number of environments, how many APIs move behind the gateway and who operates it. Interkey quotes licences, implementation and support in Saudi Arabia together.

How long does it take to put the first APIs behind a gateway?

There is no fixed figure. It depends on how many APIs and consumers you start with, whether authentication can be delegated to an identity platform you already run, and how quickly owners agree the rules. A first small group of APIs is a matter of weeks; moving every consumer takes longer. Any duration we give is an estimate tied to that scope.

If we already have an API gateway, do we also need a service mesh?

Not necessarily. The gateway governs traffic coming into your platform; a mesh governs traffic between services. Teams with many services calling each other, needing mutual TLS between them, usually add one.

Next step

Plan an API gateway for your services

Tell us which APIs you expose today, who calls them and where your data must stay. We will suggest a gateway design and the first APIs to move, and quote Kong Gateway licences, implementation and support if Kong fits.

Required field

By sending this form, you agree to our Privacy Notice.

Or directly

+966-11-2180999 [email protected]

Tawuniya Towers, North Tower, 7th Floor, King Fahad Highway, Olaya, P.O. Box 56835, Riyadh 11564, Saudi Arabia

or See the eight functions

Published by Interkey. Last updated . Interkey is registered in Riyadh, Saudi Arabia under commercial registration 1010156897.