Run workloads efficiently on EKS with Karpenter and EC2 Spot Instances (CMP213)
Optimizing Compute Workloads on AWS
EC2, EC2 Spot, and Graviton
AWS offers a wide range of instance types to run virtually any workload, with over 800 instance types available.
The Nitro hypervisor, Graviton chips, and various purchasing options (On-Demand, Savings Plans, EC2 Spot) provide flexibility and cost optimization opportunities.
EC2 Spot instances offer up to 90% discount, but require workloads to be stateless, fault-tolerant, and flexible.
Graviton instances offer up to 40% better price-performance and up to 60% less energy consumption compared to comparable EC2 instances.
Kubernetes Optimization with EKS and Fargate
Application scaling in Kubernetes is handled by the Horizontal Pod Autoscaler (HPA) and Vertical Pod Autoscaler (VPA).
Data plane scaling is handled by Cluster Autoscaler or Fargate.
Fargate simplifies the data plane by removing the need for node groups and enables right-sizing and diversification across Spot and On-Demand instances.
Fargate also supports Graviton-based instances, making it easier to provision the right infrastructure for workloads.
Monzo's Journey to EKS Optimization
Monzo started with a self-managed Kubernetes cluster and gradually adopted autoscaling, Savings Plans, and Cluster Autoscaler.
They recently migrated to Amazon EKS and introduced Fargate, which enabled them to further optimize their costs and infrastructure.
Fargate allowed Monzo to easily use EC2 Spot instances, which now make up 99% of their compute spend, along with Savings Plans.
Monzo's key takeaways:
Establish a cost baseline and measure progress
Observe the tradeoffs between cost optimization and engineering effort or system complexity
Gradually roll out changes to build confidence
Next Steps
Investigate further application right-sizing to optimize pod requirements
Explore the use of Graviton instances to leverage better price-performance and sustainability
These cookies are used to collect information about how you interact with this website and allow us to remember you. We use this information to improve and customize your browsing experience, as well as for analytics.
If you decline, your information won’t be tracked when you visit this website. A single cookie will be used in your browser to remember your preference.