Skip to main content
Plane travel - Airport analogy In this article we look at two topics that have caused a lot of confusion in recent years and where the answer to “when should we use which?” is hard to find: API Gateway and Service Mesh. We’ll take a light-hearted journey to explain the complex IT systems used by large companies. If we compare these systems to something we all know, we can think of a large city or a country. API Gateway and Service Mesh are two different constructs that manage communication in modern systems. Explaining them through a scenario everyone can relate to—instead of drowning in technical terms—makes things much easier. So can we explain what API Gateway and Service Mesh do using an airport and urban transport? Yes!

Our City’s Airport: API Gateway

In large companies’ systems, there is a dedicated gate that handles communication with the outside world. Technically, this is called an “API Gateway.” We can compare it to our city’s large international airport. Why?
  • Main entrance: Just as everyone arriving from abroad must pass through the airport, all incoming computer requests pass through this API Gateway.
  • Security checks: Airports have passport control and security screening. The API Gateway works the same way: it checks every request, performs authentication, and ensures it is safe.
  • Capacity control: Sometimes airports get very crowded and have to limit flights. The API Gateway can similarly limit the requests reaching the system; this is called “rate limiting.” In Apinizer we do this in detail with API Based Throttling and API Based Quota policies, so the system is protected from overload.
  • Direction and routing: Airports have signs directing passengers to the right terminals. The API Gateway routes incoming requests to the right services.
  • Translation: International airports have interpreters for people who speak different languages. The API Gateway also “translates” between different technologies: it converts an incoming request into a format the internal systems understand.
  • Record keeping: Airports keep records of passengers entering and leaving. The API Gateway similarly keeps logs of all incoming requests, which is essential for understanding what happened later.
  • Monitoring: Airports have cameras everywhere and security staff watching. The API Gateway continuously monitors system performance and security so any issue is quickly detected.
  • Baggage handling: At the airport your luggage is sometimes rearranged or repackaged. The API Gateway also reshapes incoming data, strips unnecessary information, or reformats it to match what internal systems need.

Urban Transport: Service Mesh

Now we’re inside the city. Here another technology handles communication between the company’s internal systems: Service Mesh. We can compare it to the urban transport system.
  1. Wide network: Just as bus stops or metro stations are spread across the city, the Service Mesh is spread across all of the company’s internal systems.
  2. Fast communication: Like buses that move people from one place to another in the city, the Service Mesh quickly moves information from one system to another.
  3. Traffic management: Just as traffic lights and road signs regulate traffic, the Service Mesh regulates data traffic between systems.
  4. Safe journey: Just as public transport provides a safe trip, the Service Mesh makes communication between systems secure.
  5. Status monitoring: As transport companies constantly monitor their vehicles, the Service Mesh constantly monitors the status and performance of systems.

The Difference

  • API Gateway controls all requests coming from the outside world, like an airport terminal; it is the system’s outward-facing gate. It secures, filters, and routes all external traffic to the right services.
  • Service Mesh manages and optimizes how microservices inside the system communicate with each other. It is like a system that coordinates how vehicles in the city communicate and which routes they use.

Conclusion

So we can explain large companies’ complex systems like this. API Gateway provides and secures communication with the outside world, like our city’s airport. Service Mesh provides fast, secure communication between internal systems, like urban transport. Thanks to these technologies, large companies can serve thousands of customers at once, keep their systems secure, and ensure everything runs smoothly—just like a well-run city! I hope this article helps you understand these complex systems from a non-technical perspective.