APIs and integrations

·4 min read

API Gateway: One Front Door, Another Responsibility

A single entry point can make external integrations more predictable. It can also become the place where every request and every change gets stuck.

A company has a website, a mobile app and a growing list of partners. Behind them, more services appear. Before long, each external client needs to know where to send requests, how to authenticate and what to change when an internal API moves. Maintaining integrations starts consuming a surprising amount of engineering time.

An API Gateway may help. But it does not remove complexity from the system; it takes ownership of some of it. The business question is whether that trade-off is worth making.

One secure entrance directing client requests to several internal departments
Think of a reception checkpoint. Visitors no longer need to know every room in the building, and common entry rules are applied once. The checkpoint itself, however, must remain reliable.

What happens when everyone uses a different entrance?

Imagine a partner requesting order data while the mobile app calls catalog, payments and customer-profile APIs. If all those clients depend directly on internal services, a change to service boundaries can trigger work for many external consumers.

That is not necessarily wrong. A small application may be perfectly fine with one straightforward backend API and no dedicated Gateway. The case becomes stronger as client types, external contracts and duplicated edge concerns grow.

What the Gateway actually does

A Gateway receives a request at a public interface and routes it towards an internal service. Depending on the product and configuration, it may validate tokens, apply throttling rules, collect technical metrics or hide some details of internal routing.

The phrase “depending on” matters. Capabilities vary, and adding a common front door does not magically make an API stable. Versioning, contract compatibility and disciplined change management are still required.

For a partner, the benefit is predictability. The company can alter routing behind a consistent interface rather than forcing every integration to follow internal rearrangements. But if the meaning of the external contract changes, a Gateway cannot make the change disappear.

Where the business benefit comes from

First, duplicated edge rules can move to a shared place instead of being recreated in every service. Second, onboarding new clients can become easier when routing, limits and common entry requirements are coherent.

For management, the useful measures are not gateway routes configured. They are partner onboarding time, breaking changes, repeated access-control defects and manual approvals. Those reveal whether the new layer actually reduced the cost of change.

Ownership is another trade-off. If every new route requires a ticket to an overloaded platform team, a technical solution has created a human queue. Shared standards are valuable; shared manual execution of every small change is not.

What should stay behind the front door

A Gateway is useful for technical concerns at the boundary. It should not become the universal home of business decisions. Whether a customer may change a particular order can depend on domain data the backend owns. Token validation at the edge does not replace authorisation inside the relevant service.

Teams may also be tempted to put more response composition, transformations and workflow decisions into the shared Gateway. Eventually it becomes a monolith in front of the microservices. If a mobile app needs a distinct response shape, a Backend for Frontend (BFF) can sometimes be a better boundary than a growing collection of exceptions.

You have also created a critical dependency

A common entry point sits on the path of many requests. Its failures can affect multiple products. Capacity, latency, high availability, observability and safe configuration changes now need serious attention.

And the Gateway cannot repair a broken downstream service by itself. It can return a controlled error, shed load or apply a deliberately designed fallback. It cannot pretend a payment succeeded when it did not.

When I would add one

I would look for an existing problem: many clients coupled to internal topology, the same checks duplicated across APIs, or partner contracts that are costly to maintain whenever the backend changes. Those are reasons to evaluate a Gateway.

If a small product already has one stable backend interface and little duplicated edge logic, the extra layer may simply become another piece of software to operate.

A good Gateway reduces the cost of change outside the system. A bad one moves the chaos to the most visible point: the front door.

For the wider architectural trade-off, see what microservices cost a business.