aws logo partner

AWS Load Balancer

In different Availability Zones, Elastic Load Balancing (ELB) automatically distributes traffic from numerous sources and virtual appliances (AZs). Improve the security of your apps with certificate management, user authentication, and SSL/TLS decryption. Create highly available apps that can be scaled up or down on-the-fly. Your apps' health and performance may be monitored in real time to discover bottlenecks and guarantee that service level agreements (SLAs) are followed.

How it Works

Application Load Balancer:


In the context of an application load balancing service, the content of a request is used to route traffic to specific destinations (EC2 containers, IP addresses, and Lambda functions) (layer seven). Application Load Balancer’s powerful load balancing of HTTP and HTTPS traffic benefits applications such as microservices and container-based programmes greatly. The latest SSL/TLS ciphers and protocols are always used by Application Load Balancer.



• Layer 7 balancing

AWS EC2 instances, microservices, and containers can be used to load balance HTTP/HTTPS traffic (such as X-Forwarded-For headers).

• Security features

Amazon VPC (Virtual Private Cloud) provides additional networking and security choices because of the ability to create and manage security groups. Non-internet load balancing can be done without public IP addresses, but it is also possible to set up an internet-facing load balancer. ALB supports Guardian-based safeguards against HTTP desync. Vulnerabilities linked to desync can now be guarded against without impacting the availability or latency of the service. Depending on the application’s design, customers can additionally select a tolerance threshold for questionable requests.

To enhance the security posture of your load balancers, it is recommended to implement specific access control measures. Utilize IAM Policies to define and manage permissions effectively. Configure resource-level permissions to control access to load balancer resources based on roles and responsibilities. Employ security groups to regulate inbound and outbound traffic, ensuring that only authorized sources and destinations interact with your load balancers.

For optimal security, consider setting up internet-facing load balancers with recommended rules for inbound and outbound traffic. When configuring internal load balancers, establish access controls based on VPC CIDR blocks and instance security groups. By following these best practices, you can fortify the authentication and access control mechanisms of your load balancers, bolstering the overall security of your applications and infrastructure.

Users can privately access Elastic Load Balancing APIs from their Amazon Virtual Private Cloud (VPC). This can be achieved by setting up VPC endpoints. These endpoints allow for direct routing between the VPC and Elastic Load Balancing APIs, eliminating the requirement for an Internet gateway, NAT gateway, or VPN connection. By utilizing VPC endpoints, users can ensure secure and private access to Elastic Load Balancing APIs within their VPC environment.

• Outposts Support

The same AWS services and technologies that are now available in the cloud can be used in an on-premises or co-located hybrid environment. It is possible for customers to set up ALBs on supported instance types and have them automatically scale to the rack’s capacity without the need for any human intervention. Customers might be alerted of load balancing capacity demands. In order to provision and administer ALBs on Outposts, customers can make use of the same AWS Console, APIs, and CLI that they would in the Region itself.

• Support for HTTPS

The HTTPS connection between a load balancer and a client can be terminated at any time using this technique. SSL certificates for Application Load Balancers can be managed using AWS’ Identity and Access Management (IAM)

• Http/2 and gRPC

HTTP/2, a new version of the protocol, allows multiple requests to be made on the same connection. It compresses the header before sending data to customers. It’s possible to spread gRPC traffic among multiple microservices or clients and services using ALB. Without affecting the customers or services of consumers, gRPC traffic control can be readily added into existing infrastructures. RPC is the preferred inter-service communication mechanism in microservice designs. Some of the advantages of HTTP/2 over REST include binary serialisation and language support, as well as the inherent advantages of HTTP/2, such as decreased network footprint, compression, and bi-directional streaming.

• Offload TLS

A HTTPS listener can be used to monitor for encrypted connections (also known as SSL offload). Securing communication between your load balancer and clients requires the use of SSL or TLS. ALB can be used to end a client’s TLS session. Use the load balancer to terminate TLS, but keep the source IP address of your back-end applications intact. TLS listeners can employ predefined security policies to ensure compliance and security. In order to maintain track of your server certificates, you can use either AWS Certificate Manager or AWS Identity and Access Management. It is possible to serve many secure websites from a single TLS listener using SNI. If the client’s hostname matches numerous certificates, the load balancer applies a clever selection technique.

• Sticky Events

