Single entry point for all clients — centralises auth, rate limiting, routing, SSL, and observability.
# Without gateway (bad)
Client --> user-service:3001
Client --> product-service:3002
Client --> order-service:3003
# With gateway (good)
Client --> gateway:80
gateway --> user-service
gateway --> product-service
# Kong declarative config
services:
- name: user-service
url: http://user-service:3001
routes: [{paths: ["/api/users"]}]
plugins:
- name: jwt
- name: rate-limiting
config: {minute: 100}