Skip to main content

AWS Fargate pricing calculator

Created
Active
Viewed 90 times
4 replies
2
  1. The AWS pricing calculator for Fargate has an input field named "average duration"s - is that the average duration per task?

  2. There is another input field named "Number of tasks or pods" - is that the desired count? or min? or max? or average task count?

  • 932
  • 2
  • 13
  • 41

4 replies

Sorted by:
78642117
2

Hello, I believe this helps:

  1. Average Duration: This field refers to the average duration per task. It represents the typical amount of time a single task or pod runs (Suppose you have 3 tasks running and task run for 3 hours, 5 Hours and 4 Hours respectively. Then the Average Duration will be 4 Hours Per task.) In other words how long single task will be running it can be even 30 Days (Means there was no deployment, in last 30 days).

  2. Number of Tasks or Pods: This field generally represents the total number of tasks or pods that you expect to run. In the context of the AWS Fargate pricing calculator, this is typically the average number of tasks or pods running at any given time, not the desired, minimum, or maximum count. It's used to estimate costs based on the average number of concurrent tasks or pods running over a period of time.

So if I say, My application was able to run on 2 tasks where I had multiple deployment through out the day (4 Deployment). Then Number of task or pods are 8 and average duration is time how long the task were in running state.

78643603
0
  • 932
  • 2
  • 13
  • 41
Author

Thanks! That was really helpful!

One question though. Can Fargate tasks take requests only when they're running? Or can a task come back alive on-demand when a request comes in and serve the request?

78646615
0

Can Fargate tasks take requests only when they're running? Or can a task come back alive on-demand when a request comes in and serve the request?

The Fargate task are like containers, so to server the request there should be one task running, You can add ASG which will autoscale the tasks based on request, But it can't be 0.

If you want to achieve such scenario where the request create/invoke the server, The AWS Lambda is best environments. In backend the lambda creates an conatiners and invoked when there is request.

78681925
0

Number of tasks or pods - that's number of tasks that you will be running. You have option to choose unit (ie. is it per minute, hour, day, month). If you have a varying number of tasks, then you can look at this as the average number of tasks that you will be running (for example per day)

Average duration is the average duration of the task. Since pricing is per-second (with 1-minute minimum for Linux and 5-minute minimum for Windows tasks), this will be used to calculate per task execution price.

Let's say, on average, you run between 100 and 200 tasks per day and they each run between 20 and 40 minutes, you would set:
Unit - per day
Number of tasks or pods - 150
Average duration - 30

Of course, in this scenario, you could run a couple of calculations so that you can get different scenarios, like:
number - 100, duration 40
number - 100, duration 20
number - 100, duration 30

number - 200, duration 40
number - 200, duration 20
number - 200, duration 30

So that you can get best and worst-case scenarios as well

-