0% found this document useful (0 votes)
64 views12 pages

Lo A DBA Lancer

Load Balancing is a computer networking methodology to distribute workload across multiple computers. DR Mode is 8 times quicker than NAT for HTTP, 50 times quicker for terminal services and much, much faster for streaming media or FTP. HA mode ensure services up and running all the time.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODP, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views12 pages

Lo A DBA Lancer

Load Balancing is a computer networking methodology to distribute workload across multiple computers. DR Mode is 8 times quicker than NAT for HTTP, 50 times quicker for terminal services and much, much faster for streaming media or FTP. HA mode ensure services up and running all the time.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODP, PDF, TXT or read online on Scribd
You are on page 1/ 12

Load balancer Concept and Implementation

1. 2. 3. 4. 5. Concept of Load Balancing Load Balancing vs High Availability Types Methodology of Load Balancing How to Configure loadbalancer(tm) Case Study

Concept of Load Balancing


Load Balancing is a computer networking methodology to distribute workload across multiple computers Load Balancer listen for a connection, forward it to one of the real backend servers. Persistent Session to any real servers can be kept to maintain i.e. session management, cookie management, etc... Persistent connection will ensure connection to the same real server from the particular same client

Load Balancing vs High Availability


Load balancing ensures all resources is used optimally, while High Availability (HA) ensure services up and running all the time. Mixing LB and HB would possible as long as peak workload on the balanced Server spread across nomore than half of the max capabilities. Load Balancing creates another single point of failure. Paired LB diminish it.

Types of methodology in Implementing LB DR (Direct Routing) NAT SNAT

DR (Direct Routing) works by changing the destination MAC address of the incoming packet on the fly which is very fast. On average, DR mode is 8 times quicker than NAT for HTTP, 50 times quicker for terminal services and much, much faster for streaming media or FTP. Port translation is not possible in DR mode i.e. have a different RIP port than the VIP port.

NAT Load Balancing method


fairly high performance solution but it requires the implementation of a two arm infrastructure with an internal and external subnet to carry out the translation (the same way a firewall works) The real servers must have their default gateway configured to point at the load balancer. Alternative when DR Mode is not possible

SNAT Load Balancing


Layer 7 allows great flexibility including full SNAT and WAN load balancing, HTTP or RDP cookie insertion and URL switching. The load balancer proxies the application traffic to the servers so that the source of all traffic becomes the load balancer. The clients source IP address will be in the x-forwarded-for header

How to Configure loadbalancer.org


Connect to the network, and Power up Configuration via the Web Interface

Web Interface
Default address http://192.168.2.21:9080/lbadmin Default login information username: loadbalancer password: loadbalancer Using Setup wizard to simplify system-wide configuration EDIT CONFIGURATION > SETUP WIZARD

Web Interface (continued)


Adding Real Servers (layer 4) EDIT CONFIGURATION > REAL SERVERS You just need to give the IP address and port number of your web serve Correctly specify your real servers IP address and service port Weight defaults to 1 making real servers active immediately

Realserver Configuration (Linux OS) If you are using a one-arm DR load balancing method each web server requires the ARP problem to be handled. Every real server must be configured to respond to the VIP address as well as the RIP address. This is because in DR mode load balanced traffic arrives on the VIP address but the load balancer health checks are on the real server's IP

DR Mode ARP Solving


With iptables
iptables -t nat -A PREROUTING -p tcp d VIP_ADDRESS -j REDIRECT

with arp_ignore sysctl values Each real server needs a loopback IP address to be configured as the VIP. This address needs to be stopped from responding to ARP requests and the web server needs to be configured to respond to this IP address. Edit /etc/sysctl.conf, and run the file
net.ipv4.conf.all.arp_ignore=1 net.ipv4.conf.eth0.arp_ignore=1 net.ipv4.conf.eth1.arp_ignore=1 net.ipv4.conf.all.arp_announce=2 net.ipv4.conf.eth0.arp_announce=2 net.ipv4.conf.eth1.arp_announce=2 /sbin/sysctl.conf p

to reload

You might also like