What It Actually Means
Visitors never talk to the application directly. They talk to the proxy, which is usually Nginx, and often something like Cloudflare in front of that as well.
What It Is Actually Doing
More than routing, and most of it is work you would otherwise have to build.
Handling encryption. The certificate usually lives here, so the application does not deal with it. This is why certificate renewal is a hosting concern rather than an application change.
Serving static files. Images, stylesheets and scripts are returned directly without troubling the application, which is substantially faster and removes most of the request volume.
Routing. Sending requests for different addresses to different applications, which is how several systems live behind one domain.
Caching. Holding responses so repeated requests are answered without the application running at all.
Filtering and limiting. Blocking obvious abuse and applying rate limits before anything reaches your code.
Compression, which reduces what has to travel to the visitor.
Why It Is Worth Knowing About
Two reasons, both practical.
It explains confusing behaviour. When a change does not appear, when a file is served that should have been replaced, or when something works locally and not in production, the proxy is a common cause. Its cache and its configuration sit above the application and are frequently overlooked because the application is where people look.
It is where several problems get solved cheaply. Rate limiting, blocking a troublesome source, redirecting old addresses, forcing HTTPS. All are configuration rather than development, which makes them fast and low-risk compared with changing the application.
Where It Causes Trouble
Stale cached content, the same issue as any caching layer, with the added confusion that it is above the application so clearing the application cache does nothing.
Configuration drift. Proxy configuration is frequently edited by hand on the server and not recorded anywhere, so nobody can reproduce it and a rebuild loses it. It belongs in version control alongside everything else.
Timeouts. The proxy will give up waiting for the application after a set period, and a long-running request such as a large report or import fails with an unhelpful error even though the application was still working.
What To Ask
- What sits in front of our application? There is nearly always something, and sometimes more than one thing.
- Is its configuration in version control? If it only exists on the server, it is unbacked.
- Does it cache, and how do we clear it? Better to find out before a launch than during one.
- What are the timeouts? Relevant for anything slow, and the cause of errors that look like application faults.
- Are redirects handled here? Frequently the cheapest place to do them, and it is where old ones accumulate unreviewed.
More terms are in the glossary.