Which container will be targeted when replicas larger than 1
Yes Felix. Loosely speaking it &quot;load balance&quot; across your 5 web container instances. If you are using the ECS / Compose integration and you are bringing up this stack with a compose up this is roughly what happens:

it creates an ECS cluster
it creates task def for the web task and the nginx task
it creates a service for web (with 5 tasks in it)
it creates a service for nginx (with 1 task in it)
it exposes the nginx service via an ALB to the public (because you expose the port 80)
it creates an internal mechanism based on ECS Service Discovery to be able to resolve web inside the cluster (that's how the nginx is able to reach an entity called web).

ECS SD leverages CloudMap/Route53 which will round-robin across the 5 entries (web tasks). You can read more here.