For the demonstration, we have
two web servers configured on the both servers
one is 192.168.59.132 and second server IP is 192.168.10.133 and both
servers are deployed in same network and Virtual server IP would be
192.168.59.160 which would be bind with static IP.
Enable Load Balancing Feature
Load balancing is included
with the standard edition of NetScaler and Netscaler express, Load balancer
features need to be enabled, this can be done through GUI or command line also.
We can enable LB features
through command line.
Enable feature LB
Show feature | grep LB
Create entries for backend
servers : F we need to create entries for the backend servers that we will be
load balancing across. We have two web servers on our private network so we
will create.
To create a server object by
using the NetScaler GUI
Navigate to Traffic Management > Load Balancing
> Servers, and add a server object.
Configuring Services
After you enable the load
balancing feature, you must create at least one service (http service ) for each application server that is to be
included in your load balancing setup. The services that you configure provide
the connections between the NetScaler appliance and the load balanced servers.
Each service has a name( w1-web) and
specifies an IP address(192.168.59.132), a port(80), and the type of data that
is served.
When you create a service, a host
monitor need to be bound to the service. A ping monitor
is the most basic of the
built-in monitors. When you create a service that uses TCP as the transport
layer protocol, a TCP_default monitor is automatically bound to the service.
Screen after enabled host
monitor and bind with services.
Creating Virtual servers
We create the virtual; server for load balancing:
The virtual server will be assigned local IP Address 192.168.59.60, often this
would be a public address and the DNS record for the website would point to
this address.
The load balancing method can be Round Robin as
in the entry, valid entries include LEASTCONNECTION,
LEASTRESPONSETIME, URLHASH, DOMAINHASH. The default is LEASTCONNECTION
Service binding with specific
server which is mention below, even we can set weight for each servers.
Part of the output of the show vserver command
will show the current state of the load balanced services, this way we
can check which services are available to load balance across.
W1-web(192.168.59.132:80) –HTTP
state: UP weight:1
W2-web(192.168.59.133:80-HTTP
state: UP weight:1
After creating successfully basic load balancing, we can down one of the server and check whether application is working or not.