Bird
0
0

You want to scale a service named 'worker' to 5 replicas but only 3 nodes are available in the swarm. What will happen?

hard📝 Workflow Q8 of 15
Docker - Swarm
You want to scale a service named 'worker' to 5 replicas but only 3 nodes are available in the swarm. What will happen?
ADocker will only run 3 replicas, one per node
BDocker will fail to scale and show an error
CDocker will run 5 replicas distributed across the 3 nodes, some nodes running multiple replicas
DDocker will create new nodes automatically to run all replicas
Step-by-Step Solution
Solution:
  1. Step 1: Understand Docker swarm scheduling

    Swarm can run multiple replicas on the same node if needed.
  2. Step 2: Predict behavior with fewer nodes than replicas

    With 3 nodes and 5 replicas, swarm places multiple replicas on some nodes.
  3. Final Answer:

    Docker will run 5 replicas distributed across the 3 nodes, some nodes running multiple replicas -> Option C
  4. Quick Check:

    Swarm schedules multiple replicas per node if needed [OK]
Quick Trick: Swarm can place multiple replicas on one node [OK]
Common Mistakes:
  • Assuming one replica per node limit
  • Expecting automatic node creation
  • Thinking scaling fails without enough nodes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes