Strategies for splitting load across varnish instances? And avoiding single-point-of-failure?

Poul-Henning Kamp phk at phk.freebsd.dk
Sat Jan 16 22:37:09 CET 2010


In message <d002c4031001161332p2085373bp7c4119aac490a630 at mail.gmail.com>, Micha
el Fischer writes:

>> In message <dcccdf791001161258s3e960aa8t3cd379e42d760a74 at mail.gmail.com>,
>> David
>>  Birdsong writes:
>>
>> >Right, but those 2 remaining are at least still being asked for the
>> >same url's they were prior to the 1 dying.
>>
>> Correct, the hashing is "canonical" in the sense that if the
>> configured backend is up, all traffic for "its" objects will be
>> sent to it.
>
>Are you saying that the default hash is not a mod-n-type algorithm?

Well, it is mod-n, with the footnote that n has nothing to do with
the number of backends, because these have a configurable weight.

>If not, what happens when the failed backend is restored to service?

It's probably simplest to paraphrase the code:

	Calculate hash over full complement of backends.
	Is the selected backend sick
		Calculate hash over subset of healthy backends

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



More information about the varnish-misc mailing list