Unseen Costs, Visible Impact: How Proactive ALB Management Drives Cloud Efficiency

11 / Jul / 2025 by Karandeep Singh 0 comments

Introduction

Handling AWS costs is very important for cloud bill optimizations. One overlooked service that can significantly contribute to monthly expenses is Elastic Load Balancing. Our team, which works for a global advertising management platform client, a powerhouse in advertising and connected TVs, recently undertook a major step to optimize AWS ALB costs, mainly focusing on reducing unnecessary LCU (Load Balancer Capacity Unit) usage. By making some adjustments to the code configuration and optimising resource utilisation, we were able to save thousands of dollars.

I’ll discuss the tactics we employed, the challenges we encountered, and how these configuration adjustments impacted our AWS bill in this short blog. Let’s get started!

Understanding ALB Costs

Before considering savings cost, we should understand the cost. AWS ELB cost is calculated based on the LCU, which stands for Load Balancer Capacity Units, that is calculated using four dimensions:

  • Active Connections: The number of ongoing TCP connections per minute. A new connection is a new TCP connection established from a client to the ALB and from the ALB to a target. This implies that a single incoming request to the ALB creates two new connections – one for the outgoing target connection and one for the incoming client connection, assuming there is no connection reuse.
  • Processed Bytes: The volume of data processed in a given hour. How many bytes did the ALB process overall, including data sent to and received from the client? This includes all of the data we send back in the response as well as all of the data that enters the ALB for a request. This covers the request body, query parameters, headers, and more.
  • New Connections: This is the number of TCP connections created per second. An active connection is a previously established and still open TCP connection either between a client and the ALB or between the ALB and a target. The connection remains open until either end of the connection chooses to close it, either because it hits an idle timeout or is explicitly closed.
  • Rule Evaluations: Number of requests evaluated against routing rules per second.

    Understanding ALB Costs

    Understanding ALB Costs

The highest of these utilised dimensions decides the total LCU usage and eventually determines the LB cost. In our case, processed bytes and new connections accounted for most of our expenses.

Analysing Our ALB Costs

After examining our AWS CloudWatch Load Balancer metrics, we discovered that two high-traffic ALBs were the main cause of our monthly ALB expenses, which were averaging between $30,000 and $45,000.

  • Public load balancers cost between $14,000 and $23,000 a month.
  • The private load balancer costs between $15,000 and $23,000 per month.
  • We examined CloudWatch metrics and discovered that the private ALB cost was mostly caused by numerous new connections.

    Private Alb Connections

    Private Alb Connections

On the other hand, Processed Bytes was a major factor for the Public ALB cost.

Processed Bytes

Processed Bytes

Cost Optimization Strategies

To handle these challenges, we followed the following strategies:

  1. Reusing Private ALB-to-Application Connections

    Problem Statement: By default, our private applications were closing connections instead of reusing them, resulting in a high number of new connections on the private load balancer.

Solution:

  • For our private applications, we set “jetty.connection.keepalive = true to enable connection reuse.
  • Our applications’ ability to manage longer persistent connections has been tested, observed, and confirmed.
  • To implement the changes, a canary release was carried out while metrics were tracked.
  • For private ALB, new connections were cut by about 50%, which resulted in significant cost savings.
  • An estimated $500 per day is saved as a result of the significant decrease in new connections and rise in active connections.
  • Result: Significant reduction in new connections and increase in active connections, leading to an estimated $500/day savings.
    New Connection Count

    New Connection Count

    Active Connection Count

    Active Connection Count

    LCU Usage

    LCU Usage

    Cost Savings

    Cost Savings

 2. GZip Compression To Reduce Load Balancer Processed Bytes

Problem Statement: Large amounts of response data were being transferred without compression, increasing the processed byte costs for the public ALB.

Solution:

  • Set “jetty.gzip.enabled=true”, which enables GZip compression for our Java-based applications.
  • Tested and confirmed that compressed responses were sent to clients that supported GZip.
  • Observed the impact on response times and the decline in outgoing data transfer.
  • Result: We saw reduced outbound data transfer costs and fewer processed bytes after turning on this modification, which further decreased our ALB costs.
  • Keeping an eye on and optimising ALB configuration
  • To guarantee the best possible connection reuse, we examined CloudWatch ALB metrics.
  • Monitored LCU usage patterns to verify ongoing cost savings.
  • Response payloads are continuously optimised to reduce needless data transfer.
  • Processed bytes reduced for public ALB thanks to GZip compression.

    Processed Bytes Public ALB

    Processed Bytes Public ALB

  • This helped us reduce the public load balancer cost significantly.

Key Takeaways

  • Regularly monitor CloudWatch metrics and review ALB configurations to find ALB cost drivers.
  • Optimise connection reuse to reduce the no. of new connections, which will result in cost savings.
  • Enable response compression to reduce processed bytes.

These are simple yet very effective changes we made. We successfully reduced our ALB costs while maintaining availability, reliability, and performance. If your AWS bill is rapidly increasing due to ALB costs, consider these strategies to achieve similar cost reductions!

Have you optimised your ALB costs?

AWS ALB is a powerful service, but without careful monitoring and optimization, it can become a silent budget buster. Fortunately, making small configuration adjustments, such as turning on GZip or reusing connections, can significantly cut expenses. AWS-certified architects and DevOps engineers are always on the lookout for ways to improve efficiency and cut costs when you work with a managed services provider like TO THE NEW.

What comes next, then? Begin putting these procedures into effect right now, and keep an eye on how your AWS bills change. Have more advice to share?

FOUND THIS USEFUL? SHARE IT

Leave a Reply

Your email address will not be published. Required fields are marked *