How load balancers work - System Design Interview knowledge [Beyond the interview]
HTML-код
- Опубликовано: 10 сен 2024
- Knowing about how a load balancer works is important for most software engineers. Load balancing algorithms and techniques can be useful for your next system design interview too. Besides that, it quite interesting!
This video covers load balancing algorithms, how Google uses load balancing and traffic routing, a real word load balancing example for a web application, stateful load balancing and consistent hashing for load balancing.
Google book about site reliability engineering: landing.google...
Consistent hashing paper: www.akamai.com...
The SiT is also on IG TV / successintech
-- SOCIAL MEDIA --
/ successintech
/ successintech
www.successint...
/ successintech
Music: Koalips
Music: Night Owl - Broke For Free
Music: Bensound
You all got it right, network is layer 3 in OSI. My bad! ;)
Need help regarding Final Year Project "Soft Load balancer (SLB)" using open flow SDN. Please reply
but you were right that we have layer 4 or 7 LBs. Layer 4 LBs are transport layer LBs. They work based on Network/transport (IPs/Ports)
I was just asked this question in an interview. RUclips recommended that video just after my interview. I wish I would have seen it before 😬
What was the question, they ask you again, if you still remember exactly.
I was in an interview where the interviewer himself download the questions & answers online, so this guy himself doesn't know shit but relied on online technical questions & answers. Very frustrating for men that day.
that purest contend I've ever seen in the Universe
Late to the party but this guy is genius!
Network is layer 3 on OSI model , TCP/IP layer 4 is transport
1:31 layer 4 is Transport, Layer 3 is Network
What is difference berween L4 and L7 if both are routing based on clientIp, just that L4 maintains ip tables and L7 hashes client IP ? So won't both doing same thing eventually ?
3:20 "both http servers on same ip and port" ? how is that possible ?
Same question here. This is not possible
Same question +1
Great intro. Please make a video on how database work internally. How data is stored in database? Which data structures are used ?
3:27 IMHO is incorrect. It's not possible for two servers to run on same port unless the protocol is different. So two HTTP servers cannot bind to same port on a single backend server. The second HTTP server trying to bind to port will get the error - Address already in use.
Great video! thank you!! - one note though, and pls correct me if I'm wrong, two applications (servers) can listen to the same port at the same server instance as you mentioned 3:20
Thank you :) Good work, very good presentation, clean and to the point !!!
Great video like all the others which have taught me more than many others
Nice Explanation. Really helpful. It would be helpful If you can make a video on "how to implement custom Load Balancer?" Now a days I could see it's a one of the interview question. Thanks for your support.
Network is level 3? If I am not wrong ?
Yes, 4 is Transport, I came here to say that and found your comment first.
but he is talking about the ports which operates at layer 4
in the second i herd it .
i stopped the video and was ready to leave a comment until i saw all the comments about this lol
Hi deepesh load balacer is work on layer 4 because it forward traffic based on IP plus TCP or UDP port . if traffic is http then it will forward traffic based on http request ip plus port no 80 . so LB consider IP plus http port no so it is layer 4
How to avoid single point failures? Replica with a master and slave model?
failover -> virtual IP
thanks for all your amazing informational videos!
Thank you for the great explanation!
How to avoid single point failures? I was also wondering what is the solution....
I think the solution will be .. the use of redundant load balancers
Best video. Learned a lot.
Great introduction. Leads me in the right direction.!
Thanks!
What do you mean when you say that Front End take an RPC call?
This is confusing
Please review this. grpc.io/
12:20 You say the hash function depends on the available servers. What if the same users connects again, but the available servers have changed? Will the user now be hashed to a new server, despite his originally assigned server maybe still being available.
Edit: solved later on in the video.
This video is very informative, Thank you.
Can you please make a similar video but for DNS?
This is very nice video about LB,
Can you please show us how load balancer can be applicable in IOT ?
How can two HTTP servers be running on the same backend on the same port 80 ? check out at time 3:15
Thanks for the video. Right now preparing for the interview. At the end you mention single point failure problem. What would be your suggestion on eliminating it? Just a quick thought is doing LB state backups/replica with a health checks so as soon as it crashes we could restart or quickly switch with a backup.
You might wanna see "elastic load balancer"! Amazon ELB papers.
great video, thanks!
Sir, This is the best video I have seen on LB. One question: If we have a number of users asking for video streaming, all this video traffic generated by servers will have to traverse from servers to LB and then from LB to the users. This kind of double load on the LB, will that be taken into account for design ? What design alternatives are there ?
Usually such kind of heavy (media) traffic is routed through CDN systems. Reverse proxies returns just the path to the media server (CDN) from where content is downloaded directly to the client's machines via dedicated connections/protocols like websockets
@@TheVinitsaini Thank you
I don't understand the hashing part, what is it you're hashing and why is it important to hash it?
One of the usages of hashing is to enable statefulness on the LB level. Give this a read www.citrix.com/blogs/2010/09/04/load-balancing-hash-method/
Does this mean that load balancer is a single point failure? Can't we have replicas of it?
You can. You can read up on the way AWS Elastic Load Balancing works as an example :)
great explanation!
So how can the single point of failure be addressed when using load balancers?
I‘d say you have a few options. For example layered load balancing with DNS
Nice 👍
Good summary
Glad you like it! If you want to support the channel and future content please share my videos and spread the word on your social media =)
Could you give hint on how spof is handled for lb?
Hi! In love with your videos😀
❤️
You hinted that if using naive Least Connections, or Round Robin, you may send multiple requests from the same user to different machines & then quickly said that such a behavior could mess up your replication. I'm a little confused what you mean by that. I think it could be corrected by having your app services (that are routed to after load balancing) contain a lot of in memory caches, and instead use a distributed cache. What kind of a system would have replication problems? Also what are the replication problems? ...
is that mean all backend servers save the same data of a single user 🤔?
Going into details, how does the load balancer know the number of connections in each individual server? Where will this information be stored? at the balancer or the server itself? only a count of connections, or will they be stored as a queue?
The LB will need to know about the state of each server. It uses periodic health checks for that purpose.
@@SuccessinTech Does it use ZooKeeper to store the state of each server ?
So how would you mitigate against the single point of failure nature of a load balancer? Anyone please
quite easy to answer: VRRP and Session synchronization! Every VIP on a ADC has it own VRRP Group
Good one. Thanks for sharing 👍
Is it Vancouver in the background?
Yes!!
Hey there!! In love with your content 😻
Hey! Glad you like it :D Share it on your social media if you want to support the channel 😋
Very nice video.
Look likes you threw the sausage pizza away lol
SSL termination and the translating to RPC ... whaaaaat ?
Get a microphone!
This was recorded with a Rhode mic but the room makes a big difference :/
Success in Tech ahh ok! Sorry! Yeah, it sounds like a room mic! Great content! Thank you for the vids, are you from Hispanic country ?
Thanks :) Half spanish!