[lvs-users] DR-mode realserver selection via consistent hashing on request URL?

Josh Adams josh at gmail.com
Tue Nov 17 17:08:48 GMT 2009

Hi Joe, thanks for the quick response!

I initially thought scheduling based on a hash of the destination IP
wouldn't do it for me but now I'm starting to see a way for this to
work.  It looked like most or all of the time when people talked about
using the DH scheduler they were setting up a reverse proxy out to the
world for their users within some (presumably) large internal network,
in which case the dest IP would generally be quite meaningful in terms
of distributing cache objects across some set of cache servers.

The setup I'm working with is roughly the opposite of this scenario in
terms of traffic flow.  I have a lot of content on the backend which
is slow and needs caching in front of it.  The caching is significant
as far as hardware outlay and to keep duplication of cost down it
needs some switching/load balancing in front of it smart enough to
partition the incoming traffic (from the wild-wild-web) such that the
caching servers each see a unique slice of objects as consistently as

So, if I can make the request objects I receive be partitioned equally
on IP I can certainly entertain the DH scheduler option.  I think this
is possible so now I'm interested if the behavior of the scheduler
would meet our needs.  Say we have N dest IPs that each map to roughly
1/N worth of objects.  If I have say, (N+2)=K realservers, how would
the DH scheduler map N over K?  Would it pick some deterministic set
of N worth of live Ks and map 1:1?

If that assumption is at all correct what happens to the distribution
of N over K when a realserver that's currently in use goes down?  Does
the scheduler redraw the entire map, effectively reshuffling it?  Or
does it reorganize the distribution similar to the way consistent
hashing does it?  That way the least amount of change is made to the
map, retaining existing cache efficiency?

Thanks very much for your help!

On Tue, Nov 17, 2009 at 05:55, Joseph Mack NA3T <jmack at wm7d.net> wrote:
> On Mon, 16 Nov 2009, Josh Adams wrote:
>> Ideally I could somehow get LVS to schedule requests by
>> running consistent hashing against the request URL,
> does the dh scheduler do it for you?
> Joe
> --
> Joseph Mack NA3T EME(B,D), FM05lw North Carolina
> jmack (at) wm7d (dot) net - azimuthal equidistant map
> generator at http://www.wm7d.net/azproj.shtml
> Homepage http://www.austintek.com/ It's GNU/Linux!
> _______________________________________________
> Please read the documentation before posting - it's available at:
> http://www.linuxvirtualserver.org/
> LinuxVirtualServer.org mailing list - lvs-users at LinuxVirtualServer.org
> Send requests to lvs-users-request at LinuxVirtualServer.org
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users

More information about the lvs-users mailing list