using round-robin to redirect some traffic
Chris Hecker
checker at d6.com
Tue Jul 13 09:44:30 CEST 2010
Yeah, I don't want all the network bandwidth going through the varnish
server, I want to shove some of it over to another machine. The traffic
for the redirect is fine, but the actual file download needs to come
from somewhere else.
Make sense?
Chris
On 2010/07/13 00:30, Michal Taborsky - Netretail Holding wrote:
> Dne 13.7.2010 8:03, Chris Hecker napsal(a):
>>
>> Can I use the director round-robin feature to then check the
>> req.backend with an if statement in vcl_recv, and issue a 302 (using
>> the vcl_error 750 hack) to redirect half the traffic to another
>> server? Is there a better way to do that?
>>
>> Chris
>
> Hello Chris,
>
> I am not sure I understand what exactly are you trying to accomplish,
> but if you only want to have two identical servers behind your Varnish
> serving the traffic, that is a very common scenario. You just define a
> director with your servers in it and then direct your traffic to this
> director. You can choose either the random director, which allows you to
> weigh the backends and distribute the load unevenly, or the round-robin
> type, which is essentially the same as a random with equal weights.
>
> Check out http://www.varnish-cache.org/wiki/LoadBalancing
>
> If your needs are different (you really need to redirect to a different
> URL), please clarify.
>
More information about the varnish-misc
mailing list