0
0
Dockerdevops~5 mins

Service scaling in Docker - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
Adocker container scale myservice 5
Bdocker service scale myservice=5
Cdocker scale service myservice 5
Ddocker service update --scale 5 myservice
What does scaling a service up mean?
AAdding more containers
BStopping containers
CUpdating container images
DRemoving the service
How do you see the current number of containers for a service?
Adocker service inspect SERVICE
Bdocker container ls
Cdocker service ps SERVICE
Ddocker ps -a
If you scale a service down, what happens?
AContainers stop to reduce count
BNothing changes
CService is deleted
DMore containers start
Why might you want to scale a service automatically?
ATo backup data
BTo save disk space
CTo update software versions
DTo handle changing user demand
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.