Marvin3
Marvin3

Reputation: 6051

Why Varnish sess_timeout is so low by default?

Varnish has parameter sess_timeout(docs here), by default it is set to 5 seconds. Which means that after 5 seconds the session will be closed, and next page load will require will require extra 100ms (in average) to connect to server (I've described this issue here).

Upvotes: 2

Views: 699

Answers (1)

lkarsten
lkarsten

Reputation: 2981

sess_timeout is tuned to avoid keeping state around when it is not needed. Worker threads are (in high traffic situations) a precious resource, and having one waiting around doing nothing isn't productive.

For all HTTP clients I know, manual netcat/telnet excluded, it does not take 5s to push through the 100-150 byte long HTTP request.

You can safely increase this to 60s if you feel you need to. If you are using this for long-running connections, you should probably use return(pipe) instead; different timers apply there.

Upvotes: 2

Related Questions