As long as there are sticky sessions in place, clients can send requests to the same destination many times. This means ALBs can work with both session-specific cookies and cookies that are tied to an individual application. How long should a user’s request be forwarded to the same load balancer target? Group sticky sessions are now possible. Use a combination of duration-based, application-based, and no stickiness across all target groups to obtain the greatest potential outcomes.

• Native IPv6 Support

In a virtual private cloud (VPC), Application Load Balancers enable native IPv6. Clients are able to connect to the ALB using either IPv4 or IPv6 as a result of this.

• Containerized Apps Help

In order to provide support for containers, an application load balancer installed on an Amazon EC2 instance may be used to load balance the traffic going into and leaving from a variety of ports. Containers that are fully controlled are the end result of establishing a comprehensive connection with Amazon’s Elastic Container Service (ECS). You are able to offer a dynamic port in the task specification for an ECS task even when a container is being scheduled to run on an EC2 instance. This is something that is not possible with other cloud services. The ECS scheduler is responsible for adding this job to the load balancer. The ECS scheduler talks with the load balancer on this port.

• Routing by Content

  • The Host field, Path URL, HTTP header, HTTP method, Query string, and Source IP address are all examples of request components that an Application Load Balancer can use to determine which service should be used to fulfil a request.
  • You can route to several domains from a single load balancer if the routing is based on the Host field in the HTTP header.
  • Requests from clients should be routed according to the URL path specified in the HTTP header.
  • HTTP headers as the basis for routing: You are able to direct the path that a client request takes based on any HTTP header value.
  • You can route a client request using any method, standard or custom, supported by HTTP.
  • Route a client request using a query string or query parameters.
  • You are able to route a client request based on the source IP address CIDR, which is a common practice.

• Target IP addresses

Any application, regardless of whether it is hosted on AWS or on-premises, has the ability to use the IP addresses of the backends as load-balancing targets for the application. Because of this, it is now feasible to divide the load of an instance among its various interfaces and IP addresses, whichever they may be. It is possible for many apps that are executing on the same instance to share a security group as well as a port. In addition, IP addresses can be used to load balance applications that are hosted on-premises (by means of Direct Connect or VPN), peer VPCs, and EC2-Classic environments. This can be accomplished in a number of different ways (using ClassicLink). With the assistance of load balancing between resources hosted on your own premises and those hosted by Amazon Web Services (AWS), you have the ability to migrate, burst, or failover to the cloud.

• Targets for Lambda

ALBs may now deliver HTTP(S) requests from any HTTP client, including web browsers, using Amazon Lambda functions. A load balancer can be used to route requests to different Lambda functions. One HTTP endpoint can be used by both server-based and serverless apps, and this is called an Application Load Balancer (ALB). Using Lambda functions to build a full website is conceivable, as well as mixing Lambda functions with EC2 instances and containers and on-premises servers.

Free AWS Services Template

Download list of all AWS Services PDF

Download our free PDF list of all AWS services. In this list, you will get all of the AWS services in a PDF file that contains  descriptions and links on how to get started.

Network Load Balancer:

Connections to Amazon EC2 instances, microservices, and containers are routed by the Network Load Balancer (NLB) in the Amazon VPC. Although the Network Load Balancer maintains ultra-low latency, millions of requests per second can be handled without issue by it. Only one single static IP address is used for each Availability Zone in order to deal with traffic that is sporadic and unpredictable. Auto Scaling is compatible with CloudFormation and AWS Certificate Manager (ACM).



• Connection-based Ladder 4 balancing

On Amazon EC2, you have the option to load balance traffic headed to target instances, microservices, and containers using TCP and UDP.

• TLS Offloading

Offloading TLS Sessions Ensures that Clients’ TLS Session Ends Successfully. It is possible to terminate TLS and keep the back-end application’s source IP address by using a load balancer. TLS listeners can satisfy compliance and security requirements by implementing defined security policies. Additionally, Elastic Load Balancing (ELB) plays a crucial role in offloading encryption and improving security. ELB can handle the encryption and decryption processes, reducing the computational load on your compute resources. By leveraging ELB for encryption offloading, your compute resources can focus on their primary tasks, enhancing their performance and efficiency. This feature not only ensures successful TLS session completion for clients but also enhances the overall security of your system. AWS Certificate Manager and AWS Identity and Access Management services can further assist in managing your server’s certificate seamlessly, providing added convenience and reliability to your encryption process.

