pre-existing data on a connection

Frank Liu gfrankliu at
Tue Jan 7 00:32:24 UTC 2020


When using nginx as a reverse proxy, how does it handle the
pre-existing data on a keepalive connection to the backend?

eg: for a request, the backend has a bug that sends 2 identical
responses. I assume nginx will take the first response and send it to
client. What will happen to the extra data (duplicate response)? Now
when nginx gets a second request and re-uses the same keepalive
connection to backend, will nginx take the pre-existing data (the
duplicate response for the first request) on that connection and send
it to second client or will it drop those and read the new response
from backend to send to client?
If nginx uses the pre-existing data, all the subsequent requests will
get the response shifted.


More information about the nginx mailing list