What is a Load Balancer?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi there and thanks so much for stopping by today my name is bradley knapp with ibm cloud and the question that i wanted to go over with you guys today is what is a network load balancer and so i want you to imagine a scenario right you have decided that you are going to run a website and this website is going to be immensely popular you need to build it to scale to serve millions of users all of whom are accessing it at the same time so imagine that single user and what is his experience going to be right so you've got your guy he's out here and he's got a laptop right and so on his laptop he wants to open your awesome new website so he's going to send that traffic out into the internet which we're going to put a little cloud in there for the internet and then as it transmits through the internet to the actual servers where the data is hosted it's going to get down here and it's going to get to an application server and that application server is going to be what actually serves all of the data back via the internet to his laptop so that he can view what's going on on your on your website now that's fine if you've just got one person who accesses your website at a time what if you have 10 people at once well that app server is probably going to be fine to do that what if you have 10 000 people who are accessing it at once and so that's when you get into this interesting scenario where you can saturate out this application server and so if you think about an infrastructure level definition of an app server you can scale them up to a certain size but you've got limits in how big these application servers can be so what do you do all right well you need to scale them out right instead of having one app server you might have three or you might have four or you might have five or you might have 10 or you might have 10 000 you are going to horizontally scale those application servers so that you have enough to satisfy your customer load but how do you know how much scaling you need and more importantly how does this guy with his laptop get to the application server that he needs in order to be successful and the answer to that is in between your customer and all of your app servers you are going to put a load balancer what is a load balancer it's a hardware device or it could be a software defined device and that load balancer is going to intercept all of the traffic that's coming in from the internet and it's going to decide what goes to this server what goes to this server what goes to this server and so on and so forth it's also going to provide and collect information so your application servers down here they can be talking to this load balancer they can be saying hey i'm only being used 20 of the time maybe you don't need me right now and that load balancer can then dynamically scale or auto scale and turn that application server off if you don't need it helps drive down costs likewise if all of your app servers are checking in and they're saying hey i'm super busy i'm running at 85 90 utilization it's time to bring in help then that load balancer can hit that auto scale service again and can say hey look i need another one i need another app server to try and decrease my load and so when folks talk about cloud native architectures this is a key component the load balancer is a key component because that load balancer is going to assign out that traffic to all of the different application servers and then the app servers they're all going to go down here right they're going to talk to a common database tier because you don't want to get into a goofy split brain scenario with your database but they're going to get the data that they need and they're going to serve that back up to the end customer directly so that's how you split up the data that's how you serve it up but so now that we're in load balancers we said it's going to decide which application server gets the traffic right how does it decide what to do and so let's get our three most common scenarios right so we're gonna go over here and we're gonna have scenario one scenario two and then scenario three so scenario one our load balancer right here right it's got all its app servers and we're gonna call this one a relatively dumb load balancer right we don't need a lot of complexity in it it's serving a fairly basic purpose and so it's going to use an algorithm called round robin in order to sign assign the traffic and so what does round robin means it means that for the first user that connects it's gonna send that person to app server one for the second person who connects it's gonna send them to app server two the third person who connects is gonna go to app server three and then when a fourth one comes in it's just going to start back over again round robin literally means just going sequentially through it now round robin is not a perfect scenario if you have user sessions that last a long time some people log in and run for five minutes some people log in and run for two hours your app servers can get out of balance with one another when you're using that round robin scenario and so then you need to think about things like smart load balancing smart load balancing is going to be our second piece here right and this is an application server load aware load balancer so again just like before we've got our load balancer here and we've got our app servers but this scenario this smart load balancing scenario rather than the load balancer just acting as king in directing what all happens the load balancer works in cooperation with the application servers so the app servers are constantly transmitting data back and forth to that load balancer letting them know how busy it is and that load balancer is then going to make the decisions to send the incoming connection so your guy over here if he comes in and he starts a user session that load balancer is going to say look server 3 has the least load on it right now i'm going to sign him over here and it's constantly monitoring that now obviously you're going to look at that and you're going to say well why wouldn't you always use this kind of setup well it is more complex to get set up initially right it takes more configuration also the load balancer software or the hardware device that you use to set this kind of a scenario up it is more expensive and so while technologically it's probably always the best choice for your specific scenario it might not be and then the third the third scenario that we've got down here right so we've got our load balancer and all of our app servers this is a scenario where you want a little bit more control than you do in just a straight round robin but you don't want to go all the way through the setup and config and everything like that that you need with it with a smart load balancing scenario and so there are actually like nine different algorithms that you can pick from that split the difference between these two uh the one that i'm going to use right now as an example is a random select right so the load balancer rather than sequentially working through application server one two three one two three one two three over and over again it's just going to run a randomizing function and it's going to decide that maybe the first two go to one and the third connection goes to two and connections four through six are gonna go to three and so on and so forth again it's just it's different kinds of algorithms to decide where you need to go where you need to send that traffic and if you want to get into specifics there's tons of information out there be happy to to share that with you let us know in the comments if you want to know specific advice please feel free to reach out to anybody in the channel or anybody at ibm we'll be glad to help you design and architect a load balancing solution that is going to work to help you solve the needs of your customers thank you so much for stopping by the channel today if you have any questions or comments please feel free to share them with us below if you enjoyed this video and you would like to see more like it in the future please do like the video and subscribe to us so that we'll know to keep creating for you
Info
Channel: IBM Technology
Views: 110,350
Rating: undefined out of 5
Keywords: load balancer, load balancing, cloud, cloudn native, application development, ibm cloud, what is a load balancer, what is load balancing
Id: sCR3SAVdyCc
Channel Id: undefined
Length: 8min 22sec (502 seconds)
Published: Mon Oct 04 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.