2 ms·
Logically the purpose of proxy buffering is to prevent server death from clients holding connections open by reading the data very slowly (slowloris attack). Bu
by barrkel 5y ago
Logically the purpose of proxy buffering is to prevent server death from clients holding connections open by reading the data very slowly (slowloris attack). But this doesn't require waiting for the entire upstream response before sending bytes to the client; merely that reading from upstream doesn't stop when the client is reading slowly. It looks like nginx does this while still preventing slowloris.
The parameters mentioned look like they're about tuning the relative memory costs of sending down the first bit of data in a response, which may contain enough information on the client side to do something interesting. proxy_buffer_size looks like it's just the first buffer, while the size argument to proxy_buffers applies to all the buffers.
- pas 5y agoBut it seems it's about response buffering, not incoming (request) buffering. (Or to be more precise slowloris can be done on either/both leg(s) of the request-response process.)