It is a tool for maintaining stability on your site, evenly distributing inputs to the web server in a balanced way.
The contents of this article will be based on the aws load balancer Elastic Load Balancing
What problem does Load Balancer solve?
As soon as your application becomes large, there will come a time when your software will have a huge number of requests and will have to efficiently and reliably process millions of simultaneous requests such as images, texts, videos, user data, etc.
The load balancer sits between the user and the web servers, serving as a facilitator and ensuring that all servers receive the load evenly, thus avoiding overloading.
An example use case could be when one of the servers goes down, so the load balancer redirects the reqs to another.
as shown in the image, the user is directed to the server via the load balancer, so users no longer have direct access to the server
Type of Load Balancers
- Application Load Balancer (ALB)
- Network Load Balancer (NLB)
- Gateway Load Balancer (GLB)
Application Load Balancer (ALB)
The ALB has a component that acts as a receiver and is where the rules are applied.
Rules: It will determine how the load balancer will forward the requests to the destinations.
a group of targets classifies the targets registered in a group, so you can define rules to take specific requests only to a specific group.
- Works with AWS Lambda IP addresses, instances and destination types
- Support for HTTP, HTTPS and gRPC
- Round-robin algorithm by default
- Works on layer 7, the application layer.
- proxy: Close the connection.
Top comments (0)