13.Netscaler Load balancing persistency and method
Summary
TLDRThe video script explains load balancing algorithms, focusing on two common methods: Round Robin, which distributes requests evenly across servers, and Least Connection, which sends requests to the least busy server. It also introduces the concept of persistency to ensure a user's session remains on the same server for a consistent experience. Methods like Source IP and HTTP cookies are discussed for maintaining session continuity. The script concludes with a demonstration of configuring these settings on a NetScaler to observe load distribution and persistency in action.
Takeaways
- π **Round Robin Algorithm**: Distributes client requests sequentially across servers without checking server load.
- π **Least Connection Method**: Directs incoming requests to the server with the fewest current connections, ensuring even load distribution.
- π **Load Balancing Methods**: Includes round robin, least connection, least response time, least bandwidth, hashing, and custom methods.
- π **Persistency**: Ensures a user's session remains on the same server throughout a transaction, preventing session loss or confusion.
- π **Source IP Persistency**: Keeps requests from the same IP address directed to the same server for a specified time interval.
- πͺ **HTTP Cookie Persistency**: Uses browser cookies to maintain a session on one server, which can be lost if the browser is closed.
- π οΈ **Configuration of Load Balancer**: Involves setting the load balancing method and persistency to meet application requirements.
- π **Backup Method**: A secondary method to use if the primary load balancing method fails.
- π **Monitoring Load Distribution**: Observing the behavior of the load balancer to ensure it is distributing load as intended.
- π§ **Adjusting Configuration**: Saving and testing changes to the load balancer configuration to observe the impact on load distribution.
- π‘οΈ **Importance of Persistency**: For applications that require session continuity, persistency is crucial to prevent issues with transaction integrity.
Q & A
What is a load balancing algorithm?
-A load balancing algorithm is a method used to distribute network or application traffic across multiple servers to ensure no single server bears too much load, thus improving responsiveness and availability.
Can you explain the Round Robin load balancing method?
-Round Robin is a load balancing method where requests are distributed sequentially across servers. The first request goes to the first server, the second to the second server, and so on, cycling back to the first server once the list is exhausted.
What is the Least Connection method in load balancing?
-The Least Connection method checks the number of existing connections on each server and sends incoming requests to the server with the fewest connections, aiming to evenly distribute the load.
What is the purpose of persistency in load balancing?
-Persistency ensures that a user's session or transaction is consistently handled by the same server, preventing issues that may arise from a session being handled by multiple servers without awareness of the previous interactions.
How does Source IP persistency work in load balancing?
-Source IP persistency directs all requests from a specific IP address to the same server for a defined period. This ensures that a user's session is maintained on one server, preventing session-related issues.
What is HTTP cookie persistency and how does it differ from Source IP persistency?
-HTTP cookie persistency uses a cookie sent to the user's browser to ensure that all requests from that browser session are directed to the same server. It differs from Source IP persistency in that it is browser-based, not IP-based, and the session is lost when the browser is closed.
Why is it important to configure a backup method in load balancing?
-A backup method is important in case the primary load balancing method fails. It ensures that the load balancing process can continue seamlessly without significant disruption to the service.
What are some other methods for load balancing besides Round Robin and Least Connection?
-Other load balancing methods include Least Response Time, which sends requests to the server with the shortest response time, List Bandwidth, Hashing Method, and Custom Method, which can be tailored to specific needs.
How can you configure load balancing and persistency settings on a NetScaler?
-On a NetScaler, you can configure load balancing and persistency by going to the 'Method' option under the 'Whip' settings, where you can select the load balancing method and set persistency rules, such as Source IP or HTTP cookie.
What is the significance of setting an interval for persistency?
-Setting an interval for persistency is crucial to prevent overloading a single server with all connections. It ensures that the load is distributed over time, maintaining the balance and preventing server overload.
Outlines
π Load Balancing Algorithms and Persistency
This paragraph introduces the concept of load balancing algorithms, specifically focusing on two common methods: round robin and least connection method. Round robin distributes client requests sequentially across servers, while the least connection method sends new requests to the server with the fewest existing connections. The paragraph also touches on other methods like least response time, list bandwidth, hashing, and custom methods. A key aspect of load balancing discussed is persistency, which ensures that a user's session remains on the same server throughout a transaction, preventing issues like an empty cart during the payment process in an e-commerce scenario. Persistency methods like Source IP and HTTP cookies are mentioned, which help maintain the session continuity on a specific server for a defined period.
π Configuring Persistency in Load Balancing
The second paragraph delves into the practical application of persistency in load balancing. It explains the importance of setting persistency to ensure that a user's session consistently connects to the same server for a certain duration, which is crucial for applications that require continuity in a session. The speaker demonstrates how to configure persistency in a load balancer, such as a Netscaler, by setting a time interval during which a user's session should remain on the same server. The paragraph also highlights the fallback methods that can be used if the primary load balancing method fails, emphasizing the flexibility and reliability of load balancing configurations.
Mindmap
Keywords
π‘Load Balancing
π‘Round Robin
π‘Least Connection Method
π‘Persistence
π‘Source IP Persistence
π‘HTTP Cookie
π‘NetScaler
π‘Load Balancing Methods
π‘Session
π‘E-Commerce Portal
Highlights
Load balancing algorithms distribute network traffic based on certain conditions.
Round-robin method distributes requests sequentially across servers without checking load.
Least connection method directs traffic to the least loaded server based on current connections.
Other load balancing methods include least response time, list bandwidth, hashing, and custom methods.
Persistency ensures a user session remains on the same server for the duration of a transaction.
Source IP persistence directs traffic from the same IP address to the same server for a defined time.
HTTP cookie persistence uses browser cookies to maintain a session on one server.
Load balancers can be configured to switch methods if the primary method fails.
Demonstration of load balancing in action, showing how traffic is distributed.
Setting up persistency in a load balancer to ensure consistent server allocation for a session.
The importance of defining a time interval for persistency to prevent overloading a single server.
Load balancing configurations can be changed to suit different application requirements.
Backup methods can be set in case the primary load balancing method fails.
NetScaler is used as an example of a load balancer where methods and persistency can be configured.
A live demonstration of how persistency works in a load balancer, showing session consistency.
Load balancing is crucial for maintaining application performance and server health.
Transcripts
load balancing uh algorithm so what is
load balancing algorithm so load
balancing algorithm is nothing but based
on the conditions you are doing the load
balancing for example let's say round
robin round robin is uh first if if you
have 50 request from the client the
first request it may go to the first one
second it may go to the second third
minute go to the first one so randomly
it will throw so it won't check anything
randomly it will distribute across your
back end okay so that is called round
robin and the second one is list
connection method least connection
method means the net scaler will check
whether the back end is having how many
connection for example This Server is
having 50 connection and the second
server is having only 30 existing
connection then the next incoming
packets right it will send you to the
second server unless it matches you know
unless it identifies uh the load are
distributed equally in the back end so
these are the two most common method we
use to do the load balancing one is
round robin which is automatically it
will distribute another one is list so
it will check in the back end which is
at least loaded and accordingly it will
distribute there are other method least
response time list bandwidth hashing
method custom method so this is you can
read about it so in a nut cell this is
how uh this is the load balancing
algorithm it will use to distribute so
you may see or where I have to configure
this one so I'll tell you something
before going to that part there is one
more thing called persistency
so this is very important so when you do
load balancing right there is something
called persistency persistence is
nothing but for example let's say you're
initiating a connection for example
you're trying to or you know access one
e-commerce portal maybe you're doing
some shopping okay so while you're
adding all the items to the shopping
cart then the request may go to the
server one and server will process
everything related to your items okay
when you click on payment so let's say
the connection may go to the another
server so the second Server doesn't know
any idea what was happened in the
earlier session right because forget
about
the advanced like in the back end you
may have a DB that may have the
information Etc forget about that
consider a very simple processor where
you don't have anything back in so in
this scenario server one processed
everything related to your purchase but
when you are paying the bill the
connection may go to the server too
because you are doing the load balancing
so server 2 doesn't have any idea it may
show empty cart or it may so value as
zero so in that scenario what you have
to do is you have to do something called
persistency so that your session for
example your user one so user one should
be connected to server run unless until
he completes his complete transaction
you got my point so everything should
sort from the server one itself unless
and until you know he initiate a new
connection so in his existing connection
it should go everything to one
particular server for that we need to
configure something called persistency
okay
so persistency there are n number of
method for the persistency the most
famous one is Source IP Source IP is
nothing but for example let's say the
user is coming from 192 168 100.5 so I'm
telling that uh to the net Skiller any
request coming from this particular IP
address for the next five minutes or
next 10 minutes my session should go to
server one itself so let's say you have
another user which is coming from
another source IP let's say
10.168.5.5 so for that the net skill
will always send the communication to
five minutes sorry server two but there
is an interval okay only for five
minutes or only for 10 minutes because
if you do not set interval what will
happen eventually all the connection May
load on the first server or on the
second server it may choke and it will
have issues so you need to Define till
how many how much time you want to send
the communication to the one server
itself so this is very important when it
comes to persistency HTT Source IP is
the one method which you are setting for
the persistency another one is HTTP
cookie http cookie is nothing but it is
browser based for example let's say you
are trying to open a browser and you are
accessing your load balanced site okay
so netscaler will send a cookie to that
particular browser session and you will
say all the browser session coming from
this particular browser session it
should go to only one server okay so if
you close the browser and if you
relaunch the browser again then it may
send it to another server why because
your your cookie will get lost because
when you close the browser so cookie
insert is the browser based and Source
IP is based on the source IP so let's
see in demo you will get to know
so see now it is Distributing right see
now it is Distributing let's set the
cookie uh this persistency method and
we'll see the behavior okay I'm going to
the net scalar so in your netscalers uh
we go to the Whip and here you have one
option called method right so under
method you have to option to change the
method round drop in or List connection
Etc here you will see the method to
change the load balancing so by default
it will be uh list connection you can
change it to round robin etc etc so you
have a backup method also so let's say
due to some XYZ reason this method is
fails what is the next method you should
take so this is related to method on
which you do the load balancing now
coming to the persistency so this is
very important so there is as of now
there is no persistency that is why it
is Distributing load across all the
servers so let's set a persistency and
say for the next two minutes my server
my session should go to the same server
okay so I'll click OK and I will click
done
so now let's save the configuration
if everything is good then let's see the
behavior I'm going to copy this URL and
I'm going to open a new session
see it is connected to server one let's
refresh see for the next two minutes it
won't change it will go to the server
one itself
this is the beauty of persistency
because some application uh you know
while you're doing the load balancing
which will have its own requirement that
or or you know some server some session
should served in the same server okay
you should not go to the other server so
you can use this method and you can
overcome that so this is related to load
balancing of HTTP and uh
5.0 / 5 (0 votes)