Per,

I appreciate your interest in this issue.

>
> Have a look at varnishlog. There might be a hint there what is going on.
> Maybe there are connectivity issues with the first backend?
>

Connectivity is fine for both hosts.

I have gone through several tests, this time with two hosts, and I
can't be confident that the load balancer is working. varnish seems to
establish a preference for one host and stick with it.

I also tried using probes, and random.

To refresh, each hosts is an apache virtual host on the same IP
address with a different host name and port number.

round robin with probes: stays with one hosts even if the weight of
the other host is the same or greater.

round robin (no probes): will cycle between hosts if one has
index.html and the other has index.cgi or no index file.

I tried clearing the browser cache, and using multiple browsers.
However all requests are from the same host. I am still wondering if
it is something to do with my environment.

I will paste some varnishlog and varnishstat data for a simple case
with two RR hosts, and no probes.

Thanks again. I'll continue to look into it.

varnishlog (2 requests): please find attached vlog.txt
varnishstatus:

0+00:14:32
                              theloin
Hitrate ratio:        0        0        0
Hitrate avg:     0.0000   0.0000   0.0000

          11         0.00         0.01 Client connections accepted
          35         0.00         0.04 Client requests received
           0         0.00         0.00 Cache hits
           0         0.00         0.00 Cache hits for pass
           0         0.00         0.00 Cache misses
          35         0.00         0.04 Backend connections success
           0         0.00         0.00 Backend connections not attempted
           0         0.00         0.00 Backend connections too many
           0         0.00         0.00 Backend connections failures
          17         0.00         0.02 Backend connections reuses
          35         0.00         0.04 Backend connections recycles
           0         0.00         0.00 Backend connections unused
           1          .            .   N struct srcaddr
           0          .            .   N active struct srcaddr
           2          .            .   N struct sess_mem
           1          .            .   N struct sess
           0          .            .   N struct object
           2          .            .   N struct objecthead
           3          .            .   N struct smf
           0          .            .   N small free smf
           3          .            .   N large free smf
           2          .            .   N struct vbe_conn
           1          .            .   N struct bereq
          10          .            .   N worker threads
          10         0.00         0.01 N worker threads created
           0         0.00         0.00 N worker threads not created
           0         0.00         0.00 N worker threads limited
           0         0.00         0.00 N queued work requests
           0         0.00         0.00 N overflowed work requests
           0         0.00         0.00 N dropped work requests
           2          .            .   N backends
           0          .            .   N expired objects
           0          .            .   N LRU nuked objects
           0          .            .   N LRU saved objects
           0          .            .   N LRU moved objects
           0          .            .   N objects on deathrow
           0         0.00         0.00 HTTP header overflows
           0         0.00         0.00 Objects sent with sendfile
          20         0.00         0.02 Objects sent with write

regards,
Michael
    0 CLI          - Rd ping
    0 CLI          - Wr 0 200 PONG 1226916062 1.0
    9 SessionOpen  c 192.168.1.2 4273 192.168.1.53:8080
    9 ReqStart     c 192.168.1.2 4273 316424748
    9 RxRequest    c GET
    9 RxURL        c /
    9 RxProtocol   c HTTP/1.1
    9 RxHeader     c Host: theloin:8080
    9 RxHeader     c User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; 
en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4
    9 RxHeader     c Accept: 
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    9 RxHeader     c Accept-Language: en-us,en;q=0.5
    9 RxHeader     c Accept-Encoding: gzip,deflate
    9 RxHeader     c Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    9 RxHeader     c Keep-Alive: 300
    9 RxHeader     c Connection: keep-alive
    9 RxHeader     c If-Modified-Since: Mon, 17 Nov 2008 08:47:54 GMT
    9 RxHeader     c If-None-Match: "7352c-e-a27fe280"
    9 RxHeader     c Cache-Control: max-age=0
    9 VCL_call     c recv
    9 VCL_return   c pass
    9 VCL_call     c pass
    9 VCL_return   c pass
   12 BackendClose - www1
   12 BackendOpen  b www1 127.0.0.1 60308 127.0.0.1 81
    9 Backend      c 12 rrdirector www1
   12 TxRequest    b GET
   12 TxURL        b /
   12 TxProtocol   b HTTP/1.1
   12 TxHeader     b Host: theloin:8080
   12 TxHeader     b User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; 
