Connection:Keep-Alive vs Keep-Alive:timeout=xxxx

Connection:Keep-Alive is indicate keep connection not to close. Keep-Alive header is controlling details such as how long you can actively close connection. In general these two header are coordinating to control re-use connection to avoid frequent handover heavy process.

There two important parameters can be configured for Keep-Alive,

  • timeout,  the most widely used to control the time to maintain idle connection
  • max, control the number of requests through re-used connection. After server received max number requests it can safely close connection. And when client send out max number requests it can safely close connection in its side.

So there will be a uncommon combination if you set Connection:Keep-Alive and Keep-Alive:timeout=0. What’s behavior I leave the answer to reader. 🙂

One thought on “Connection:Keep-Alive vs Keep-Alive:timeout=xxxx

Leave a Reply

Your email address will not be published. Required fields are marked *