Julian Anastasov wrote:
>
> Hello,
>
> On Mon, 23 Oct 2000, Thomas Proell wrote:
>
> > What is it for?
> > ***************
> >
> > With the "Consistent Hashing Scheduler" you can set up a cache
> > farm with LVS. It is NOT useable for a SERVER-farm, it is designed
> > for CACHES.
>
> What about such setup (not tested):
>
> # 1. Schedule based on Class C destinations: select squid server
> ipchains -A input -d 0.0.0.0/0.0.3.0 80 -p TCP -m 1
> ipchains -A input -d 0.0.1.0/0.0.3.0 80 -p TCP -m 2
> ipchains -A input -d 0.0.2.0/0.0.3.0 80 -p TCP -m 3
> ipchains -A input -d 0.0.3.0/0.0.3.0 80 -p TCP -m 4
>
> # 2. Split the incoming traffic
> ip rule add prio 101 fwmark 1 table 101
> ip rule add prio 102 fwmark 2 table 102
> ip rule add prio 103 fwmark 3 table 103
> ip rule add prio 104 fwmark 4 table 104
>
> # 3. Route the packets to the squid servers
> ip route add table 101 0/0 via squid1 dev eth0
> ip route add table 102 0/0 via squid2 dev eth0
> ip route add table 103 0/0 via squid3 dev eth0
> ip route add table 104 0/0 via squid4 dev eth0
While I haven't tried this (or Thomas' code), this leaves the question
of weighting completely unanswered. The hash based scheduler written by
Thomas also doesn't have weighting...but it should be a relatively
simple matter to add it. I don't see that simple routing lends itself
very well to the kind of flexibility that a hash based scheduler can.
But I may be wrong.
> > Thomas
> >
> >
> > P.S. For those who wonder how LVS can distribute load among caches:
> > You can set up the "ipchains" which seems to be a firewall. With
> > that you can mark all incoming packets. Then, you can set up LVS that
> > way, that it handles all marked packets. It's that easy!
>
> Yes, it is simple even without using LVS :) You can even
> create netfilter module for 2.4 to mark the packets in different
> way (hashes, etc). Then it is a plain routing.
A netfilter module might be a good way to handle the issue. What are
the advantages to this, as opposed to using the LVS as a base? Is there
a compelling reason LVS isn't the right way to achieve web cache
balancing, while netfilter is?
I claim ignorance in both regards. I know that LVS already does most of
what is needed for web cache balancing (and Thomas' code adds most of
what was missing)...What would be needed to write such a netfilter
module in order to compare the difference performance and managability
wise? Got any good links for documentation on the subject?
--
Joe Cooper <joe@xxxxxxxxxxxxx>
Affordable Web Caching Proxy Appliances
http://www.swelltech.com
|