Courseiva

Multi-AZ Task Placement for ECS Fargate

A company runs a microservices architecture on Amazon ECS with Fargate. Each service is deployed in its own ECS service. The company wants to ensure that if one Availability Zone (AZ) fails, the services can continue to operate with minimal impact. What is the MOST resilient task placement strategy?

⚠ Common exam trap

Watch out — candidates often confuse 'high availability' with 'resource efficiency' and choose binpack (Option C) because it reduces cost, but the question explicitly asks for resilience, not cost optimization.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Use a task placement strategy that spreads tasks across Availability Zones.

The 'spread across Availability Zones' strategy explicitly distributes ECS tasks across multiple AZs, ensuring that if one AZ fails, the remaining AZs continue to run the service. This is the most resilient approach for Fargate tasks, as it leverages the AZ isolation provided by AWS to minimize the blast radius of a single-AZ failure.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Use a task placement constraint to run tasks on distinct instances.

    Why it's wrong here

    The distinctInstance placement constraint is only valid for the EC2 launch type, where it requires each task to run on a different underlying container instance. Fargate has no instance IDs, so this constraint is not supported for Fargate services. Even in EC2, distinctInstance does not take Availability Zones into account, so tasks could still be concentrated in a single AZ, failing the high availability requirement.

  • ✗

    Use a task placement strategy that uses the random algorithm.

    Why it's wrong here

    The random placement strategy selects a container instance or Fargate placement target arbitrarily, without evaluating how many tasks are already running in each Availability Zone. While it is possible for random placement to produce a spread, it offers no deterministic guarantee, and with repeated deployments tasks may cluster in one AZ due to chance. Therefore, it cannot reliably ensure the protection against AZ failure that this scenario requires.

  • ✗

    Use a task placement strategy that uses the binpack algorithm to maximize resource utilization.

    Why it's wrong here

    The binpack placement strategy places tasks as densely as possible onto the fewest number of container instances, which maximizes resource utilization but completely ignores Availability Zone distribution. For example, if one AZ has spare capacity, binpack will continue placing new tasks there, concentrating risk and violating the goal of spreading tasks across AZs. This approach is ideal for cost savings in single-AZ workloads, not for high availability across zones.

  • ✓

    Use a task placement strategy that spreads tasks across Availability Zones.

    Why this is correct

    A spread placement strategy with the field attribute:ecs.availability-zone explicitly distributes tasks evenly across the Availability Zones used by the cluster or service. For Fargate, this strategy works in conjunction with your VPC subnets, ensuring tasks are placed in each configured AZ before any are duplicated. This directly satisfies the requirement that a single AZ failure does not take down all instances of the microservice.

Quick reference

AAA Protocol Comparison

ProtocolPort(s)EncryptionTransportPrimary Use
RADIUS1812 / 1813Password onlyUDPNetwork access control
TACACS+49Full packetTCPDevice administration
Diameter3868Full sessionTCP / SCTPCarrier / mobile networks
802.1X—EAP-basedLayer 2Port-based access control

TACACS+ encrypts the entire packet; RADIUS only encrypts the password field — a key exam distinction.

About these practice questions

This DOP-C02 question is part of Courseiva's 1,298-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DOP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DOP-C02 exam.