13.Netscaler Load balancing persistency and method

VDIBuzz
14 Apr 202306:15

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

00:00

πŸ”„ 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.

05:00

πŸ”’ 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

Load balancing is the process of distributing network or application traffic across multiple servers to ensure no single server bears too much demand, thus avoiding overload. In the video, it is the central theme, with various algorithms discussed to achieve this, such as round-robin and least connection methods, to enhance efficiency and reliability of services.

πŸ’‘Round Robin

Round Robin is a load balancing algorithm that cycles through a list of servers and distributes client requests in turn to each server. It is mentioned in the script as a method that does not check server load but simply rotates requests, ensuring a fair distribution of traffic without considering the current load on each server.

πŸ’‘Least Connection Method

The least connection method is an algorithm that sends incoming traffic to the server with the fewest current connections. It is highlighted in the script as a more intelligent load balancing approach compared to round robin, as it takes into account the existing load on each server to make a more balanced distribution decision.

πŸ’‘Persistence

Persistence in load balancing refers to maintaining a user's session on the same server throughout their interaction to ensure continuity and consistency of experience. The script explains its importance, especially in scenarios like e-commerce where a user's shopping cart should be consistent across the session, and mentions techniques like Source IP and HTTP cookies to achieve persistence.

πŸ’‘Source IP Persistence

Source IP Persistence is a method of ensuring that all requests from a particular IP address are directed to the same server for a specified duration. The script uses this as an example to illustrate how persistence can be configured, ensuring that a user's session remains consistent even when load balancing is in effect.

πŸ’‘HTTP Cookie

HTTP Cookie persistence is a technique where a cookie is set in the user's browser to direct all requests from that session to a specific server. The script explains that this method is browser-based and will ensure that a user's session remains on the same server until the browser is closed or the cookie expires.

πŸ’‘NetScaler

NetScaler is a product mentioned in the script that is likely a load balancer or similar device used to manage traffic distribution. It is used as an example to demonstrate how to configure load balancing methods and persistence settings to achieve desired traffic management outcomes.

πŸ’‘Load Balancing Methods

The script discusses various methods for load balancing, including round robin, least connection, least response time, least bandwidth, hashing, and custom methods. These methods are the different algorithms or rules that can be applied to distribute traffic across servers in a load balancing setup.

πŸ’‘Session

A session in the context of the script refers to a series of interactions between a user and a server, such as adding items to a shopping cart on an e-commerce site. The script emphasizes the importance of maintaining session consistency through load balancing to ensure a seamless user experience.

πŸ’‘E-Commerce Portal

The script uses the example of an e-commerce portal to illustrate the practical application of load balancing and persistence. It explains how a user's shopping and payment process should ideally be handled by the same server to maintain session data and provide a smooth shopping experience.

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

play00:01

load balancing uh algorithm so what is

play00:04

load balancing algorithm so load

play00:06

balancing algorithm is nothing but based

play00:08

on the conditions you are doing the load

play00:10

balancing for example let's say round

play00:12

robin round robin is uh first if if you

play00:16

have 50 request from the client the

play00:19

first request it may go to the first one

play00:20

second it may go to the second third

play00:22

minute go to the first one so randomly

play00:24

it will throw so it won't check anything

play00:25

randomly it will distribute across your

play00:27

back end okay so that is called round

play00:30

robin and the second one is list

play00:32

connection method least connection

play00:33

method means the net scaler will check

play00:35

whether the back end is having how many

play00:37

connection for example This Server is

play00:39

having 50 connection and the second

play00:40

server is having only 30 existing

play00:43

connection then the next incoming

play00:44

packets right it will send you to the

play00:46

second server unless it matches you know

play00:48

unless it identifies uh the load are

play00:51

distributed equally in the back end so

play00:53

these are the two most common method we

play00:55

use to do the load balancing one is

play00:57

round robin which is automatically it

play00:59

will distribute another one is list so

play01:01

it will check in the back end which is

play01:03

at least loaded and accordingly it will

play01:05

distribute there are other method least

play01:07

response time list bandwidth hashing

play01:09

method custom method so this is you can

play01:11

read about it so in a nut cell this is

play01:13

how uh this is the load balancing

play01:15

algorithm it will use to distribute so

play01:17

you may see or where I have to configure

play01:19

this one so I'll tell you something

play01:20

before going to that part there is one

play01:23

more thing called persistency

play01:25

so this is very important so when you do

play01:27

load balancing right there is something

play01:28

called persistency persistence is

play01:30

nothing but for example let's say you're

play01:32

initiating a connection for example

play01:34

you're trying to or you know access one

play01:37

e-commerce portal maybe you're doing

play01:39

some shopping okay so while you're

play01:41

adding all the items to the shopping

play01:42

cart then the request may go to the

play01:45

server one and server will process

play01:47

everything related to your items okay

play01:50

when you click on payment so let's say

play01:52

