Skip to main content

Command Palette

Search for a command to run...

πŸšͺ API Gateway Explained Like You're 5

Published
β€’2 min read
S

Building AI systems and writing about how they actually work. Master of AI @ University of Technology Sydney. Previously B.Tech CS with focus on IoT. I believe the best way to learn is to explain. That's why I'm documenting tech concepts with simple analogies (@sreekarreddy.com). AWS Certified β€’ Azure AI Certified β€’ Neo4j Professional β€’ Google Data Analytics When not coding: exploring Sydney, working on side projects, and teaching tech to anyone who'll listen.

Single entry point for services

Day 118 of 149

πŸ‘‰ Full deep-dive with code examples


The Hotel Concierge Analogy

At a hotel, you don't go directly to housekeeping, the kitchen, or maintenance:

  • You talk to the concierge
  • They route your request to the right department
  • They handle translations and special requests

An API Gateway is the concierge for your APIs!

All requests go through one door, then get routed appropriately.


The Problem It Solves

With many microservices:

  • Client needs to know all service addresses
  • Each service implements its own auth, rate limiting
  • Mobile clients make many requests to different services
  • Hard to make changes without breaking clients

What an API Gateway Does

Single entry point:

Client β†’ API Gateway β†’ Service A
                    β†’ Service B
                    β†’ Service C

Handles cross-cutting concerns:

  • Authentication β†’ Verify user identity
  • Rate limiting β†’ Prevent abuse
  • Caching β†’ Speed up responses
  • Logging β†’ Track all requests
  • Routing β†’ Send to right service

The Benefits

  • Simplified clients β†’ One address, not many
  • Security centralized β†’ Auth in one place
  • Flexible backend β†’ Change services without changing clients
  • Aggregation β†’ Combine multiple service calls into one

Common Features

  • Route requests based on URL path
  • Transform requests/responses
  • Load balance across instances
  • Handle SSL/TLS termination
  • Provide API versioning

  • Kong β†’ Open source, plugins
  • AWS API Gateway β†’ Cloud managed
  • NGINX β†’ Web server + gateway
  • Apigee β†’ Enterprise, by Google

In One Sentence

An API Gateway provides a single, unified entry point for all API requests, handling security, routing, and common concerns in one place.


πŸ”— Enjoying these? Follow for daily ELI5 explanations!

Making complex tech concepts simple, one day at a time.

More from this blog

esreekarreddy

132 posts

πŸšͺ API Gateway Explained Like You're 5