APIゲートウェイは、バックエンドサービスの前に位置する単一のエントリーポイントであり、ルーティング、認証、レート制限など、横断的な関心事を処理します。特にマイクロサービスアーキテクチャにおいて、共通機能を一元化するのに有用です。
APIゲートウェイが行うこと
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
一般的なゲートウェイの責務
✓ 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
