By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Seeking Cost Saving options For ALB with Autoscaling

0

Hi, I have a blog site with an average of 3000 live traffic (In Cloudflare it had served 572GB Data in last 7 days). I am using Autoscaling group with t3.large with minimum 1 instance and max 4 instance, and in the peak hour it's 2 instances everytime running.

And I am using ALB. But what I saw in November in last 3 days it charged me 10.38$ for the ALB, so looks like AVG 3.5$ per day means 105$ per month.

I have calculated my setup's cost 2 instance running frequently cost me 72.5$ Per month RDS (db.t3.large) reserved cost me 100$ per month (60% AVG CPU Usages) VPC Not Sure but by calculation maybe 30$ per month ALB - 105$ Per month (in my calculation) Data Transfer - 100$ Per Month (I am using CF pro for serving caching data) Total- 407.5$ Do you have any suggestions on how I can optimize or reduce my cost? (Let's not reserve those 2 instances because sometimes it uses 3 instances.)

2 Answers
1

Based on your current setup and usage, there are several strategies you can consider to optimize and reduce your AWS costs:

  1. Application Load Balancer (ALB) Optimization: The ALB seems to be a significant cost factor. Consider using a single Application Load Balancer for multiple applications if possible. Also, review your ALB configuration to ensure you're not over-provisioning.

  2. Auto Scaling Refinement: Fine-tune your Auto Scaling policies to more closely match your traffic patterns. This could potentially reduce the number of instances running during off-peak hours. Consider using more granular scaling policies based on metrics like CPU utilization, request count, or custom application metrics.

  3. Instance Type Evaluation: Analyze if t3.large instances are the most cost-effective for your workload. You might be able to use a different instance family or size that provides better price-performance for your specific needs. AWS Compute Optimizer can help identify if your instances are over-provisioned.

  4. Spot Instances: For non-critical workloads or batch processing, consider using Spot Instances in your Auto Scaling group. They can offer significant cost savings compared to On-Demand instances.

  5. RDS Optimization: With 60% average CPU usage, your RDS instance might be slightly over-provisioned. Consider testing a smaller instance size or exploring Aurora Serverless if your workload has variable demand.

  6. Data Transfer Cost Reduction: Review your data transfer patterns and ensure you're making the most of CloudFront. Optimize your caching strategies and TTLs to reduce origin fetches.

  7. VPC Cost Analysis: Examine your VPC usage, particularly NAT Gateway usage if applicable. Consider using VPC endpoints for AWS services to reduce data transfer costs.

  8. AWS Savings Plans: While you don't want to reserve the EC2 instances, consider Compute Savings Plans which provide flexibility across instance families, sizes, and even some AWS services.

  9. CloudWatch and Monitoring: Use AWS Cost Explorer and CloudWatch to continuously monitor your usage and identify cost anomalies or optimization opportunities.

  10. Serverless Options: For certain components of your application, consider if serverless options like AWS Lambda or Fargate could be more cost-effective, especially if you have variable traffic patterns.

Remember to test any changes in a non-production environment first to ensure they don't negatively impact your application's performance or reliability. Regularly review and refine your setup as your traffic patterns and application needs evolve.
Sources
Community | AWS cost optimization: Top tips and best practices to reduce your bill
Community | EC2 cost optimization:15 ways to save on Amazon EC2
Overview of cost optimization - Cost Modeling Data Lakes for Beginners
AWS Auto Scaling Features

profile picture
answered a month ago
profile picture
EXPERT
reviewed a month ago
  • Hi Gary, Just one question came into my mind, Will those ec2 instance under the ALB+Auto Scaling Group will charge for the Bandwidth or the Bandwidth will be count as ALB's bandwidth?

1

The re:Post Agent is good but misses one specific thing:

How much of your content is static? Serving static content from a web server farm wastes capacity (all capacity - load balancer, servers, etc.).

Instead: Put the static content into S3. Less storage cost and S3 will scale automatically to deal with large-scale requests at no extra cost to you - you're still paying for the data transfer (but you will anyway coming from EC2/load balancer) but you don't have to pay for more instances and more load balancer capacity to deliver content.

profile pictureAWS
EXPERT
answered a month ago
EXPERT
reviewed a month ago
  • In the frontend app, very few static parts is there, basically, everything is fetched from the API. I will look into the docs and everything to understand the first answer and your answer as well to terminate the extra cost.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions