Update3: [PATCH] Instruct the kernel to reset the connection for SC_RX_TIMEOUT, and others

Nils Goroll slink at schokola.de
Mon Mar 2 21:33:00 CET 2015


phk had the great idea to add a "quick close" for SC_RX_BAD and SC_RX_JUNK.

Another updated patch attached.

On 02/03/15 21:05, Nils Goroll wrote:
> On 01/03/15 10:05, Poul-Henning Kamp wrote:
>> The problem with !SO_LINGER (we tried it some years back) is that
>> all queued data is discarded the moment you call close(2), and we
>> have no way to know if our last response is still lingering in the
>> kernel's tcp-buffers and dribbling out to a slow client with a bad
>> mobile phone connection.
> 
> I finally have understood the issue with http keepalive here and that kernels
> behave differently than how I thought they would. Also I have now understood
> that phk had already invested significant effort into this and I basically also
> ended up "out-of-ideas".
> 
> Except for this: As long was we know that we cannot possibly have written
> anything, we should we OK to close with RST.
> 
> The attached updated patch takes a simplistic approach to this.
> 
> Nils
> 
> 
> 
> _______________________________________________
> varnish-dev mailing list
> varnish-dev at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Instruct-the-kernel-to-reset-the-connection-for-SC_R.patch
Type: text/x-patch
Size: 8844 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20150302/ccecbe41/attachment.bin>


More information about the varnish-dev mailing list