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.
Glossary Published 7 min read
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
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
| Function | What it does | Example |
|---|---|---|
| Routing | Sends each request to the right service and version | Calls to /orders go to the orders service; /v2/orders to its new version |
| Authentication | Checks who is calling before the request reaches a service | A partner presents an API key or a token issued by your identity platform |
| Access control | Decides which consumers and networks may call which API | Only the finance application may call the payments API |
| Rate limiting | Caps how many calls a consumer may make in a period | A partner is held to an agreed number of calls per minute |
| Request validation | Rejects malformed or unexpected requests early | A request with a missing field or an oversized body is refused at the gateway |
| Transformation | Adjusts headers or payloads between caller and service | Adds a correlation ID header, or removes an internal header from responses |
| Caching | Answers repeated requests from a stored copy for a short time | A product list that changes hourly is served without calling the service each time |
| Observability | Records and measures every call | Logs 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 | Service mesh | |
|---|---|---|---|
| Main job | Apply API rules and route each call | Spread traffic across healthy copies of a service | Secure and observe calls between services |
| Traffic it handles | North-south: callers into the platform | Any traffic sent to the address it fronts | East-west: service to service inside the platform |
| Knows about consumers | Yes: keys, tokens, plans, limits per consumer | Usually not | Knows services, not outside consumers |
| Typical policies | Authentication, rate limits, validation, transformation | Health checks, balancing method, TLS | Mutual 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.
Relatedservice mesh page
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.
From the insights library
Continue reading
API gateway for Saudi enterprises
Deployment shapes, what to require from a gateway and how Interkey delivers one on Kong Gateway.
Partner technologyKong implementation and operations
Self-managed, hybrid or on the cluster, and the platform run after go-live.
PracticeAPI management in Saudi Arabia
The inventory and policy work that decides what goes through the gateway.
GlossaryMore technology terms
Short, plain definitions of the terms buyers meet in monitoring, cloud and data projects.
Related pages
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.
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