nginx / unit

NGINX Unit - universal web app server - a lightweight and versatile open source server that simplifies the application stack by natively executing application code across eight different programming language runtimes.
https://unit.nginx.org
Apache License 2.0
5.25k stars 320 forks source link

Chunked: Unit can send data to target from buffers before full stream is received #1282

Open avahahn opened 1 month ago

avahahn commented 1 month ago

Unit currently buffers the entire client request before sending it to an upstream target. This target could be an application or an upstream HTTP service. Either way, Unit will not start transferring data until it has the whole request from the client.

In order to support more expedient request processing Unit could possibly start streaming its requests to upstream and application targets as soon as it begins receiving data from the client. In order to accomplish that this ticket embodies the following work