• Session Recurrence

Use of sticky sessions (source IP affinity) is used to route requests from the same user to the same destination. When referring to a particular target audience, the term “stickiness” is utilized.

• Short Intervals of Time

Latency-sensitive applications can benefit from Network Load Balancer’s low latencies. It is possible to serve many secure websites from the same TLS listener using SNI. A sophisticated selection mechanism is used by the load balancer if the client’s hostname matches several certificates.

• Keep track of the original Internet protocol (IP) address.

As a result of the Network Load Balancer, the back-end can see the client’s originating IP address. This data can then be used by applications to perform further processing.

• Support for a static Internet Protocol address

Applications are able to use the static IP addresses that the Network Load Balancer generates automatically for each Availability Zone (subnet) as the load balancer’s front-end addresses. These addresses are generated by the Network Load Balancer.

• Ease of use: Elastic IP

Using the Network Load Balancer, it is also feasible to assign a static IP address to each Availability Zone (subnet).

• DNS Fail-over (Domain Name System)

If there are no healthy targets registered with the Network Load Balancer in a zone or if the Network Load Balancer nodes in that zone are unhealthy, AWS Route 53 will route traffic to load balancers in other Availability Zones.

• A connection to the Amazon Route 53 service

The Route 53 integration will remove the unresponsive load balancer IP address from service and reroute traffic to a different Network Load Balancer in a different area if your network load balancer is unresponsive.

• Integration with the Amazon Web Services

Network IT is compatible with a variety of AWS services, including Auto Scaling, Elastic Container Service (ECS), CloudFormation, Elastic BeanStalk, CloudWatch, Config, CloudTrail, and CodeDeploy, among others (ACM).

• WebSocket applications

They can take advantage of the long-lasting support for TCP connections in Network Load Balancer to a significant extent

• Central API Support

A lone support network for application programming interfaces. The Application Load Balancer and the Load Balancer both use the same application programming interface to communicate with one another (API). In order for you to be able to support containerized apps, you will have the ability to interact with target groups, carry out health checks, and spread load across a number of ports on the identical Amazon EC2 instance.

• Isolation by Zones

When there is only one zone in the application design, the Network Load Balancer is the solution that needs to be implemented. The system will automatically switch to a different Availability Zone if and when something goes wrong in a zone that is otherwise in good health. Network Load Balancer can be enabled to serve architectures in a single Availability Zone even if zonal isolation is a requirement for the architecture, despite the fact that we recommend to customers that they deploy load balancers and targets in a number of different Availability Zones. This is because we believe that this is the most secure method.

Need help on AWS?

AWS Partners, such as AllCode, are trusted and recommended by Amazon Web Services to help you deliver with confidence. AllCode employs the same mission-critical best practices and services that power Amazon’s monstrous ecommerce platform.

Gateway Load Balancer:

Third-party virtual appliances can be easily managed and scaled using Gateway Load Balancer. Multiple virtual appliances may be scaled up or down independently via a single gateway, allowing for flexible traffic distribution. Network availability can be improved by reducing the number of potential failure points. AWS Marketplace allows you to search for, test, and purchase virtual appliances from third-party manufacturers. If you want to stick with your current vendors or try a new one, your virtual appliances will be easier to use right away thanks to this smooth setup process.



• Auto-scale your virtual appliance instances

Gateway Load Balancer instances can be created with the assistance of Amazon Web Services Auto Scaling groups. As a direct consequence of this, you will never be short of resources. When there is a spike in traffic, the Gateway Load Balancer will start additional instances. The incidents will cease to occur once traffic has returned to its typical level.

In addition to automatic scaling, Gateway Load Balancer also supports health checks to ensure the continuous performance and reliability of your application. You have the ability to continually measure the health and performance of your Gateway Load Balancer using Amazon CloudWatch metrics that are specific to each Availability Zone.

These metrics include load balancer metrics such as the count of target appliance instances, the health status of targets, the target count, the current number of active flows, and the maximum flows. By monitoring these metrics, you can gain insights into the overall health and performance of your load balancer. Additionally, VPC Endpoint metrics such as the amount of processed bytes and packets, and the number of Gateway Load Balancer Endpoint mappings can also be monitored.

By leveraging these metrics, you can proactively identify any potential issues or bottlenecks in your Gateway Load Balancer and take necessary actions to optimize its performance. This ensures that your application remains highly available and responsive to incoming traffic.

• High-availability virtual appliances from third parties

By rerouting traffic in the event that a virtual appliance fails, Gateway Load Balancer ensures that high availability and dependability are maintained. The Gateway Load Balancer performs regular checks on the state of each virtual appliance instance to validate its availability and assure its continued good health. When an item fails an excessive number of tests in a row, it is given the designation of being an unhealthy appliance.

• Continually measure health and performance

Your Gateway Load Balancer could be monitored using Amazon CloudWatch metrics that are specific to each Availability Zone. In addition, load balancer metrics (such as the count of target appliance instances, the health status of targets, the target count, the current number of active flows, and the maximum flows) and VPC Endpoint metrics (such as the amount of processed bytes and packets) are included (such as the number of Gateway Load Balancer Endpoint mappings).

• AWS Marketplace simplifies deployment.

A new virtual appliance can be easily deployed with the help of AWS Marketplace. The overall user experience will benefit from this, as will the ease of deployment.

• Protect the connectivity of your AWS account by utilising Gateway Load Balancer Endpoints.

Gateway Load Balancer Endpoints are a new kind of virtual private cloud (VPC) endpoint that connects traffic sources and destinations. The technology known as PrivateLink is used to discreetly link Internet Gateways, Virtual Private Clouds, and other network resources. Because it travels through AWS, your information will never be accessible via the public internet.


Classic Load Balancer

The Classic Load Balancer ensures equitable distribution of connections and requests among multiple Amazon EC2 instances. However, it is important to note that CLB is designed to work exclusively with EC2-Classic software. Therefore, when working with a Virtual Private Cloud (VPC), it is recommended to use Application Load Balancer (ALB) for Layer 7 traffic and Network Load Balancer (NLB) for Layer 4 traffic.

However, it’s important to note that the Classic Load Balancer is a legacy load balancer and is no longer recommended for new applications. It will be deprecated on December 31, 2022. Amazon strongly encourages customers to migrate to ALB or NLB as soon as possible. These newer load balancers offer more features and better performance compared to CLB.



• Load Balancing at Layer 4 or 7

ALB enables load balancing for HTTP and HTTPS applications using Layer 7 technologies like X-Forwarded and sticky sessions. For TCP-only apps, rigorous load balancing can be achieved at Layer 4.

• SSL offloading

The standard SSL termination process involves the outsourcing of application decryption, the centralization of certificate administration, and the encryption of data at the back-end instances, with public key authentication being an optional step. You have control over the ciphers and protocols that are made available to clients by the load balancer.

• IPv6 Support

Both IPv4 and IPv6 are supported by the Classic Load Balancer when used with EC2-Classic networks.

Free AWS Services Template

Text AWS to (415) 890-6431

Text us and join the 700+ developers that have chosen to opt-in to receive the latest AWS insights directly to their phone. Don’t worry, we’ll only text you 1-2 times a month and won’t send you any promotional campaigns - just great content!

Related Articles

What is Tiered Pricing for Software as a Service?

What is Tiered Pricing for Software as a Service?

Tiered Pricing is a method used by many companies with subscription models. SaaS companies typically offer tiered pricing plans with different services and benefits at each price point with typically increasing benefits the more a customer pays. Striking a balance between what good rates are and the price can be difficult at times.

The Most Popular Cloud Cost Optimization Tools

The Most Popular Cloud Cost Optimization Tools

Cloud environments and their pricing models can be difficult to control. Cloud computing does not offer the best visibility and it is easy to lose track of which price control factors are having an impact on your budget. Having the right tools can help put value to parts of an environment and provide guides on how to better bring budgetary issues back under control.

The Difference Between Amazon RDS and Aurora

The Difference Between Amazon RDS and Aurora

AWS does incorporate several database services that offer high performance and great functionality. However, customers do find the difference between Amazon Relational Database Service and Amazon Aurora. Both services do provide similar functions, but do cover their own use cases.

Download our 10-Step Cloud Migration ChecklistYou'll get direct access to our full-length guide on Google Docs. From here, you will be able to make a copy, download the content, and share it with your team.