en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4
   12 TxHeader     b Accept: 
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
   12 TxHeader     b Accept-Language: en-us,en;q=0.5
   12 TxHeader     b Accept-Encoding: gzip,deflate
   12 TxHeader     b Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
   12 TxHeader     b If-Modified-Since: Mon, 17 Nov 2008 08:47:54 GMT
   12 TxHeader     b If-None-Match: "7352c-e-a27fe280"
   12 TxHeader     b X-Varnish: 316424748
   12 TxHeader     b X-Forwarded-For: 192.168.1.2
   12 RxProtocol   b HTTP/1.1
   12 RxStatus     b 200
   12 RxResponse   b OK
   12 RxHeader     b Date: Mon, 17 Nov 2008 10:01:03 GMT
   12 RxHeader     b Server: Apache/2.2.3 (Ubuntu) mod_perl/2.0.2 Perl/v5.8.8
   12 RxHeader     b Last-Modified: Mon, 17 Nov 2008 08:47:50 GMT
   12 RxHeader     b ETag: "7352a-e-a242d980"
   12 RxHeader     b Accept-Ranges: bytes
   12 RxHeader     b Content-Length: 14
   12 RxHeader     b Content-Type: text/html; charset=UTF-8
    9 ObjProtocol  c HTTP/1.1
    9 ObjStatus    c 200
    9 ObjResponse  c OK
    9 ObjHeader    c Date: Mon, 17 Nov 2008 10:01:03 GMT
    9 ObjHeader    c Server: Apache/2.2.3 (Ubuntu) mod_perl/2.0.2 Perl/v5.8.8
    9 ObjHeader    c Last-Modified: Mon, 17 Nov 2008 08:47:50 GMT
    9 ObjHeader    c ETag: "7352a-e-a242d980"
    9 ObjHeader    c Content-Type: text/html; charset=UTF-8
   12 BackendReuse b www1
    9 TTL          c 316424748 RFC 120 1226916063 0 0 0 0
    9 VCL_call     c fetch
    9 VCL_return   c deliver
    9 Length       c 0
    9 VCL_call     c deliver
    9 VCL_return   c deliver
    9 TxProtocol   c HTTP/1.1
    9 TxStatus     c 304
    9 TxResponse   c Not Modified
    9 TxHeader     c Date: Mon, 17 Nov 2008 10:01:03 GMT
    9 TxHeader     c Via: 1.1 varnish
    9 TxHeader     c X-Varnish: 316424748
    9 TxHeader     c Last-Modified: Mon, 17 Nov 2008 08:47:50 GMT
    9 TxHeader     c Connection: keep-alive
    9 ReqEnd       c 316424748 1226916063.045919657 1226916063.047186613 
0.008432627 0.001191616 0.000075340
    0 StatAddr     - 192.168.1.2 0 736 9 30 0 30 30 7524 313
    9 ReqStart     c 192.168.1.2 4273 316424749
    9 RxRequest    c GET
    9 RxURL        c /
    9 RxProtocol   c HTTP/1.1
    9 RxHeader     c Host: theloin:8080
    9 RxHeader     c User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; 
en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4
    9 RxHeader     c Accept: 
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    9 RxHeader     c Accept-Language: en-us,en;q=0.5
    9 RxHeader     c Accept-Encoding: gzip,deflate
    9 RxHeader     c Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    9 RxHeader     c Keep-Alive: 300
    9 RxHeader     c Connection:
_______________________________________________
varnish-misc mailing list
[email protected]
http://projects.linpro.no/mailman/listinfo/varnish-misc

Reply via email to