En API-gateway är en enda ingångspunkt som sitter framför backend-tjänster — den hanterar tvärhuggande problem som routing, autentisering, hastighetsbegränsning och mer. Den är särskilt användbar i mikrotjänstarkitekturer för att centralisera gemensam funktionalitet.
Vad en API-gateway gör
The API GATEWAY is a single entry point in front of backend services:
Client → API GATEWAY → ┬→ Service A
├→ Service B
└→ Service C
→ handles cross-cutting concerns in ONE place (so services don't each implement them)
→ routes requests to the right service; abstracts the backend from clients
Vanliga gateway-ansvar
✓ ROUTING → direct requests to the appropriate backend service
✓ AUTHENTICATION/authorization → verify identity/permissions centrally
✓ RATE LIMITING / throttling → protect backends from abuse/overload
✓ Request/response TRANSFORMATION; protocol translation; aggregation (combine service calls)
✓ CACHING; load balancing; SSL termination
✓ LOGGING, monitoring, analytics; error handling
