Core Concept: An API gateway is a single entry point that sits between IoT devices/applications and backend services, handling authentication, rate limiting, protocol translation, request routing, and response aggregation - acting as a reverse proxy that shields internal microservices from direct external access.
Why It Matters: IoT deployments often expose multiple backend services (device registry, telemetry storage, command dispatch, analytics). Without an API gateway, each service needs its own authentication, rate limiting, and versioning logic. The gateway centralizes these cross-cutting concerns, enabling backend services to focus on business logic while presenting a unified, versioned API to devices and applications.
Key Takeaway: Deploy an API gateway (AWS API Gateway, Kong, or cloud-native alternatives) when you have 3+ backend services or 1,000+ devices. Route device telemetry through message brokers (MQTT), not the API gateway, to avoid HTTP overhead. Reserve the gateway for REST operations: device provisioning, configuration updates, and dashboard queries.