API Gateway: Kong, Apigee, AWS API Gateway, Rate Limiting, Auth และ API Security
API Gateway เป็น single entry point สำหรับ API traffic ทั้งหมด Kong เป็น open-source API gateway ที่ popular ที่สุด, Apigee (Google Cloud) เป็น enterprise API management platform, AWS API Gateway เป็น serverless API management, Rate Limiting ป้องกัน API abuse และ overload, Auth จัดการ authentication/authorization สำหรับ APIs และ API Security ป้องกัน OWASP API Top 10 threats
Modern applications expose หลายร้อย APIs สำหรับ mobile apps, web apps, partners, third-party integrations — ถ้าไม่มี API gateway: แต่ละ API ต้อง implement auth, rate limiting, logging เอง (code duplication), ไม่มี centralized visibility, ไม่มี consistent security policy API gateway centralizes cross-cutting concerns ทำให้ API development เร็วขึ้นและปลอดภัยขึ้น
API Gateway Functions
Function
What
Why
Request Routing
Route requests ไป correct backend service ตาม path/header
Single entry point สำหรับทุก APIs
Authentication
Verify identity (API key, OAuth2, JWT, mTLS)
Centralized auth — backends ไม่ต้อง implement เอง
Rate Limiting
Limit requests per client/API/time window
ป้องกัน abuse, DDoS, fair usage
Load Balancing
Distribute requests across backend instances
HA + scale
Caching
Cache API responses → reduce backend load
Performance + cost savings
Request/Response Transform
Modify headers, body, status codes
Adapt APIs without changing backend code
Logging/Monitoring
Log every request → metrics, analytics, audit
Visibility, troubleshooting, compliance
Circuit Breaking
Stop sending requests to failing backend
Prevent cascade failures
Kong
Feature
รายละเอียด
คืออะไร
Open-source API gateway built on Nginx/OpenResty — most popular OSS gateway