A load balancer can be used as a single point of contact for the clients. This balancer distributes the incoming requests to multiple targets, and one such target is the Amazon EC2 instance. When requests are spread out, the availability of the service improves.
Elastic Load balancing supports the below mentioned type of load balancers:
A load balancer can be provided with a ‘listener’ that helps in checking for connection requests that come from clients. This listener uses a protocol and a port which is configured by the user, and forward the request from the client to a specific ‘target group’.
A target group can be understood as a router which helps in routing the requests from one or multiple registered targets (one such example is an Amazon EC2 instance) with the help of a TCP protocol and the port (which is configured by the user).
The target can be registered with multiple other target groups. Health checks can be configured on a per-target group basis. These health checks are performed on all targets that are associated with a target group (this is specified in a listener rule that is used with the load balancer).
A network load balancer works in the fourth layer of the OSI model (Open Systems Interconnection). It has the capability to respond to millions of request every second. When a load balancer receives a connection request, it selects one target from the target group to assign a default rule. A TCP connection is tried to connect to the selected target wherein the port through which this connection happens is configured by the user in the listener configuration.
When an Availability Zone is enabled for the load balancer, the Elastic Load Balancing creates a load balancer node in this Availability Zone. Every load balancer node distributes the incoming traffic to registered targets in their Availability Zone (of target groups) by default.
An Elastic Load Balancing helps in the creation of a network interface for every Availability Zone that is enabled. Every load balancer node in this Availability Zone uses this interface to obtain a static IP address. When an Internet-facing load balancer is created, an elastic IP address per subnet can be associated optionally to the node.
When a target group is created, the user specifies the target type that is used to determine whether the targets are registered by instance ID or IP address.
If a target is registered with the help of an instance ID, the source IP address of the client is stored and provisioned to the user applications.
If the target is registered with an IP address, the source IP address is private IP address of the load balancer node.
Targets can be removed or added as and when required from the load balancer. This will not affect the overall request flow to the user application. Elastic Load Balancing can be used to scale the traffic as and when the user application changes with time. Elastic Load Balancing helps in scaling a majority of workloads automatically.
Health checks for these applications can be configured which will be used to monitor the registered target’s health so that the load balancer gets to send requests to the healthy targets only.
Following are the steps to begin working with a Network Load Balancer:
Target group is used for routing the request. The listener rule routes the requests to the targets that have been registered with thin target group. The load balancer is used to check the health of target in this target group. In the ‘Configure Routing’ page, follow the below steps:
In this post, we understood how Network Load Balancers can be used to efficiently manage traffic and serve millions of requests per second.
Whoever has contributed to this article...I would like to say thank you... it has been of good help to the readers.
This blog is very helpful and informative, and I really learned a lot from it.
It is very helpful and very informative, and I really learned a lot from this article.
Such a very useful article. I would like to thank you for the efforts you made in writing this awesome blog.
Very useful and awesome blog!
Leave a Reply
Your email address will not be published. Required fields are marked *