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

About AWS Fargate

0

I am new to AWS Fargate and basically I knew it is serverless and we don't have to manage the compute provision.

For the situation, I run Trino in EKS workloads with 1 worker 1 node 24 hours a day using 2 core CPU and min 4GB to max 6GB of memory in EC2 instance. So when I bring my Trino setup in AWS Fargate:

Question 1: How does Trino scale up, scale down, scale in & scale out?

Question 2: when my workloads uses more memory from normally 4GB to its peak of 6GB, how long does Fargate take action and complete provide resources for my workloads?

Question 3: Same situation of question 2, when scaling, does my workloads stop or pause for a while in order to let Fargate complete its scaling job or my workloads still work normal from the beginning to the end of the scaling? Additionally, does the answer for scale up applied to scale down too or it is different?

Question 4: About the pricing, in AWS Pricing documents:

CPU Memory Values 0.25 vCPU 0.5 GB, 1 GB, and 2 GB 0.5 vCPU Min. 1 GB and Max. 4 GB, in 1 GB increments 1 vCPU Min. 2 GB and Max. 8 GB, in 1 GB increments 2 vCPU Min. 4 GB and Max. 16 GB, in 1 GB increments 4 vCPU Min. 8 GB and Max. 30 GB, in 1 GB increments 8 vCPU Min. 16 GB and Max. 60 GB, in 4 GB increments 16 vCPU Min. 32 GB and Max. 120 GB, in 8 GB increments

based on my Trino workloads uses from 4gb to 6gb, so which configuration does Fargate use? And how many CPU does 1 vCPU equal to ? Does vCPU matter to the performance of my workloads?

1 Answer
0

I'll address your questions about AWS Fargate and how it would handle your Trino workload:

  1. Scaling with AWS Fargate: AWS Fargate doesn't directly handle scaling of your application. Instead, it works in conjunction with Amazon EKS (Elastic Kubernetes Service) to manage the scaling of your Trino workload. You would need to configure Kubernetes' Horizontal Pod Autoscaler (HPA) or Vertical Pod Autoscaler (VPA) to define how your Trino deployment should scale. These autoscalers would determine when to add or remove pods based on metrics like CPU utilization or custom metrics you define.

  2. Resource allocation time: When your workload requires more memory (scaling from 4GB to 6GB), Fargate doesn't need to take any specific action. Unlike traditional EC2 instances, Fargate allows you to specify the exact CPU and memory requirements for each task. When you deploy your Trino workload, you would specify the maximum memory requirement (6GB in this case). Fargate would then allocate a task with those resources immediately, so there's no delay in providing the maximum resources you've specified.

  3. Impact on workload during scaling: With Fargate, your workload doesn't stop or pause during scaling events. Since you've already specified the maximum resources (6GB of memory in this case), your application has access to these resources from the start. If you're using Kubernetes autoscalers to add more pods, new pods would be started without interrupting existing ones. The same principle applies to scaling down - existing pods continue to run until they're terminated by the autoscaler.

  4. Pricing and resource allocation: Based on your requirements (2 core CPU and 4-6GB of memory), Fargate would use the 2 vCPU configuration. The closest match would be:

2 vCPU with 6 GB memory

In Fargate, 1 vCPU is equivalent to 1 CPU core. The vCPU allocation does matter for performance, as it determines the processing power available to your workload. If your Trino deployment is CPU-intensive, having 2 vCPUs should provide similar performance to your current 2-core EC2 setup.

Remember that with Fargate, you're billed for the resources you request, even if your application isn't using them fully at all times. So, you'd be paying for 2 vCPU and 6 GB of memory continuously, which allows your application to burst up to 6GB when needed without any scaling delay.

Sources
Serverless Compute Engine – AWS Fargate Features – Amazon Web Services
Community | Leveraging AWS Fargate for Containerized Workloads
Tutorial: Getting started with AWS Batch and Fargate orchestration - AWS Batch
AWS Fargate for Amazon ECS - Amazon Elastic Container Service

profile picture
answered a month ago

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