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