Sign in
GUIDE 10 / Deployment

Where does a request go?Meet the reverse proxy.

Learn how reverse proxies route hostnames and how load balancers distribute requests across application instances.

THE SHORT VERSION

A reverse proxy accepts a request and forwards it to a backend.

Routing selects a service; balancing selects an instance.

Healthy replicas still need a plan for shared state.

01 / Traffic routing

One public entrance can serve several applications.

A reverse proxy sits in front of application servers. It receives client requests and forwards them to the relevant backend, then returns responses. It can provide a common place for routing and other connection handling.

A studio might serve www.example.com, app.example.com and api.example.com through one gateway. Their DNS records can lead to that gateway while the proxy configuration decides which service receives each request. Sharing an entrance does not mean all three names run the same application.

Reference: NGINX: reverse proxy concepts
02 / Traffic routing

Choose the service, then choose an instance.

Hostname or path rules can select a destination service. When that service has several suitable instances, a load-balancing policy can distribute work among them. These are two decisions: which application should answer, and which copy should handle this request?

The interactive route map makes those decisions visible. Select the website, API, or an example in which one API instance is unavailable. The final state assumes the gateway has detected the failure and excluded that instance. Actual detection timing and behavior depend on the deployed system.

Reference: NGINX: HTTP load balancing
INTERACTIVE EXPLAINEROne gateway. The right destination.
One gateway. The right destination.
REQUEST HOSTNAMEwww.example.com
Gateway
WebsiteRoute target
API 01Other service
API 02Other service

The requested hostname selects the website service. The API pool is not part of this route.

REQUEST HOSTNAMEapi.example.com
Gateway
WebsiteOther service
API 01Route target
API 02Route target

The hostname selects the API pool. A balancing policy chooses a suitable instance for each request.

REQUEST HOSTNAMEapi.example.com
Gateway
WebsiteOther service
API 01Route target
API 02Excluded

After failure detection, this model routes to API 01 only. Remaining capacity, checks and client retry behavior still matter.

Conceptual example · explore each state
03 / Traffic routing

DNS, proxies and applications work at different layers.

DNS resolves a hostname to information used to locate a destination. A reverse proxy processes the connection at that destination and can route HTTP requests onward. The application implements the actual page or API behavior. Changing one layer does not automatically configure the others.

If a user reaches the wrong service, inspect the requested hostname, DNS answer, gateway rule and backend response in order. This is usually clearer than making several changes at once. A readable routing inventory helps especially when different projects share the same fleet.

DNS, proxies and applications work at different layers.
DecisionExampleHandled by
Find the entranceapi.example.com → gateway addressDNS
Choose the serviceAPI hostname → API poolRouting rule
Choose a copyAPI pool → instance 02Load-balancing policy
Do the workReturn the requested recordApplication
04 / Traffic routing

Two application copies need to agree on the important things.

If a user signs in through one application copy and the next request goes to another, session handling needs to work across that arrangement. Files written only to one instance may be absent from another. Adding replicas can reveal assumptions that were invisible on a single server.

For the studio’s dashboard, identify where sessions, uploads and background jobs live before adding instances. Some systems use shared services for state; others use an explicit affinity strategy. The right choice depends on the application, and balancing alone does not make state portable.

05 / Traffic routing

The gateway is part of the application’s reliability.

Watch the gateway as well as the backends. A healthy API cannot serve public traffic through an unavailable entrance. Review certificates, connection limits, timeouts and error responses as part of the route, rather than treating the proxy as invisible plumbing.

For a planned change, identify the old destination, new destination and how you will verify the switch. Make health checks reflect useful readiness, and give failed requests a diagnosable path. More replicas can improve capacity or resilience, but neither outcome is automatic without the surrounding design.

CLEAR UP THE DETAILS

Common questions.

Is a reverse proxy the same as DNS?

No. DNS helps locate a destination; the proxy handles and forwards requests after clients reach it.

Do I need a separate server for each subdomain?

No. Several hostnames can route through one gateway to services on the same or different hosts.

Does load balancing automatically scale my servers?

No. Distributing requests and adding computing capacity are separate capabilities.

WHERE DOCKOCK FITS

Connect the concept to your work.

DOCKOCK connects public routes with services and server or cluster destinations, so the path from hostname to workload stays visible.

Explore traffic routing in DOCKOCK

Keep learning from the source.

Further reading from the teams and documentation behind these technologies.

NGINX: reverse proxy conceptsNGINX: HTTP load balancing
CONTINUE EXPLORING

Where does your data live?

Separate replaceable application processes from the data that matters.

Read the next guide