Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Varnish: Misc

Round robin weighted 'collections' of backends?

 

 

Varnish misc RSS feed   Index | Next | Previous | View Threaded


n.j.saunders at gmail

Apr 2, 2012, 12:25 PM

Post #1 of 2 (407 views)
Permalink
Round robin weighted 'collections' of backends?

Hi all.

I'd like to determine if it's possible, via hack or otherwise, to
preferentially round robin 'collections' of backends.

For context:

We run services in EC2.

We have 3 web heads, one per availability zone (a,b,c)

For one of our services we have 9 backends, 3 per availability zone
(1a,2a,3a,1b,2b,3b,1c,2c,3c).

All varnish instances know about all backends.

What I'd like to do is have to have each varnish web head in each
availability zone round robin healthy backends in the same AZ, only
"falling back" to web services in another AZ in the event of all services
being sick.

Ie Varnish in AZ 1 round robins 1a,2a,3a, but can fall back
to 1b,2b,3b,1c,2c,3c in the event of sickness, and so forth.

Any advice gratefully received!

Kind Regards,

Neil Saunders.


rtshilston at gmail

Apr 2, 2012, 2:59 PM

Post #2 of 2 (391 views)
Permalink
Re: Round robin weighted 'collections' of backends? [In reply to]

Yes, this is entirely possible and something we use in production. From memory, the essence of the config is:

set req.backend = primarypool;
if (!req.backend.healthy) {
set req.backend = secondarypool;
}

Where both primary and secondary pools are round robin directors.


Rob



On 2 Apr 2012, at 20:28, Neil Saunders <n.j.saunders [at] gmail> wrote:

> Hi all.
>
> I'd like to determine if it's possible, via hack or otherwise, to preferentially round robin 'collections' of backends.
>
> For context:
>
> We run services in EC2.
>
> We have 3 web heads, one per availability zone (a,b,c)
>
> For one of our services we have 9 backends, 3 per availability zone (1a,2a,3a,1b,2b,3b,1c,2c,3c).
>
> All varnish instances know about all backends.
>
> What I'd like to do is have to have each varnish web head in each availability zone round robin healthy backends in the same AZ, only "falling back" to web services in another AZ in the event of all services being sick.
>
> Ie Varnish in AZ 1 round robins 1a,2a,3a, but can fall back to 1b,2b,3b,1c,2c,3c in the event of sickness, and so forth.
>
> Any advice gratefully received!
>
> Kind Regards,
>
> Neil Saunders.
> _______________________________________________
> varnish-misc mailing list
> varnish-misc [at] varnish-cache
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

_______________________________________________
varnish-misc mailing list
varnish-misc [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Varnish misc RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.