-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Rate limit the number of concurrent ecs tasks to 400 2. Rate limit the number of concurrent instrument runs either gzip -> md5sum or ora -> md5sum to 10
- Loading branch information
Showing
14 changed files
with
778 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...-md5sum-fq-pair-sfn/step_functions_templates/ecs_task_rate_limiters_sfn_template.asl.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"Comment": "Task Backoff SFN", | ||
"StartAt": "ListTasks", | ||
"States": { | ||
"ListTasks": { | ||
"Type": "Task", | ||
"Parameters": { | ||
"Cluster": "${__cluster_arn__}" | ||
}, | ||
"Resource": "arn:aws:states:::aws-sdk:ecs:listTasks", | ||
"ResultSelector": { | ||
"num_tasks_running.$": "States.ArrayLength($.TaskArns)" | ||
}, | ||
"ResultPath": "$.get_num_tasks_step", | ||
"Next": "Over 400 tasks running" | ||
}, | ||
"Over 400 tasks running": { | ||
"Type": "Choice", | ||
"Choices": [ | ||
{ | ||
"Variable": "$.get_num_tasks_step.num_tasks_running", | ||
"NumericGreaterThan": 400, | ||
"Next": "Sleep a minute", | ||
"Comment": "More than 400 tasks running" | ||
} | ||
], | ||
"Default": "Success" | ||
}, | ||
"Sleep a minute": { | ||
"Type": "Wait", | ||
"Seconds": 60, | ||
"Next": "ListTasks" | ||
}, | ||
"Success": { | ||
"Type": "Succeed" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...ression-fq-pair-sfn/step_functions_templates/ecs_task_rate_limiters_sfn_template.asl.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"Comment": "Task Backoff SFN", | ||
"StartAt": "ListTasks", | ||
"States": { | ||
"ListTasks": { | ||
"Type": "Task", | ||
"Parameters": { | ||
"Cluster": "${__cluster_arn__}" | ||
}, | ||
"Resource": "arn:aws:states:::aws-sdk:ecs:listTasks", | ||
"ResultSelector": { | ||
"num_tasks_running.$": "States.ArrayLength($.TaskArns)" | ||
}, | ||
"ResultPath": "$.get_num_tasks_step", | ||
"Next": "Over 400 tasks running" | ||
}, | ||
"Over 400 tasks running": { | ||
"Type": "Choice", | ||
"Choices": [ | ||
{ | ||
"Variable": "$.get_num_tasks_step.num_tasks_running", | ||
"NumericGreaterThan": 400, | ||
"Next": "Sleep a minute", | ||
"Comment": "More than 400 tasks running" | ||
} | ||
], | ||
"Default": "Success" | ||
}, | ||
"Sleep a minute": { | ||
"Type": "Wait", | ||
"Seconds": 60, | ||
"Next": "ListTasks" | ||
}, | ||
"Success": { | ||
"Type": "Succeed" | ||
} | ||
} | ||
} |
Oops, something went wrong.