- Newest
- Most votes
- Most comments
The performance difference you're observing between EKS running on EC2 nodegroups and EKS on Fargate can be attributed to several factors:
-
Resource allocation: While Fargate provides more granular resource allocation (as small as 0.25 vCPU and 0.5GB of memory), EC2 instances often have more powerful and consistent hardware. This can lead to better performance for compute-intensive tasks like those in Trino.
-
Networking: Fargate pods share network namespaces within a task, which can impact network performance. EC2 instances, on the other hand, have dedicated network interfaces and can potentially offer better network throughput.
-
Storage access: EC2 instances may have better access to local storage or optimized storage configurations, which can significantly impact query performance in database applications like Trino.
-
Overhead: Fargate abstracts away the underlying infrastructure, which can introduce some overhead compared to running directly on EC2 instances.
-
Optimization: EC2 instances allow for more fine-tuned optimizations at the host level, which may not be possible with Fargate's abstracted environment.
-
Constant load performance: Fargate is designed for variable workloads and may not perform as well under constant, high-load scenarios compared to properly sized EC2 instances.
It's important to note that while Fargate offers benefits in terms of ease of management and scalability, it may not always provide the same level of performance as EC2 instances for all workloads. For performance-critical applications like Trino, especially those with constant high loads, using EC2 nodegroups might be more suitable. However, the trade-off is that you'll need to manage the underlying infrastructure yourself.
Sources
Benchmarks from DigitalRoute for Achieving Cost Savings with Serverless and AWS Graviton | AWS Partner Network (APN) Blog
AWS Fargate security considerations - Amazon Elastic Container Service
Run Serverless Kubernetes Pods Using Amazon EKS and AWS Fargate
answered 2 years ago
Relevant content
- AWS OFFICIALUpdated 2 years ago
