I’m running nginx as a reverse proxy to do SSL and load balancing. The
upstream server behind nginx needs to know when the client closes the
connection.
If I turn ssl off, the connection looks like:
- client connects to nginx
- nginx connects to upstream
- …
- client sends FIN/ACK to nginx
- nginx sends FIN/ACK to upstream, and to client
With ssl on:
- client connects to nginx
- nginx connects to upstream
- …
- client sends FIN/ACK to nginx
- nginx waits 60 seconds
- nginx sends FIN/ACK to upstream
What’s going on here? Why does nginx wait for a timeout to send the
FIN/ACK
upstream? Why does the behaviour change when I turn ssl on?
Thanks,
Jeremy