Hello,
In this section, we will learn how to configure load balancing in NetScaler for Web Services and other balancing methods.
To configure load balancing for Web Servers, we need to have 2 Web Server which will be load balanced on NetScaler.
Method of Load Balancing
1. Least Connection;- This is default method Netscaler uses in load balancing and maintain the equal number of Active connections on backend servers. it works with TCP, HTTP, and HTTPS protocols.
2. Round robin:- It method send the connection in sequential order, in case of 4 WebServer.
1st incoming connection = Goto Web Server 1
2nd incoming connection = Goto Web Server 2
3rd incoming connection = Goto Web Server 3
4th incoming connection = Goto Web Server 4
5th incoming connection = Goto Web Server 1 and carry on in sequence.
it works on the same protocol as Least connection but not more efficient in load balancing as it does not take into account of backend Active connections.
3. Least Response time Method (LRTM):- It sends the incoming connection to backend Server which response quickly back to Netscaler. it only works with HTTP and HTTPs. this method is more efficient if you have slow and fast response server in the pool and want to have most connection to fast working Servers.
4. Hashing method:- it more efficient method of load balancing as Client request get backend server hash attached and every time any request is made from the same client in particular time window and will always connection back to same backend Server. the connections are distributed randomly in this method.
5. Least Bandwidth:- in this method, NetScaler sense the bandwidth connectivity for backend Servers and send the inputs connection accordingly to most bandwidth backend Server 1st.
6. Least Packets:- it works on the number of packets
7. Custom:- in this method, Netscaler gather the backend Server information via SNMP Trap and send the connection to better performance Server (based on memory, CPU or etc).
Step to configure load balancing:-
1. Please ensure Load balancing feature is enabled.
2. Select both and click ok
3. Create Service
Create Service for all the backend web Server
Web Server T-1 - 192.168.1.2
Web Server T-2 - 192.168.1.3
Web Server T-3 - 192.168.1.4
Web Server T-4 - 192.168.1.5
4. Create Virtual Server which will receive the incoming connection and forward the traffic to backend Servers.
WebServer-LB 192.168.1.10, port 80 and HTTP protocol
Click ADD Virtual Server --> Goto Services tab --> Select all the 4 available Services there.
5. Goto Method and connection Tab -
6. Select the connection method based on requirement.
7. Click Create and Save the configuration
LB VIP is Created now. Test the website load balancing by browsing the IP 192.168.1.10 over the browser and the traffic will be LB based on defined methods.
Persistence Type:- there are many persistence methods in NS and important for a web application where the requirement is to connect to the same Server where the 1st session was established for particular client.
Method Type :-
Destination IP:- It maintains the table and all the connection from this client will go to previous backend Server
SSL Session ID:- Not more used as different-2 browser uses a different method of SSL ID and can cause problem in NS
HTTP Cookie: The Cookie is added to each request and sends to client browser so next time incoming request are checked based on Cookie received and connect to same previous backend Server
Source IP: when client ip is used to decide the backend Server connection and confusing in case of NAtting or proxy environment where all the client requests are reflecting one IP Address.
URL Passive:- The URL details are coming with incoming connection and connect to matching URL backend Server.
User-defined rules:- it depends on what value is defined in the configuration, browser version, name, cookie value ..etc.
Persistence types are protocol dependent and some methods are time limited.
Select the Persistence Type based on requirements.
Thanks for reading the content .
Amit Kumar Gupta
CCA in XenApp/XenDesktop/XenServer,Google Cloud Architect, MCSE, ITIL, Vmware Certified
Microsoft certified - Planning for Security Incident response.
https://www.linkedin.com/in/amit-kumar-gupta-5321a527/