QA
Beginner LevelREST APIs & Web Services

What is an API Gateway and what roles does it perform in backend architecture?

❓ Interview Prompt: Explain API Gateway pattern (Kong, AWS API Gateway, NGINX), reverse proxy, centralized auth, rate limiting, request routing, and SSL termination.

An API Gateway acts as a single centralized entry point (Reverse Proxy) for all external client requests entering a microservices backend architecture:

Core Responsibilities:

1
Request Routing: Maps public URIs ('/api/v1/orders') to internal microservice IP addresses ('10.0.1.45:8080').
2
Cross-Cutting Concerns: Handles SSL/TLS termination, authentication token validation, rate limiting, CORS headers, and logging in one central place!
3
Protocol Translation: Translates external HTTP/REST JSON calls into internal gRPC or Kafka event streams.

Code Implementation Example

yaml
# Example Kong API Gateway Route Configuration
services:
  - name: user-service
    url: http://internal-user-service.local:8080
    routes:
      - name: user-route
        paths:
          - /api/v1/users
        strip_path: false
💡Kong API Gateway routing public URI paths to internal microservice cluster IPs.
🎯 Interview Key Takeaway

API Gateways centralize routing, authentication, rate limiting, and SSL termination in front of backend microservices.

#API Gateway#Architecture#Reverse Proxy#Beginner
Back to all REST APIs & Web Services Questions→

More REST APIs & Web Services Interview Questions

Beginner LevelREST APIs & Web Services

What is HTTP Method Idempotency and how do you implement Idempotency Keys for REST APIs?

Beginner LevelREST APIs & Web Services

What are standard HTTP Status Codes (200, 201, 204, 400, 401, 403, 404, 409, 429, 500, 503)?

Beginner LevelREST APIs & Web Services

What are HTTP Verbs (GET, POST, PUT, PATCH, DELETE) and when to use PUT vs PATCH?