What vCPUs in Fargate really mean?
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Amazon Fargate, a serverless compute engine for containers offered by AWS, abstracts away the need to manage infrastructure, simplifying container management and allowing developers to focus on building applications. However, understanding Fargate's virtual CPUs (vCPUs) is crucial for maximizing efficiency and ensuring your applications perform optimally. In this article, we delve into what vCPUs in Fargate really mean, including technical explanations and useful examples.
Understanding vCPUs in Fargate
Basics of vCPUs
In a traditional environment, CPUs refer to the physical processors in a computer. However, in cloud computing, and specifically in Amazon Fargate, the term vCPU (virtual CPU) is used to describe a unit of computing power. Each Fargate task or pod can be configured to use a certain number of vCPUs, providing predictable performance by specifying the amount of CPU resources allocated to your containers.
Fargate's vCPU Model
Amazon Fargate uses vCPUs as an abstraction of the underlying physical CPU. Here's how it's defined:
- 1 vCPU: Represents a single hyperthread on a 2.5 GHz Intel Xeon Scalable processor (Skylake).
- Provisioning: vCPUs in Fargate are provisioned in increments of 0.25, 0.5, 1, and up to the maximum available cores provided by the Fargate infrastructure.
- Sharing and Isolation: Unlike traditional EC2 instances where multiple tasks might share a single host's CPUs, Fargate schedules tasks on isolated environments where the specified vCPUs are dedicated to your task.
vCPU Allocation
Allocating the right amount of vCPUs is critical to ensuring optimal performance and cost-effectiveness:
- Under-provisioning: If you allocate fewer vCPUs than your application requires, it may lead to throttled performance, increased response times, or even dropped requests under load.
- Over-provisioning: Allocating more vCPUs than needed increases costs without proportional performance benefits.
Example of vCPU Allocation
Consider a scenario where you have a batch processing application that typically consumes 1.5 vCPUs during peak load. In such cases, you might allocate 2 vCPUs to buffer occasional spikes, ensuring smooth performance:
Related reading
- What would be the AWS equivalent to Firebase Realtime Database?
- What's a conceptual difference between PersistentVolume and PersistentVolumeClaim in kubernetes?
- What's special about 169.254.169.254 IP address for AWS?
- What's the difference between Apache's Mesos and Google's Kubernetes
- What's the difference between AWS SSO and AWS Cognito?
- What's the difference between BatchGetItem and Query in DynamoDB?
- What's the difference between Cluster and Instance in AWS Aurora RDS
- What's the difference between Docker Compose and Kubernetes?

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.