Recall & Review
beginner
What is service scaling in Docker?
Service scaling means increasing or decreasing the number of containers running a service to handle more or less work.
Click to reveal answer
beginner
Which Docker command is used to scale a service?
The command
docker service scale SERVICE=NUMBER changes the number of containers for a service.Click to reveal answer
beginner
What happens if you scale a service down in Docker?
Docker stops some containers of the service to reduce the total number running, saving resources.
Click to reveal answer
beginner
How can you check the current number of containers running for a service?
Use
docker service ls to see services and docker service ps SERVICE to see containers running for that service.Click to reveal answer
beginner
Why is service scaling useful in real life?
It helps handle more users or traffic by adding containers, or save money by reducing containers when less work is needed.
Click to reveal answer
Which command scales a Docker service to 5 containers?
✗ Incorrect
The correct syntax to scale a service is
docker service scale SERVICE=NUMBER.What does scaling a service up mean?
✗ Incorrect
Scaling up means increasing the number of containers running the service.
How do you see the current number of containers for a service?
✗ Incorrect
The command
docker service ps SERVICE lists containers running for that service.If you scale a service down, what happens?
✗ Incorrect
Scaling down stops some containers to reduce the total number running.
Why might you want to scale a service automatically?
✗ Incorrect
Automatic scaling helps match the number of containers to user demand or traffic.
Explain how you would scale a Docker service named 'webapp' to 3 containers and check the result.
Think about the command to change container count and how to verify it.
You got /2 concepts.
Describe why service scaling is important in managing applications with changing traffic.
Consider what happens when many or few users visit your app.
You got /3 concepts.