Hi!
This is the 2.2 Virtual Server patch for the Linux kernel version 2.2.7.
It was not very well tested, so please be careful with it.
With 2.2, you can change scheduling algorithms without recompiling the
kernel. You can attach a different scheduling algorithm to each virtual
service. Therefore you specify a service first and tell which scheduling
algorithm you want with it, and later add real servers to the virtual
service.
Here is a sample configuration file with 192.168.1.11 as a virtual
address and 192.168.1.98 and 192.168.1.99 as real servers:
echo "1" > /proc/sys/net/ipv4/ip_forward
# set up the telnet service and make it use Round Robin scheduler
ipvsadm -A -t 192.168.1.11:23 -s rr
# add real servers to the telnet service
ipvsadm -a -t 192.168.1.11:23 -r 192.168.1.99
ipvsadm -a -t 192.168.1.11:23 -r 192.168.1.98
# set up the http service and make it use Weighted Least Connection
# scheduler
ipvsadm -A -t 192.168.1.11:80 -s wlc
# add real servers to the http service
ipvsadm -a -t 192.168.1.11:80 -r 192.168.1.99 -w 3
ipvsadm -a -t 192.168.1.11:80 -r 192.168.1.98 -w 2
# display current configuration
ipvsadm -l
When services are added, scheduling modules are loaded if necessary.
In the previous configuration, two scheduling modules get loaded, namely
ip_vs_rr.o and ip_vs_wlc.o. Therefore make sure to rebuild the modules,
install them and run depmod before starting the virtual server.
Actually 'rr' and 'wlc' are currently the only implemented scheduling
modules, but others are on the way.
Default forwarding method is direct routing, but using the -i or -m, you
can as well select the tunneling or masquerading method. Local-node
feature is also supported. ((Please NOTE that tunneling is at the moment
an unsupported feature, so don't configure it.))
Real servers should be configured in the same way as described on the
Wensong's web pages. Actually 2.0 machines still do better as real
servers than 2.2 machines, because of several ARP related problems with
the 2.2 kernel. However I have successfully tested 2.2-only network
using the fake utility. ARP is the most important problem to resolve for
the 2.2 Virtual Server.
Good luck,
Peter
P.S. The development was supported by Pacific HiTech,
distributors of the TurboLinux.
ipvs-0.1-2.2.7.tar.gz
Description: GNU Zip compressed data
|