Back to Insights
ArchitectureOctober 2025

API gateway patterns: when and how to use them

API gateways provide cross-cutting features like authentication and rate limiting, but they can become bottlenecks if misused.

Gateway responsibilities

Keep the gateway focused: authentication, routing, rate limiting, and aggregation are typical tasks.

Avoid putting business logic in the gateway; that logic belongs in services where it can be versioned and tested.

Scalability

Run gateways in a scalable mesh and ensure they are stateless where possible to allow horizontal scaling.

Monitor latency closely and provide fallbacks for degraded gateway paths.