the connection may go to the another

play01:54

server so the second Server doesn't know

play01:57

any idea what was happened in the

play01:59

earlier session right because forget

play02:00

about

play02:01

the advanced like in the back end you

play02:03

may have a DB that may have the

play02:05

information Etc forget about that

play02:06

consider a very simple processor where

play02:09

you don't have anything back in so in

play02:11

this scenario server one processed

play02:12

everything related to your purchase but

play02:14

when you are paying the bill the

play02:15

connection may go to the server too

play02:17

because you are doing the load balancing

play02:18

so server 2 doesn't have any idea it may

play02:21

show empty cart or it may so value as

play02:23

zero so in that scenario what you have

play02:26

to do is you have to do something called

play02:27

persistency so that your session for

play02:30

example your user one so user one should

play02:33

be connected to server run unless until

play02:35

he completes his complete transaction

play02:38

you got my point so everything should

play02:40

sort from the server one itself unless

play02:42

and until you know he initiate a new

play02:44

connection so in his existing connection

play02:46

it should go everything to one

play02:48

particular server for that we need to

play02:51

configure something called persistency

play02:52

okay

play02:53

so persistency there are n number of

play02:56

method for the persistency the most

play02:57

famous one is Source IP Source IP is

play03:00

nothing but for example let's say the

play03:01

user is coming from 192 168 100.5 so I'm

play03:05

telling that uh to the net Skiller any

play03:07

request coming from this particular IP

play03:09

address for the next five minutes or

play03:11

next 10 minutes my session should go to

play03:13

server one itself so let's say you have

play03:15

another user which is coming from

play03:17

another source IP let's say

play03:19

10.168.5.5 so for that the net skill

play03:22

will always send the communication to

play03:24

five minutes sorry server two but there

play03:26

is an interval okay only for five

play03:28

minutes or only for 10 minutes because

play03:30

if you do not set interval what will

play03:31

happen eventually all the connection May

play03:34

load on the first server or on the

play03:36

second server it may choke and it will

play03:37

have issues so you need to Define till

play03:39

how many how much time you want to send

play03:41

the communication to the one server

play03:43

itself so this is very important when it

play03:45

comes to persistency HTT Source IP is

play03:48

the one method which you are setting for

play03:51

the persistency another one is HTTP

play03:53

cookie http cookie is nothing but it is

play03:55

browser based for example let's say you

play03:57

are trying to open a browser and you are

play03:58

accessing your load balanced site okay

play04:00

so netscaler will send a cookie to that

play04:03

particular browser session and you will

play04:05

say all the browser session coming from

play04:07

this particular browser session it

play04:09

should go to only one server okay so if

play04:11

you close the browser and if you

play04:13

relaunch the browser again then it may

play04:15

send it to another server why because

play04:17

your your cookie will get lost because

play04:19

when you close the browser so cookie

play04:22

insert is the browser based and Source

play04:24

IP is based on the source IP so let's

play04:26

see in demo you will get to know

play04:30

so see now it is Distributing right see

play04:32

now it is Distributing let's set the

play04:34

cookie uh this persistency method and

play04:37

we'll see the behavior okay I'm going to

play04:39

the net scalar so in your netscalers uh

play04:42

we go to the Whip and here you have one

play04:45

option called method right so under

play04:47

method you have to option to change the

play04:49

method round drop in or List connection

play04:51

Etc here you will see the method to

play04:53

change the load balancing so by default

play04:55

it will be uh list connection you can

play04:57

change it to round robin etc etc so you

play05:00

have a backup method also so let's say

play05:01

due to some XYZ reason this method is

play05:04

fails what is the next method you should

play05:06

take so this is related to method on

play05:08

which you do the load balancing now

play05:10

coming to the persistency so this is

play05:13

very important so there is as of now

play05:15

there is no persistency that is why it

play05:17

is Distributing load across all the

play05:19

servers so let's set a persistency and

play05:21

say for the next two minutes my server

play05:23

my session should go to the same server

play05:25

okay so I'll click OK and I will click

play05:28

done

play05:29

so now let's save the configuration

play05:32

if everything is good then let's see the

play05:34

behavior I'm going to copy this URL and

play05:37

I'm going to open a new session

play05:42

see it is connected to server one let's

play05:44

refresh see for the next two minutes it

play05:47

won't change it will go to the server

play05:49

one itself

play05:50

this is the beauty of persistency

play05:53

because some application uh you know

play05:55

while you're doing the load balancing

play05:57

which will have its own requirement that

play06:00

or or you know some server some session

play06:03

should served in the same server okay

play06:05

you should not go to the other server so

play06:07

you can use this method and you can

play06:09

overcome that so this is related to load

play06:12

balancing of HTTP and uh

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
Load BalancingRound RobinLeast ConnectionSession PersistencySource IPHTTP CookieServer ManagementNetwork ScalabilityE-commerce PortalNetScaler