I have an ECS service with 1 Fargate task. There is an ALB that routes traffic to it. This task is receiving a continuous stream of traffic to one endpoint from a load tester. I noticed that whenever I redeploy the same task definition, there is either a jump or a drop in average service CPU, and then it seems to reach steady state at the new lower or higher CPU. I've been checking different metrics and logs and can't seem to find a pattern, as the number of incoming requests stays relatively stable, and no warnings or errors are being thrown in the logs.
Would anyone have any ideas of what to explore?
Edit
Here is roughly the task definition used for the task above (stripped of any null or empty values, or otherwise descriptive ones like 'family'). Note that it is a 2 container task: (1) an application, (2) an nginx sidecar
{
"networkMode": "awsvpc",
"cpu": "1024",
"memory": "2048",
"compatibilities": [
"EC2",
"FARGATE"
],
"containerDefinitions": [
{
"logConfiguration": {
"logDriver": "awslogs",
"options": <options>
},
"portMappings": <ports>
"image": <image>,
"name": "app"
},
{
"logConfiguration": {
"logDriver": "awslogs",
"options": <options>
},
"portMappings": <ports>,
"image": <http_image>,
"dependsOn": [
{
"containerName": "app",
"condition": "START"
}
],
"essential": true,
"name": "http"
}
],
"requiresAttributes": [
{
"name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
},
{
"name": "ecs.capability.execution-role-awslogs"
},
{
"name": "com.amazonaws.ecs.capability.ecr-auth"
},
{
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
},
{
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.17"
},
{
"name": "com.amazonaws.ecs.capability.task-iam-role"
},
{
"name": "ecs.capability.container-ordering"
},
{
"name": "ecs.capability.execution-role-ecr-pull"
},
{
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
},
{
"name": "ecs.capability.task-eni"
}
],
"requiresCompatibilities": [
"FARGATE"
]
}
