Mastering API Gateway in 3 Minutes: Why It's the Infrastructure of the Digital World

Ming Wen

Ming Wen

December 22, 2023


Have you ever wondered what an API gateway is? In just 3 minutes, we'll unravel its significance in the digital world.

Whenever API gateway is mentioned, a plethora of technical terms surfaces – load balancing, reverse proxy, rate limiting, authentication and authorization, and observability, to name a few. While backend engineers may find these terms familiar, they pose a challenge for frontend developers or those without an engineering background. Is there a simple way to introduce the concept of API gateway to someone with no technical background and make it understandable within a couple of minutes? Indeed, there is.

Let's illustrate with two real-world examples. Many concepts in computing have strong analogies in our physical world. When a computer-related concept seems complex, we can draw parallels with everyday examples. First and foremost, consider the simplest example: API gateway. Its fundamental functions include load balancing and reverse proxy.

In real life, this concept aligns with the traffic lights we encounter every day on roads in cities. Traffic signals control the flow, directing all vehicles to proceed at an optimal speed. These traffic lights are dynamic and can be adjusted, shortening their duration during peak hours and undergoing specific optimizations. Therefore, understanding the principle behind traffic lights managing the flow at intersections enlightens the understanding of the API gateway's role in traffic reverse proxy and load balancing.

API gateway = traffic light

Now, let's delve into a slightly more intricate example: the airport. When you embark on international travel, the initial steps involve presenting your passport to acquire a ticket, followed by passing through border control and customs where officials inspect your passport, visa, and luggage. This directly corresponds to the API gateway's authentication, as it scrutinizes your identity for compliance with current border control requirements and ensures your luggage passes through customs and airport security checks.

authentication at airport

Once we grasp the fundamental principles and roles of API gateway through traffic lights and airport scenarios, we realize its pivotal position in our digital world. Imagine a city where traffic lights malfunction, or an airport is unable to operate smoothly; it would cause significant inconvenience in our physical world. The same applies to the digital world – if common functions like load balancing, reverse proxy, authentication, and rate limiting, it's akin to the breakdown of crucial infrastructure, like malfunctioning traffic lights and airports. Therefore, the API gateway is, in essence, the infrastructure of the digital world.

API gateway features

Beyond the functionalities mentioned, API gateway can achieve additional features such as traffic rate limiting and identity verification. Taking Apache Software Foundation's top-tier project, Apache APISIX, as an example, it boasts over 100 plugins and a myriad of functionalities. Through the API gateway, we can implement various features desired for traffic, including security checks, performance analysis in terms of observability, and integration with a myriad of cloud services or SaaS offerings. Thus, you can view the API gateway as the connector seamlessly integrating the entire digital world.

In this introductory article, we've explored the correspondence between the API gateway and the physical world, providing you with a clearer understanding. In upcoming articles, we'll delve into more detailed examples, demonstrating how to expose internal APIs to partners and consumers for calls through API gateways.