round-robin director

Michael Moyle michael at orinoco.jp
Fri Nov 14 13:45:22 CET 2008


Hi,

I am new to the list, and just getting started with varnish.

It appears that the round-robin director is not hitting every node the list.
Is this a bug or does rr have a method for determining which node is best to
hit out of the box.

I set up 4 virtual hosts running on different ports: www1, www2, www3, www4.
In no case would the server access www1. It seems to restrict itself to www3
and www4, is there a problem where it choosing only two nodes? If I moved
the servers to different IP addresses would it help? Of course that is how
it would be configured in production.

If anyone has any insight I would like to know. I can do more tests and
research further, but it would be good to know if I doing something wrong or
this is a known issue.

Please find my config below:

backend www1 {
  .host = "www1";
  .port = "81";
}

backend www2 {
  .host = "www2";
  .port = "82";
}


backend www3 {
  .host = "www3";
  .port = "83";
}

backend www4 {
  .host = "www4";
  .port = "84";

director wwwdirector round-robin {
  { .backend = www2; }
  { .backend = www3; }
  { .backend = www1; }
  { .backend = www4; }
}

sub vcl_recv {
  set req.backend = wwwdirector;

  if ( req.request ) {
#don't cache anything, just load balance
    pass;
  }

}


Thanks!
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20081114/68d47406/attachment-0001.html>


More information about the varnish-misc mailing list