# FIN/ACK closes upstream connection for HTTP, but not for HTTPS

**URL:** <https://www.ruby-forum.com/t/fin-ack-closes-upstream-connection-for-http-but-not-for-https/203657>\
**Category:** NGINX\
**Created:** [February 24, 2011, 3:16pm UTC](https://www.ruby-forum.com/t/fin-ack-closes-upstream-connection-for-http-but-not-for-https/203657 "2011-02-24T15:16:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [February 24, 2011, 3:16pm UTC](https://www.ruby-forum.com/t/fin-ack-closes-upstream-connection-for-http-but-not-for-https/203657/1 "2011-02-24T15:16:13Z")

</div>

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:

1. client connects to nginx
2. nginx connects to upstream
3. …
4. client sends FIN/ACK to nginx
5. nginx sends FIN/ACK to upstream, and to client

With ssl on:

1. client connects to nginx
2. nginx connects to upstream
3. …
4. client sends FIN/ACK to nginx
5. nginx waits 60 seconds
6. 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
