proxy-control
Controls request buffering for the upstream.
proxy-controlPriority 21990What it does
proxy-control decides how a request body reaches the backend. The gateway reads every request body in full before it calls the backend, and with Request buffering off it passes the body on as it arrives instead.
Turning the row on changes nothing, since the gateway already reads every body in full. The plugin is worth adding only to turn buffering off.
When to use it
- Partners upload large order files through the partner portal, and the backend should start reading each one before the last byte arrives.
- A backend that accepts a long stream of order events in one request body and acts on each as it comes.
- Uploads too large to hold in full on the gateway while they arrive.
Not for passing the backend's answer to the client as it arrives — see proxy-buffering (Controls response buffering from the upstream), the largest request body a route takes — see client-control (Controls the client request body size) or refusing a request whose body does not match a schema — see request-validation (Validates request headers and body against a JSON Schema).
Set it up
Pass a large upload straight to the backend without buffering it
Turn off Request buffering.
{
"request_buffering": false
}
Things to know
- Request buffering — The gateway already reads every request body in full before it calls the upstream, so the only thing this row changes is turning that off.
- Request buffering — The row is a switch: the text
falsein quotes is refused when you save. - AdviceTurn buffering off only on the routes that take large or long uploads, and leave the others as they are.
Settings
The fields as the console shows them, section by section.
request_bufferingbooleandefault trueOff, the request body is passed to the upstream as it arrives instead of being read in full first.