System Design: What is Load Balancing?

  Рет қаралды 47,620

Be A Better Dev

Be A Better Dev

Күн бұрын

Пікірлер: 59
@ahsanrfq5968
@ahsanrfq5968 4 жыл бұрын
I think "Security" deserves to be on the list too, since only the load balancer is exposed to the public net.
@sup3rd
@sup3rd 4 жыл бұрын
Just found your channel and I'm really enjoying these bite sized videos for certain topics. It certainly helps a new developer get in touched with industry key terms and concepts.
@BeABetterDev
@BeABetterDev 4 жыл бұрын
Welcome aboard!
@walidhabari3600
@walidhabari3600 3 жыл бұрын
@@BeABetterDev If i have a web application installed on 1 server, what is the method to make the app more scalable. and the load balancer router used only if we have 1 server running the application ?
@ViTran6
@ViTran6 2 жыл бұрын
Wow thank you, you're super great at explaining technical concepts.
@magdcs
@magdcs 3 жыл бұрын
Fantastic explanation.
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Glad it was helpful!
@azimakhtarshenas2501
@azimakhtarshenas2501 3 жыл бұрын
This is amazing and helped me fully understand what I was puzzled in.
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Glad I could help Azim!
@nixcutus
@nixcutus 3 жыл бұрын
Precisely what i needed to understand this...
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Glad I could help!
@polishedbychar9232
@polishedbychar9232 3 жыл бұрын
Great explanation! Thank you.
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Glad it was helpful!
@palvinderbhatia3941
@palvinderbhatia3941 3 жыл бұрын
Great Explanation :D Question : Doesn't LB again makes a Single point failure problem??
@urunovtimes5816
@urunovtimes5816 4 жыл бұрын
wow really great, detail explained and more improvement
@NeilKilroy
@NeilKilroy 3 жыл бұрын
You explain things very well
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Thanks Neil!
@slimxdaturk
@slimxdaturk 3 жыл бұрын
Great explanation. I'll be setting up a GEO based load balancer :)
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Thanks Slim! Good luck on your project :)
@PaulEllisBIGDATA
@PaulEllisBIGDATA 3 жыл бұрын
DUDE. Great video. Thank you.
@BeABetterDev
@BeABetterDev 3 жыл бұрын
You're very welcome, Paul!
@elenaperez6327
@elenaperez6327 3 жыл бұрын
Fantastic video! Thanks a lot.
@BeABetterDev
@BeABetterDev 3 жыл бұрын
You're very welcome Elena!
@elenaperez6327
@elenaperez6327 3 жыл бұрын
@@BeABetterDev I have a question please. I have a system design interview coming up so how do I know which load balancer to recommend? I know nginx is popular. I know a bit about aws but I also know the company uses GCP so is it best to go with that? Thanks for your help :)
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Hi Elena, I haven't worked with NGINX too much but here's my take. NGINX load balancing requires server setup, configuration, updates, and monitoring that needs to be done to ensure the LB is constantly up to date and working correctly. Additionally there's lots of manual configuration that needs to be done via config files that affect how load is distributed across the machines in the cluster. This may be overwhelming for some to understand the implications of the settings and how to optimize for their use case. AWS / GCP both have Load Balancer products that generally take care of the installation/updates for you. You don't have to worry about provisioning the server as this is all done for you and AWS ensures a healthy load balancing instance(s) remains up at all times. The nice thing is that configuration is pretty self explanatory and can be set up through the AWS / GCP console. One thing I really like about AWS is that it supports two popular types of load balancers, Application and Network. Application load balancer operates on the L7 level of the OSI model - this allows you to route requests to different targets based on the content within HTTP request. AWS also supports a network load balancer which operates on the L4 level which is generally operating on the packet level. L4 is much more efficient than L7 and allows you to pump many many more requests through it without compromising it - so its great for scale. There's a great article on the difference between L4 and L7 here: www.nginx.com/resources/glossary/layer-4-load-balancing/ All in all, what LB product you go with generally depends on questions you want to ask yourself like "how much configuration do I want to do? what scale are we expecting? do we want to route requests based on request content or not?" The answers to these questions should determine the path you take. Hope this answer was helpful. I'll keep an eye on this comment stream if you have any followup questions. Alternatively you can email me at daniel@beabetterdev.com and I'll do my best to get back to you. Good luck on your interview!
@elenaperez6327
@elenaperez6327 3 жыл бұрын
@@BeABetterDev Thank you so so so so much Daniel for this detailed answer, you are awesome! I found it very helpful indeed and made me realise which LB I want to go with. I am super happy I found your channel and will definitely recommend to others.
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Thanks so much Elena! Glad I could help and welcome to the channel! Thanks so much for sharing with others - really appreciate you getting the word out! Daniel
@idrisapatira172
@idrisapatira172 3 жыл бұрын
Nice....so on point
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Thank you so much!
@jennwng
@jennwng 3 жыл бұрын
Love the video! Thanks for the great content :)
@Aalii6
@Aalii6 2 жыл бұрын
interesting topic, thank you!
@shirish2005
@shirish2005 2 жыл бұрын
please provide more detailed video with various type of load balancer
@15lastone
@15lastone 3 жыл бұрын
Thanks for the tutorial clearly it helps massively, can we configure 2 load balancers instead of one(so called Active-Passive) in case of one becomes unresponsive? Note: I'll go and hit the subscribe button
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Hi Tcherno! This is definitely possible to set up an active-passive configuration. Of course this depends on the tech stack youre using. If youre using something like AWS load balancers, this is handled automatically for you. But if you're rolling your own for instance, nginx application, it would require more work on your part. Hope this helps and thanks for watching!
@andriys5772
@andriys5772 4 жыл бұрын
Thank you!
@BeABetterDev
@BeABetterDev 4 жыл бұрын
You're welcome!
@beto.aveiga
@beto.aveiga 3 жыл бұрын
When people talk about load balancing, my doubt is always, "What will you do with the state"? How can I "scale" by adding different machines if I need one source of truth for my state? On applications with databases, we can easily replicate many things to serve more traffic. Still, in the end, we will have one super central machine with the DB or multiple DBs, which makes me think of a big issue due to replication. Thanks for the video!
@MaxMaxx-tb6nz
@MaxMaxx-tb6nz Жыл бұрын
Use database for states. Use specialized servers to handle db and don't do it on your own
@MadhusudanBhosale
@MadhusudanBhosale 4 жыл бұрын
Great information! Thank you..
@BeABetterDev
@BeABetterDev 4 жыл бұрын
Glad it was helpful!
@AlDumbrava
@AlDumbrava 4 жыл бұрын
Ok new question: So load balancing and horizontal scaling have allowed you to handle increasing traffic. But! If all these requests then hit a separate database server, you still have overload issues no? And if you were to split it up (not sure how (I'm a newbie)), would you not have data integrity issues??
@BeABetterDev
@BeABetterDev 4 жыл бұрын
Hey Alexandru, Great question! You will definitely get increased traffic on your database. To mitigate this, you can use a cloud based database provider that handles autoscaling as well (DynamoDB is a good choice!). Cheers
@malleshk2091
@malleshk2091 3 жыл бұрын
Nice explanation. I have a small question. Is it not that load balancer itself will become bottle neck as all requests will come to it and it has to forward requests? How is this handled? Is return traffic handled from server to client through load balancer or it goes directly between server and client? If it goes through load balancer is it not a bottle neck?
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Hi Mallesh, This is a great question. The load balancers are typically highly specialized hardware that can handle many many concurrent requests/connections at the same time. Additionally, they have built in health checks to ensure both the LB and downstream targets are always available. In the event of a failure, most cloud providers will automatically provision a new LB for you with no action from your side. Hope this helps, Daniel
@churka6398
@churka6398 3 жыл бұрын
Dumb question, but, what if load balancer is overloaded? What makes one load balancer better in terms of handling millions of users compared to two web servers? Are these machines normally resource-intensive?
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Hi Churka, Load balancers are usually dedicated pieces of hardware that are optimized to simply handle large volumes of traffic concurrently. I've seen many load balancers capable of handling thousands of requests concurrently and routing them successfully to appropriate clients. As an application grows, it may be appropriate to 'partition' the load balancers. Its almost like a piece of lego that can be continuously broken apart into separate chunks. Each chunk has the identical amount of scaling capability of the parent. Hope this helps!
@muhammadzulhilmi6025
@muhammadzulhilmi6025 3 жыл бұрын
Liked! Subscribed! Hey got question here, how do we point public IP and private for load balancers? I understood private in vm itself and public definitely via firewall, but how about for LoadBalance + IPSec config? Not sure if you understand what I meant.
@pareshdehadray7414
@pareshdehadray7414 3 жыл бұрын
Thanks for such informative video. Can one load balancer handle millions of requests? How Facebook, Amazon etc handles the user traffic? Do they have single load balancer? If I am in India and Load balancer is in USA so does it mean my request will go USA Load balancer and then to actual server for processing? Kindly explain.
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Hi Paresh, Load balancers can definitely handle millions of requests. This is what they were designed to do. Websites like Facebook, Amazon, etc do have load balancers on the backend, but make heavy use of caching to reduce the load on their backend services unless it is absolutely necessary. Hope this makes sense. Daniel
@mrchad97z49
@mrchad97z49 2 жыл бұрын
how does the load balancer Offload traffic or redirect traffic OFF itself? meaning.. if a request comes into the load balancer, then how does it keep all that traffic from flowing through the load balancer itself? It has to route traffic away from itself. So, how does that work if the load balancer is the main point of entry to the network?
@heyaParanoiA
@heyaParanoiA 3 жыл бұрын
: hi.. i have a question can you apply load balancing in a scenario when 1 machine/ISP connection has the highest priority while the others would be just backups? (using this setup for home-based ISP connection btw) great video!
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Hi there! Yes this is certainly possible, but I believe this would need to occur at the DNS level. What you are effectively asking for is a concept called DNS Failover. You can learn more about it here: docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-configuring.html
@amir.maimon
@amir.maimon 3 жыл бұрын
What is the different between a load balancer and a router? Both are used to handle traffic.
@subhasishhalder4817
@subhasishhalder4817 2 жыл бұрын
Isin't consistent hashing one of the ways to route the traffic?
@egor.okhterov
@egor.okhterov Жыл бұрын
Who balances Load Balancer and DNS server?
@chillsthrillstv
@chillsthrillstv Жыл бұрын
"Wow my writing is terrible, I apologise" 😅😂
@joanikirbyhomes
@joanikirbyhomes 3 жыл бұрын
Way to dumb it down so amateurs can understand the concept!
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Thanks Joani! Glad you enjoyed.
Latency vs Throughput | System Design Essentials
20:51
Be A Better Dev
Рет қаралды 30 М.
What is Database Sharding?
26:56
Be A Better Dev
Рет қаралды 162 М.
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
What is a Load Balancer?
8:22
IBM Technology
Рет қаралды 261 М.
What is Rate Limiting / API Throttling? | System Design Concepts
16:11
Be A Better Dev
Рет қаралды 69 М.
What is API Idempotency and Why Is It Important?
12:13
Be A Better Dev
Рет қаралды 40 М.
System Design: What is Horizontal vs Vertical Scaling?
10:13
Be A Better Dev
Рет қаралды 34 М.
The Ultimate Guide to Load Balancers (System Design Fundamentals)
11:05
Software Developer Diaries
Рет қаралды 9 М.
AWS EC2 vs ECS vs Lambda | Which is right for YOU?
16:50
Be A Better Dev
Рет қаралды 198 М.
Load Balancer Tutorial - What is a Load Balancer
17:50
Amigoscode
Рет қаралды 87 М.
Google India Engineers in a Mock System Design Interview
20:54
Life at Google
Рет қаралды 146 М.
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН