Bird
0
0

You have a service 'api' currently running 4 replicas. You want to handle a sudden traffic spike by doubling the replicas temporarily. Which command correctly doubles the replicas?

hard📝 Workflow Q15 of 15
Docker - Swarm
You have a service 'api' currently running 4 replicas. You want to handle a sudden traffic spike by doubling the replicas temporarily. Which command correctly doubles the replicas?
Adocker service scale api=4
Bdocker service scale api=16
Cdocker service scale api=2
Ddocker service scale api=8
Step-by-Step Solution
Solution:
  1. Step 1: Identify current replica count

    The service 'api' currently has 4 replicas running.
  2. Step 2: Calculate double replicas

    Doubling 4 replicas means setting replicas to 8.
  3. Step 3: Choose correct scale command

    The command docker service scale api=8 sets replicas to 8, doubling the current count.
  4. Final Answer:

    docker service scale api=8 -> Option D
  5. Quick Check:

    Double 4 replicas = 8 [OK]
Quick Trick: Double replicas by setting scale to twice current count [OK]
Common Mistakes:
  • Setting replicas to current count instead of double
  • Setting replicas to half or quadruple by mistake
  • Using wrong syntax for scaling

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes