[Varnish] #45: Bodyless response to "pass"-ed request is not delivered to client until server closes connection.

Varnish varnish-bugs at projects.linpro.no
Tue Sep 26 14:57:30 CEST 2006


#45: Bodyless response to "pass"-ed request is not delivered to client until
server closes connection.
----------------------+-----------------------------------------------------
 Reporter:  ilmari    |       Owner:  phk
     Type:  defect    |      Status:  new
 Priority:  normal    |   Milestone:     
Component:  varnishd  |     Version:     
 Severity:  major     |    Keywords:     
----------------------+-----------------------------------------------------
 When a response to a "pass"-ed request does not contain a body (e.g. 304
 Not Modified), the response is not sent to the client until the server
 closes the connection, which can take quite a while with keep-alive.

 Below is the tcpdump output from a request that returns 304 Not Modifed.

 Commands run:
 {{{
 $ varnishd -a localhost:8080 -b localhost:80 -s malloc
 pclose=0
 Creating new SHMFILE
 $ time GET -H'Cookie: foo=bar;' -H'If-Modified-Since: Tue, 26 Sep 2006
 11:59:35 GMT' http://localhost:8080/munin/logo.png

 real    0m15.223s
 user    0m0.180s
 sys     0m0.016s
 $ time GET -H'If-Modified-Since: Tue, 26 Sep 2006 11:59:35 GMT'
 http://localhost:8080/munin/logo.png

 real    0m0.229s
 user    0m0.160s
 sys     0m0.036s
 }}}

 tcpdump output with Cookie: header:
 {{{
 13:53:26.218801 IP 127.0.0.1.50388 > 127.0.0.1.8080: S
 2847047928:2847047928(0) win 32767 <mss 16396,sackOK,timestamp 304589522
 0,nop,wscale 2>
 13:53:26.219033 IP 127.0.0.1.8080 > 127.0.0.1.50388: S
 2836769038:2836769038(0) ack 2847047929 win 32767 <mss
 16396,sackOK,timestamp 304589522 304589522,nop,wscale 2>
 13:53:26.219153 IP 127.0.0.1.50388 > 127.0.0.1.8080: . ack 1 win 8192
 <nop,nop,timestamp 304589522 304589522>
 13:53:26.234429 IP 127.0.0.1.50388 > 127.0.0.1.8080: P 1:200(199) ack 1
 win 8192 <nop,nop,timestamp 304589526 304589522>
 13:53:26.235399 IP 127.0.0.1.8080 > 127.0.0.1.50388: . ack 200 win 8192
 <nop,nop,timestamp 304589526 304589526>
 13:53:26.236122 IP 127.0.0.1.42755 > 127.0.0.1.80: S
 2840243111:2840243111(0) win 32767 <mss 16396,sackOK,timestamp 304589527
 0,nop,wscale 2>
 13:53:26.236144 IP 127.0.0.1.80 > 127.0.0.1.42755: S
 2836481646:2836481646(0) ack 2840243112 win 32767 <mss
 16396,sackOK,timestamp 304589527 304589527,nop,wscale 2>
 13:53:26.236378 IP 127.0.0.1.42755 > 127.0.0.1.80: . ack 1 win 8192
 <nop,nop,timestamp 304589527 304589527>
 13:53:26.236572 IP 127.0.0.1.42755 > 127.0.0.1.80: P 1:176(175) ack 1 win
 8192 <nop,nop,timestamp 304589527 304589527>
 13:53:26.236585 IP 127.0.0.1.80 > 127.0.0.1.42755: . ack 176 win 8192
 <nop,nop,timestamp 304589527 304589527>
 13:53:26.237992 IP 127.0.0.1.80 > 127.0.0.1.42755: P 1:133(132) ack 176
 win 8192 <nop,nop,timestamp 304589527 304589527>
 13:53:26.238214 IP 127.0.0.1.42755 > 127.0.0.1.80: . ack 133 win 8192
 <nop,nop,timestamp 304589527 304589527>
 13:53:41.251697 IP 127.0.0.1.80 > 127.0.0.1.42755: F 133:133(0) ack 176
 win 8192 <nop,nop,timestamp 304593280 304589527>
 13:53:41.251865 IP 127.0.0.1.8080 > 127.0.0.1.50388: P 1:156(155) ack 200
 win 8192 <nop,nop,timestamp 304593280 304589526>
 13:53:41.251878 IP 127.0.0.1.50388 > 127.0.0.1.8080: . ack 156 win 8192
 <nop,nop,timestamp 304593280 304593280>
 13:53:41.251907 IP 127.0.0.1.42755 > 127.0.0.1.80: F 176:176(0) ack 134
 win 8192 <nop,nop,timestamp 304593280 304593280>
 13:53:41.251982 IP 127.0.0.1.8080 > 127.0.0.1.50388: F 156:156(0) ack 200
 win 8192 <nop,nop,timestamp 304593280 304593280>
 13:53:41.253845 IP 127.0.0.1.50388 > 127.0.0.1.8080: F 200:200(0) ack 157
 win 8192 <nop,nop,timestamp 304593281 304593280>
 13:53:41.253878 IP 127.0.0.1.8080 > 127.0.0.1.50388: . ack 201 win 8192
 <nop,nop,timestamp 304593281 304593281>
 13:53:41.259468 IP 127.0.0.1.80 > 127.0.0.1.42755: . ack 177 win 8192
 <nop,nop,timestamp 304593282 304593280>
 }}}

 tcpdump output without Cookie: header:
 {{{
 13:55:09.015427 IP 127.0.0.1.50404 > 127.0.0.1.8080: S
 2938586104:2938586104(0) win 32767 <mss 16396,sackOK,timestamp 304615221
 0,nop,wscale 2>
 13:55:09.015454 IP 127.0.0.1.8080 > 127.0.0.1.50404: S
 2937934840:2937934840(0) ack 2938586105 win 32767 <mss
 16396,sackOK,timestamp 304615221 304615221,nop,wscale 2>
 13:55:09.015729 IP 127.0.0.1.50404 > 127.0.0.1.8080: . ack 1 win 8192
 <nop,nop,timestamp 304615221 304615221>
 13:55:09.032170 IP 127.0.0.1.50404 > 127.0.0.1.8080: P 1:182(181) ack 1
 win 8192 <nop,nop,timestamp 304615225 304615221>
 13:55:09.032334 IP 127.0.0.1.8080 > 127.0.0.1.50404: . ack 182 win 8192
 <nop,nop,timestamp 304615225 304615225>
 13:55:09.032430 IP 127.0.0.1.42771 > 127.0.0.1.80: S
 2938901309:2938901309(0) win 32767 <mss 16396,sackOK,timestamp 304615225
 0,nop,wscale 2>
 13:55:09.032447 IP 127.0.0.1.80 > 127.0.0.1.42771: S
 2940896759:2940896759(0) ack 2938901310 win 32767 <mss
 16396,sackOK,timestamp 304615225 304615225,nop,wscale 2>
 13:55:09.032465 IP 127.0.0.1.42771 > 127.0.0.1.80: . ack 1 win 8192
 <nop,nop,timestamp 304615225 304615225>
 13:55:09.032656 IP 127.0.0.1.42771 > 127.0.0.1.80: P 1:108(107) ack 1 win
 8192 <nop,nop,timestamp 304615225 304615225>
 13:55:09.032668 IP 127.0.0.1.80 > 127.0.0.1.42771: . ack 108 win 8192
 <nop,nop,timestamp 304615225 304615225>
 13:55:09.034235 IP 127.0.0.1.80 > 127.0.0.1.42771: P 1:710(709) ack 108
 win 8192 <nop,nop,timestamp 304615226 304615225>
 13:55:09.034391 IP 127.0.0.1.42771 > 127.0.0.1.80: . ack 710 win 8192
 <nop,nop,timestamp 304615226 304615226>
 13:55:09.034974 IP 127.0.0.1.8080 > 127.0.0.1.50404: P 1:173(172) ack 182
 win 8192 <nop,nop,timestamp 304615226 304615225>
 13:55:09.034987 IP 127.0.0.1.50404 > 127.0.0.1.8080: . ack 173 win 8192
 <nop,nop,timestamp 304615226 304615226>
 13:55:09.035167 IP 127.0.0.1.8080 > 127.0.0.1.50404: F 173:173(0) ack 182
 win 8192 <nop,nop,timestamp 304615226 304615226>
 13:55:09.037194 IP 127.0.0.1.50404 > 127.0.0.1.8080: F 182:182(0) ack 174
 win 8192 <nop,nop,timestamp 304615226 304615226>
 13:55:09.037227 IP 127.0.0.1.8080 > 127.0.0.1.50404: . ack 183 win 8192
 <nop,nop,timestamp 304615226 304615226>
 13:55:24.086551 IP 127.0.0.1.80 > 127.0.0.1.42771: F 710:710(0) ack 108
 win 8192 <nop,nop,timestamp 304618989 304615226>
 13:55:24.130333 IP 127.0.0.1.42771 > 127.0.0.1.80: . ack 711 win 8192
 <nop,nop,timestamp 304618999 304618989>
 }}}

-- 
Ticket URL: <http://varnish.projects.linpro.no/ticket/45>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator


More information about the varnish-bugs mailing list