sticky load balancing: a core feature or

Rob Rogers robertbrogers at gmail.com
Wed Apr 14 19:10:08 CEST 2010


"""
So I also vote for keeping this as a documented configuration rather
than a built-in feature. Unless the planned sticky load balancing will
have something above the rudimentary.
"""

i understand varnish is a fast reverse proxy/httpaccelerator not an  uber-does-it-all service. but, for many implementations we don't want to stack 3-4 services on top of each other. 
would having this as a documented config easily solve the problem of sticky load balancing, without a lot of poking around and configuration? 

(note: i found the default vanilla implementation only working well for images; other pages without the most rudimentary caching config failed to work correctly for me due to two reasons: ignorance, stupidity. In other words, the Vary headers stung me as browser to browser caused different objects to be cached and the default purge implementation could not reach all objects easily)

finally, per adding this config to MY config. how do you do that? That is, i don't want to just copy and paste this vcl snippet into my main varnish.vcl. Is there a way to include vcls from vcls?

Thanks,

Rob


Date: Wed, 14 Apr 2010 14:28:11 +0200
From: Niklas Norberg <niklas.norberg at bahnhof.se>
To: varnish-misc at varnish-cache.org
Subject: Sticky Load Balancing with Varnish
Message-ID: <1271248091.5141.33.camel at app-srv-debian-amdmp2.idni>
Content-Type: text/plain; charset="us-ascii"

Hi,

last week I started writing a sticky load balancer.

At that time (2.0.6) I lacked that req.* wasn't available in vcl_deliver
so I had to use some global C-variables to share data from vcl_recv to
vcl_deliver. Because of this I had to add some thread guard C-code and
all together it worked but I wasn't fully satisfied. The guard code
contained sleep in order to wait for other thread so that just one
thread at a time would go through this "set/get" cycle.

This week I discovered that 2.1.0 was released and that:
- req.* is now available in vcl_deliver.

So I rewrote it, just by removing the thread C-code, and here it is.
I've tested it with JMeter and it balances correct (i.e. according to
the defined weights).

So I also vote for keeping this as a documented configuration rather
than a built-in feature. Unless the planned sticky load balancing will
have something above the rudimentary.

Comments?


With kind regards,

Niklas Norberg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20100414/b9765cf1/attachment-0003.html>


More information about the varnish-misc mailing list