[06] Services & Scheduling Flashcards
What types of service autoscaling does ECS support?
Target tracking, step scaling policies, and scheduled scaling
What does target tracking autoscaling do?
The desired count of the service is adjusted to maintain a metric at a target value
What is a limitation of target tracking autoscaling?
It only works for services that should scale-out when the metric is above the target value
How are scaling decisions made for scale-out and scale-in with multiple scaling policies?
Scale-out occurs if any of the policies are ready to scale-out, scale-in occurs if any of the policies are ready to scale-in
What does step scaling autoscaling do?
The desired count is adjusted in steps based on the size of alarm breaches
What is an advantage of step scaling autoscaling?
Step-scaling allows faster scale outs because the threshold and step size is configurable
What happens during a cooldown period after a scaling event?
Further scale-outs will only occur if they are larger than the previous event, and scale-in activities are blocked
What are scaling decisions based on?
The actual number of running tasks in the service, not the desired count
What happens to scale-in processes during deployments?
Scale-in processes are stopped during deployments, but scale-outs can occur
What are the most common forms of service load balancing?
ALBs and NLBs
Can NLBs be used for dynamic port mapping?
Yes
What should the load balancer’s subnet configuration include?
All the AZ’s that tasks are running in
What condition should be met to prevent 502 errors?
StopTimeout > target group registration delay > client connection timeout
What other condition should be met to prevent 502 errors?
task idle timeout > ALB idle timeout
Do the load balancer and tasks need to be in the same VPC?
Yes, but not necessarily the same subnets
What can be assigned to NLBs to give them a static IP?
Elastic IPs
Can services be registered to multiple target groups?
Yes, but these target groups must be used either all with ALB(s), or all with NLB(s)
How can NLBs be configured to terminate connections when the task is stopped?
By setting the connection terminate setting in the target group
What are the two ways to connect to a service via API Gateway?
- Create an HTTP API and route to the service using an ALB, NLB or CloudMap 2. Create a REST API, configure private integration, and route to the service using an NLB
What does Service Connect only support connectivity between?
ECS services
Why does Service Connect only support connectivity between ECS services?
Because it doesn’t publish DNS records - the proxy sidecar discovers the endpoints using the CloudMap API
What networking modes are supported by Service Connect?
bridge
and awsvpc
What features do the proxies attached to each task by Service Connect enable?
Round-robin load balancing, retries, and the collection of CloudWatch metrics
What does Service discovery integrate with?
Cloud Map
What does Service discovery support in addition to ECS clients?
Non-ECS clients
What networking modes are supported by Service discovery?
awsvpc
and bridge
for clients that support SRV
records
What are the three states a service can be in?
ACTIVE, DRAINING, INACTIVE
When is a service in the DRAINING state?
Deletion has been triggered, but there are still active tasks
When is a service in the INACTIVE state?
All tasks have transitioned to STOPPING or STOPPED and ECS is ready to delete the service
What happens to unhealthy tasks in a service?
They are replaced by the service scheduler