Great content. A question regarding last algo of random, least connected - In this, can;t there be overlap of servers selected by each LB such that some of the servers are totally left out while others are selected by multiple LBs. Also, how will we handle the case of addition/removal of servers in live deployment as the server count is hardcoded? TIA
If you choose a random server from the ones which have the least number of connections, then it is improbable for some of the servers to be overburdened(Since as they get more connections, they will move out of the "least connections" category and the LB will not choose them anymore). Hardcoding of your servers in your LB config is a bad practice, and you have given the reason as well. What you do instead is something called as service discovery to detect new servers and remove old servers which are not active anymore dynamically from the LB. Hope this answers your questions
Hey Mustafa, thanks for watching the video! There is no good algorithm, you will have to evaluate the pros and cons of each of them and pick up what suits the best for your use case.
Thanks for sharing! Best video about load balancing I've seen so far
That's great to hear! Thanks for the appreciation :)
@@AdityaKamat Will there be videos about distributed consensus and persistent connections in the near future?
@@luluxiu663 sure! I'll put them up in my to-do list.
The way you teach is awesome.
Thanks Mamtha!
Great content.
A question regarding last algo of random, least connected - In this, can;t there be overlap of servers selected by each LB such that some of the servers are totally left out while others are selected by multiple LBs. Also, how will we handle the case of addition/removal of servers in live deployment as the server count is hardcoded? TIA
If you choose a random server from the ones which have the least number of connections, then it is improbable for some of the servers to be overburdened(Since as they get more connections, they will move out of the "least connections" category and the LB will not choose them anymore).
Hardcoding of your servers in your LB config is a bad practice, and you have given the reason as well. What you do instead is something called as service discovery to detect new servers and remove old servers which are not active anymore dynamically from the LB.
Hope this answers your questions
@@AdityaKamat Thanks
Thank you for sharing this video!
Which algorithm is the best for real-time applications like healthcare applications?
Hey Mustafa, thanks for watching the video! There is no good algorithm, you will have to evaluate the pros and cons of each of them and pick up what suits the best for your use case.
Sir can we implement the load balancing algorithm in c++ or java
Yes Ayush, you can implement these algorithms in C++ or Java.
Thanks Aditya :)
:)
Useful
Thanks Hritik!