A reverse proxy is a server placed between clients and one or more backend servers. It receives client requests, forwards each one to an appropriate backend, and returns the backend's response to the client. It is a standard component of web services and network infrastructure. Unlike a forward proxy, which acts on behalf of clients reaching out to external sites, a reverse proxy acts on behalf of servers, so clients do not need to know the address of the machine that actually handles the request.
Reverse proxies centralize functions such as load balancing across servers, TLS termination, response caching and compression, authentication, rate limiting, and hiding the addresses of internal servers. Widely used implementations include Nginx, HAProxy, Apache HTTP Server, Envoy, Caddy, and Traefik, and content delivery networks also operate as reverse proxies.
In AI systems, an AI gateway follows the same design: a reverse proxy placed in front of the APIs of several model providers handles authentication, usage limits, caching, logging, and request routing.