Load balancing in Layer 4 vs Layer 7 with HAPROXY Examples
💻 More software engineering videos https://www.youtube.com/playlist?list=PLQnljOFTspQXOkIpdwjsMlVqkIffdqZ2K
Load balancing is process of balancing incoming requests to multiple machines, processes or services. In this video we will explain two types of load balancers, layer 4 and layer 7.
Chapters
0:00 Intro
6:00 L4 Load balancer
9:10 L4 Load Balancer Pros and Cons
16:18 Example L4 Load Balancer with HAPROXY
22:30 L7 Load Balancer
27:00 L7 Pros and Cons
31:00 Example L7 Load Balancer with HAPROXY
37:00 Summary
Layer 4 (4/3)
Take content forwards it based on basic rules, it knows ip and port and perhaps latency of the target service.
Layer 4 - haproxy, NLB
Pros
- great for simple packet-level load balancing
- Fast and efficient doesn’t look at the data
- More secure as it cant really look at your packets. So if it was compromised no one can look
- Uses NAT
- One connection between client and server NATed
Cons
- Cant do smart load balancing based on the content, such as switch request based on requested media type
- Cant do microservices with this type
- Has to be sticky as it is a stateful protocol (all segments)
Layer 7 (Nginx , haproxy)
This type of proxy actually looks at the content and have more context, it knows you are visiting the /users resources so it may forward it to a different server. Essential and Great for microservices , it knows the content is video:image etc..
it can also cache.. we cant really do caching on layer 4 because we have no clue whats in the packets.
But expensive because it has to decrypt and look and compute
Layer 4 - haproxy, nlb
- great for simple packet-level load balancing
- fast and efficient doesn’t look at the data
- More secure as it cant really look at your packets. So id it was compromised no one can look
- Uses NAT
- One connection between client and server NATed
Layer 7 - examples nginx
- Smart routing based on the url (microservices) flexible
- Provide caching
- Expensive need to decrypt
- Secuirty, you have to share your certificate with the load balancers. Id compromised attacker has access to all your data.
- Proxy creates multiple connection (client to proxy/proxy to server)
Image thumbnails https://www.haproxy.com
Support me on PayPal https://bit.ly/33ENps4
Become A Patron https://www.patreon.com/join/hnasr?
Stay Awesome!
Hussein
Видео Load balancing in Layer 4 vs Layer 7 with HAPROXY Examples канала Hussein Nasser
Load balancing is process of balancing incoming requests to multiple machines, processes or services. In this video we will explain two types of load balancers, layer 4 and layer 7.
Chapters
0:00 Intro
6:00 L4 Load balancer
9:10 L4 Load Balancer Pros and Cons
16:18 Example L4 Load Balancer with HAPROXY
22:30 L7 Load Balancer
27:00 L7 Pros and Cons
31:00 Example L7 Load Balancer with HAPROXY
37:00 Summary
Layer 4 (4/3)
Take content forwards it based on basic rules, it knows ip and port and perhaps latency of the target service.
Layer 4 - haproxy, NLB
Pros
- great for simple packet-level load balancing
- Fast and efficient doesn’t look at the data
- More secure as it cant really look at your packets. So if it was compromised no one can look
- Uses NAT
- One connection between client and server NATed
Cons
- Cant do smart load balancing based on the content, such as switch request based on requested media type
- Cant do microservices with this type
- Has to be sticky as it is a stateful protocol (all segments)
Layer 7 (Nginx , haproxy)
This type of proxy actually looks at the content and have more context, it knows you are visiting the /users resources so it may forward it to a different server. Essential and Great for microservices , it knows the content is video:image etc..
it can also cache.. we cant really do caching on layer 4 because we have no clue whats in the packets.
But expensive because it has to decrypt and look and compute
Layer 4 - haproxy, nlb
- great for simple packet-level load balancing
- fast and efficient doesn’t look at the data
- More secure as it cant really look at your packets. So id it was compromised no one can look
- Uses NAT
- One connection between client and server NATed
Layer 7 - examples nginx
- Smart routing based on the url (microservices) flexible
- Provide caching
- Expensive need to decrypt
- Secuirty, you have to share your certificate with the load balancers. Id compromised attacker has access to all your data.
- Proxy creates multiple connection (client to proxy/proxy to server)
Image thumbnails https://www.haproxy.com
Support me on PayPal https://bit.ly/33ENps4
Become A Patron https://www.patreon.com/join/hnasr?
Stay Awesome!
Hussein
Видео Load balancing in Layer 4 vs Layer 7 with HAPROXY Examples канала Hussein Nasser
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
Proxy vs reverse proxy vs load balancer (2020) | Explained with real life examplesLayer 4 vs Layer 7 Proxying In Details Explained with ExamplesWhat happens when type google.com into your browser address box and hit enter? (Detailed Analysis)WebSockets Crash Course - Handshake, Use-cases, Pros & Cons and moreNetwork Address Translation - NAT ExplainedHAProxy Crash Course (TLS 1.3, HTTPS, HTTP/2 and more)Comparing Load Balancing AlgorithmsWhat is Load Balancing? ⚖️Apache Kafka Crash CourseThe OSI Model - Explained by ExampleTCP vs UDP Crash CourseThe Essentials of an HAProxy Configuration FileDatabase Indexing Explained (with PostgreSQL)Setup Active-Passive Cluster with Keepalived & HAProxy (Two raspberry pis)How load balancers work - System Design Interview knowledge [Beyond the interview]Transport Layer Security, TLS 1.2 and 1.3 (Explained by Example)Layer 4 DR mode - what it is, how it works and why it's awesomeProxy vs Reverse Proxy Server ExplainedApplication Load Balancer vs Network Load Balancer vs Classic Load Balancer | AWS CSAA | Whizlabs