1. 23 Sep, 2007 3 commits
  2. 21 Sep, 2007 5 commits
  3. 20 Sep, 2007 19 commits
  4. 18 Sep, 2007 1 commit
  5. 12 Sep, 2007 7 commits
  6. 07 Sep, 2007 1 commit
  7. 04 Sep, 2007 3 commits
  8. 31 Aug, 2007 1 commit
    • Cecilie Fritzvold's avatar
      Added support for load balancing among backends in varnish. It is still experimental · 0b0c12a1
      Cecilie Fritzvold authored
      and very basic, but it should be ready for testing. Two strategies for load balancing
      are implemented: a simple round robin, and a simple weighted random. The following
      is an example configuration in vcl. The weight parameter for random is optional. Default
      is equal weight.
      
      backend foo {
      	set backend.host = "foo.bar.com";
      	set backend.port = "http";
      }
      
      backend_round_robin rr {
      	set backend.set = {
      		{ "foo1.bar.com", "http" }
      		{ "foo2.bar.com", "http" }
      		{ "foo3.bar.com", "http" }
      	};
      }
      
      backend_random rrr {
      	set backend.set = {
      		{ "foo1.bar.com", "http", 0.3 }
      		{ "foo2.bar.com", "http", 0.6 }
      		{ "foo3.bar.com", "http", 0.1 }
      	};
      }
      
      sub vcl_recv {
      	if {req.http.host ~ "foo"} {
      		req.backend = foo;
      	} elseif {req.http.host ~ "bar"} {
      		req.backend = rr;
      	} else {
      		req.backend = rrr;
      	}
      }
      
      
      
      
      git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1931 d4fa192b-c00b-0410-8231-f00ffab90ce4
      0b0c12a1