An API gateway is the single entry point for all client requests to a platform. It receives incoming HTTP requests, authenticates the caller (API key validation, OAuth token verification), applies rate limiting and quota enforcement, routes the request to the appropriate backend microservice, and returns the response to the caller. It may also handle caching, request/response transformation, logging, and TLS termination.
For scraping platforms, the API gateway is where per-user concurrency limits and credit checks are enforced — a request that exceeds the account's concurrency cap is queued or rejected at the gateway layer before any worker resources are consumed. This architecture protects the backend from overload while giving the platform fine-grained control over resource allocation.
Popular API gateway implementations include Kong, AWS API Gateway, Traefik, and NGINX. AlterLab uses Traefik as a reverse proxy to route traffic to the API service containers while handling TLS termination.