Success Story
Justo structurally lowers its AWS bill with Fargate Spot, log retention and cleanup of unused resources
At a glance
Justo builds software for restaurants and delivery, with infrastructure on AWS and databases on MongoDB Atlas. Its AWS bill kept growing due to storage with no retention, On-Demand compute, avoidable networking costs and unused resources. Craftech optimized each of those fronts and upgraded the EKS clusters: the monthly bill dropped structurally and extended support charges were avoided.
Justo builds software for restaurants and delivery (e-commerce, POS and delivery), with infrastructure on AWS and databases on MongoDB Atlas.
Solution implemented
- Fargate Spot as the capacity provider for every service: a base of 2 On-Demand tasks for availability and horizontal scaling on Spot
- New scaling rules based on CPU and memory
- Survey and removal of unused infrastructure: a development EKS cluster, orphaned EC2 instances, load balancers, target groups, EFS and buckets
- Amazon S3 lifecycle rules to automatically delete ALB logs older than 3 months
- VPC Flow Logs to identify the traffic driving extra NAT Gateway costs, with a proposal for VPC Peering or PrivateLink
- Consolidation of internal load balancers and Ingress
- Controlled EKS upgrade from version 1.25 to 1.29
- Compression and caching on CloudFront
Business Challenge
Justo's AWS bill had several sources of overspending. In storage, it had piled up 45 TB in Amazon S3, of which 9.8 TB were old ALB logs accumulated since 2021, with no retention policies and an average bill of USD 2,258.74 per month. In compute, services ran on Fargate On-Demand without using Spot, with autoscaling that kept idle resources running. In networking, internal traffic to MongoDB went through public IPs and the NAT Gateway, with unnecessary data transfer costs. There were also unused resources, such as abandoned development clusters, EC2 instances, load balancers, target groups, EFS and idle databases, and there was a risk of paying AWS extended support for EKS clusters on version 1.25.
Solution
Craftech added Fargate Spot as the capacity provider for every service, with a base of 2 On-Demand tasks to keep availability and horizontal scaling on Spot, and defined new scaling rules based on CPU and memory. It surveyed and removed unused infrastructure: a development EKS cluster, orphaned EC2 instances, load balancers, target groups, EFS and buckets. It set up lifecycle rules in Amazon S3 to automatically delete ALB logs older than 3 months. With VPC Flow Logs it identified the traffic driving extra NAT Gateway costs, proposed VPC Peering or PrivateLink and consolidated internal load balancers and Ingress. Finally, it carried out a controlled EKS upgrade from version 1.25 to 1.29 and applied compression and caching on CloudFront.
Outcomes
- Structurally lower monthly bill thanks to Fargate Spot in production
- Automatic deletion of terabytes of logs in Amazon S3
- No extended support charges thanks to the EKS upgrades
Stack & technologies