Live data from Hacker News

AWS Communism: How we cut our Load Balancing cost by more than 96%

setops.co

1–10 of 19 posts

Re: AWS Communism: How we cut our Load Balancing cost by more than 96%

#2
An AWS Application Load Balancer (ALB) can host up to 100 applications with 25 different TLS certificates. However, if you wanted to share this ALB, you'd need to watch how many apps you assign to it. If you tried to use it across Terraform projects, you'd need to expose its ID. At best, it's additional work. More often, this is too much work. Thus, it's more economical for most cloud engineers to create dedicated resources and let the client pay the bill.

Our way is AWS-native and allows for maximum efficient sharing – without complicating it for the user. When you can share a single ALB between 25 to 100 apps, the large cost saving comes in.

Re: AWS Communism: How we cut our Load Balancing cost by more than 96%

#3
I'm not normally a fan of sharing ALBs between services as a lot of the metrics [1] are only recorded for the load balancer as a whole, not each individual target group (an application attached to the load balancer).

I can see the advantages of cost savings, but it's definitely a tradeoff.

[1]: https://docs.aws.amazon.com/elasticloadbalancing/latest/appl...

Re: AWS Communism: How we cut our Load Balancing cost by more than 96%

#4
post #3

I'm not normally a fan of sharing ALBs between services as a lot of the metrics [1] are only recorded for the load balancer as a whole, not each individual target group (an application attached to the load balancer). I can see the advantages of cost savings, but it's definitely a tradeoff. [1]: https://docs.aws.amazon.com/elasticloadbalancing/latest/appl...

Hasn't been an issue for us but I agree. It's painful to pay them $20+ just for the sake of fine-granular metrics though.

Re: AWS Communism: How we cut our Load Balancing cost by more than 96%

#5
Nothing is free. Resource sharing comes with the noisy & problematic neighbour issue. An ALB consumes 16.43 USD per month. You need to decide if it's worth the risk, blast radius would be larger in case of incidents. I've seen ALBs timing out because the ALB itself did not scale fast enough, so in a shared environment with 100 different applications, this might be amplified.

Re: AWS Communism: How we cut our Load Balancing cost by more than 96%

#6
post #5

Nothing is free. Resource sharing comes with the noisy & problematic neighbour issue. An ALB consumes 16.43 USD per month. You need to decide if it's worth the risk, blast radius would be larger in case of incidents. I've seen ALBs timing out because the ALB itself did not scale fast enough, so in a shared environment with 100 different applications, this might be amplified.

This is a very good point I hadn't thought of before, thank you! I've never "performance tested" an ALB.

Re: AWS Communism: How we cut our Load Balancing cost by more than 96%

#7
One of the main reasons I started sharing an ALB is because I had Terraform build a whole web stack's infrastructure for every Pull Request, test the app against that stack, then destroy it all on PR close... and that was hitting the limit of # ALBs per account. Sharing an ALB allowed us to scale that CI process without hitting the limit [as quickly].

Re: AWS Communism: How we cut our Load Balancing cost by more than 96%

#9
post #5

Nothing is free. Resource sharing comes with the noisy & problematic neighbour issue. An ALB consumes 16.43 USD per month. You need to decide if it's worth the risk, blast radius would be larger in case of incidents. I've seen ALBs timing out because the ALB itself did not scale fast enough, so in a shared environment with 100 different applications, this might be amplified.

> the ALB itself did not scale fast enough

On the other hand sharing an ALB across 100 apps means that a single app's fluctuations are less significant. If your apps have completely independent traffic patterns then a 10x surge for one service would only be a 10% surge for the ALB if all applications have equal amounts of traffic. This likely can be handled with the current utilization buffer so the ALB scaling isn't even required (of course you hope that it will still scale up quickly to refill the buffer).

Of course in real life everything isn't this perfect, your traffic patterns are correlated between services and one service is the vast majority of your traffic but it can still be a nice buffer.

Post reply on HN