In a blue-green deployment using containers, what is the main purpose of having two identical environments (blue and green)?
Think about how switching environments helps users experience no downtime.
Blue-green deployment uses two identical environments to switch user traffic from one to the other during updates, minimizing downtime and risk.
Given two running container sets named app-blue and app-green, which Docker command output indicates that the app-green containers are now receiving traffic after switching?
docker ps --filter "name=app-green" --format "{{.Names}}: {{.Status}}"
Look for containers that are running and healthy.
Containers with status 'Up' indicate they are running and receiving traffic. 'Exited' or 'Restarting' means they are not actively serving.
Arrange the steps in the correct order to perform a blue-green deployment using Docker containers.
Think about deploying first, then verifying, then switching traffic, then cleaning up.
The correct workflow is to deploy new containers, verify they are healthy, switch traffic, then stop old containers to avoid downtime.
After deploying the green environment and switching the load balancer to it, users still see the old version from the blue environment. What is the most likely cause?
Consider what controls where user traffic is sent.
If the load balancer was not updated to point to the green environment, traffic will still go to blue even if green is running.
When performing a blue-green deployment involving containers, what is the best practice for handling database schema changes to avoid downtime and data loss?
Think about how to keep the app running smoothly during schema updates.
Backward-compatible changes allow both old and new app versions to work with the database, avoiding downtime and data loss.