28 Feb '14, 9am
“4.4. Redeploying (restarting the Rack application) ” / “Phusion Passenger users guide, Nginx version”
How does response buffering - whether it’s done by Nginx or by Phusion Passenger - exactly protect against slow clients? Consider an HTTP client that’s on a dial-up modem link, and your application process generates a 2 MB response. If the response is buffered then your application process will be blocked until the entire 2 MB has been sent out to the HTTP client. This disallows your application process to do any useful work in the mean time. By buffering responses, Phusion Passenger or Nginx will read the application response as quickly as possible and will take care of forwarding the data to slow clients.