Many times implementing a high availability infrastructure like the one shown in the picture can be a big challenge, even more when we get to the part of distributing services in different replicas. This task involves the work of configuring an extra service that takes care of distributing the load among our replicas, this is known as a load balancer.

There are many excellent tools to solve this problem, such as Traefik, Nginx, HAproxy, Neutrino, etc.

Luckily for us, Amazon also has a load balancer alternative, which offers us certain benefits, mostly in the simplicity of implementation. Amazon has 3 types of load balancers that we will choose depending on our needs. The main difference is in the layer that it is implemented. These differences are very useful to have them quite clear to avoid a mistake in our selection.

Classic Load Balancer: This is a slightly older and currently depreciated load balancer. It meets all the requirements: High availability, IPv6 compatibility, Layer 4 or Layer 7 load balancing; however, it can be perfectly replaced by its predecessors that offer better response time, balancing rules and security features.

Network Load Balancer: We find this type of balancer oriented to layer 4 supporting TCP, TLS and UDP. With it we can define simple rules that usually do not vary between the ips, ports, or protocol we use, allowing it to be the fastest type of load balancer offered by Amazon; offering response times of less than ~100ms. It is very common to use this type of balancer when a very high number of incoming tcp requests are expected.

Application Load Balancer: More oriented to web applications or API-Rest, this is a load balancer applied in layer 7. By being able to analyze and process http traffic, it is able to use routing rules based on headers, routes and even request parameters. This gives us greater versatility in having instances with multiple services on the same ip:port (known in Apache as virtualhost). They tend to have a slightly longer response time of between ~50ms and ~400ms, due to the extra processes it has to do that the NLB does not do in comparison.

If you need to implement rapid response balancing for tcp processes or container distribution, the Network load Balancer is the best option. If you need to implement routing rules based on http parameters such as:

host-1.domain.com [Servers group 1] / host-2.domain.com [Servers group 2]. The Application load Balancer is the best option.


Posted by

Ever Luis Acosta G – DevOps Engineer

AWS Load Balancers, an easy way to choose one | LA ELECTRONIC
Hardware Software Technology

AWS Load Balancers, an easy way to choose one

Many times implementing a high availability infrastructure like the one shown in the picture can be a big challenge, even more when we get to the part of distributing services in different replicas. This task involves the work of configuring an extra service that takes care of distributing the load among our replicas, this is known as a load balancer.

There are many excellent tools to solve this problem, such as Traefik, Nginx, HAproxy, Neutrino, etc.

Luckily for us, Amazon also has a load balancer alternative, which offers us certain benefits, mostly in the simplicity of implementation. Amazon has 3 types of load balancers that we will choose depending on our needs. The main difference is in the layer that it is implemented. These differences are very useful to have them quite clear to avoid a mistake in our selection.

Classic Load Balancer: This is a slightly older and currently depreciated load balancer. It meets all the requirements: High availability, IPv6 compatibility, Layer 4 or Layer 7 load balancing; however, it can be perfectly replaced by its predecessors that offer better response time, balancing rules and security features.

Network Load Balancer: We find this type of balancer oriented to layer 4 supporting TCP, TLS and UDP. With it we can define simple rules that usually do not vary between the ips, ports, or protocol we use, allowing it to be the fastest type of load balancer offered by Amazon; offering response times of less than ~100ms. It is very common to use this type of balancer when a very high number of incoming tcp requests are expected.

Application Load Balancer: More oriented to web applications or API-Rest, this is a load balancer applied in layer 7. By being able to analyze and process http traffic, it is able to use routing rules based on headers, routes and even request parameters. This gives us greater versatility in having instances with multiple services on the same ip:port (known in Apache as virtualhost). They tend to have a slightly longer response time of between ~50ms and ~400ms, due to the extra processes it has to do that the NLB does not do in comparison.

If you need to implement rapid response balancing for tcp processes or container distribution, the Network load Balancer is the best option. If you need to implement routing rules based on http parameters such as:

host-1.domain.com [Servers group 1] / host-2.domain.com [Servers group 2]. The Application load Balancer is the best option.


Posted by

Ever Luis Acosta G – DevOps Engineer