Skip to main content

Module upstream

Module upstream 

Source
Expand description

The upstream node — forwards the request to a backend target over HTTP, with round-robin, least-connections, or IP-hash load balancing across the configured targets, and writes the backend’s reply into Context.response.

Structs§

UpstreamPlugin
Proxies the request to one of the configured backend targets and populates Context.response with the upstream’s status, headers, and body.

Functions§

forwarded_headers 🔒
Forwards the request’s headers to the upstream, overriding Host with the selected target. Shared by both execute branches via UpstreamPlugin::outbound_request.
map_outbound_error 🔒
Maps an OutboundError to the (code, message) pair used on this node’s error port. Shared by the buffered and streaming branches so a fix to one (e.g. a wording or timeout-classification change) can’t land in only one of them.
request_target 🔒
The outbound request-target: the request path plus the rebuilt query string when the request carried one.