when to close backend connection for retry?

Nils Goroll slink at schokola.de
Mon Dec 1 19:00:08 CET 2014


>We should revisit this later to check if we don't close the backend connection
>unnecessarily.

In vbe_dir_finish() via VDI_Finish() we close the backend connection for
bo->doclose != SC_NULL

For a retry, we force a close via SC_RESP_CLOSE if bo->director_state != DIR_S_NULL

Can we rely on the director_state to determine if we need to close or not?

Also, instead of closing we could drain-read the body, but I agree that closing
should be more efficient for many/most? backends, although, IIUC, I have once
come across one which didn't like closing.


Nils



More information about the varnish-dev mailing list