Site Administration Page 2 - Load-Balanced Clusters |
The simplest form of load balancing is round-robin DNS, where multiple A records are defined for the same name; this results in the servers taking turns responding to any incoming requests. This doesn’t work well if a server fails, though, and it doesn’t take into account any special needs the service may have. With HTTP, for example, we might need to maintain session data such as authentication or cookies and ensure that the same client always connects to the same server. To meet these needs, we’ll get a little more sophisticated and use two tools:
The installation instructions are based on the Debian 3.1 (Sarge) Linux distribution. IPVS on the Load BalancerSince IPVS is already in the Linux kernel, we don’t need to install any software, but we do need to configure it. On lb, add these lines to /etc/modules. ip_vs_dh Then load the modules into the kernel: # modprobe ip_vs_dh To enable packet forwarding in the Linux kernel on lb, edit the file /etc/sysctl.conf and add this line: net.ipv4.ip_forward = 1 Then load this setting into the kernel: # sysctl -p
blog comments powered by Disqus |