AZ-400 Deployment Patterns 5 — Questions and Answers
Question 1: When using the 'rolling' deployment strategy in an Azure Pipelines YAML deployment job, what does the 'maxParallel' property control?
- Maximum number of pipeline agents
- Maximum number of targets updated simultaneously in each rolling batch (Correct answer)
- Maximum deployment duration in minutes
- Maximum artifact size in MB
Correct answer: Maximum number of targets updated simultaneously in each rolling batch
maxParallel defines how many targets (VMs, servers) are updated at the same time in each rolling wave, balancing speed and availability.
Question 2: You need to deploy a new API version while keeping the old version live for backward compatibility. Which Azure API Management feature supports this pattern?
- API Management policies only
- API versioning with multiple version sets and routing (Correct answer)
- Azure Front Door geo-routing
- Azure Traffic Manager weighted profiles
Correct answer: API versioning with multiple version sets and routing
Azure API Management supports versioning via URL path, header, or query string, allowing multiple API versions to coexist and route independently.
Question 3: In a multi-stage Azure pipeline, what is the correct way to pass a secret output from one stage to a downstream stage?
- Use pipeline variables with isOutput=true and mark as secret, then reference via dependencies. (Correct answer)
- Write secrets to a plain text file and read it in the next stage
- Use a public artifact attachment
- Hardcode secrets in YAML environment variables
Correct answer: Use pipeline variables with isOutput=true and mark as secret, then reference via dependencies.
Setting isOutput=true on a task variable and referencing it via the dependencies context in a later stage passes values across stages; secrets can be mapped as secret variables.
Question 4: A deployment fails halfway through a rolling update in Kubernetes, leaving some pods on v1 and some on v2. What is the fastest safe remediation?
- Delete the deployment and recreate it from scratch
- Run 'kubectl rollout undo deployment/<name>' to revert to the previous ReplicaSet (Correct answer)
- Manually delete v2 pods one by one
- Scale the deployment to zero and back up
Correct answer: Run 'kubectl rollout undo deployment/<name>' to revert to the previous ReplicaSet
'kubectl rollout undo' reverts the deployment to its previous recorded state using the saved ReplicaSet, quickly restoring all pods to v1.
Question 5: Which deployment pattern involves routing production traffic to a new version while using the production data set — but never exposing results to users until manually promoted?
- Blue-green
- Shadow (dark launch) deployment (Correct answer)
- Canary
- Recreate
Correct answer: Shadow (dark launch) deployment
Shadow deployments send real production traffic to the new version silently; responses are discarded and users see only the live service until promotion.
Question 6: An organization uses Azure Pipelines with approval gates. A release is stuck waiting for approval and the approver is unavailable. Which built-in setting allows the release to auto-approve after a timeout?
- There is no timeout; someone must always approve manually
- The approval policy 'Timeout' field auto-rejects or auto-approves the release after the specified duration (Correct answer)
- Pipeline variables can override approvals
- Only service connections can bypass approvals
Correct answer: The approval policy 'Timeout' field auto-rejects or auto-approves the release after the specified duration
Azure Pipelines approval configurations include a timeout value that, when reached, can either reject the deployment or allow it to proceed automatically based on the configured behavior.
Question 7: Which metric in DORA measures how long it takes to restore service after a production incident, and what is the Elite benchmark?
- Deployment frequency; multiple times per day
- Mean Time to Restore (MTTR); less than one hour (Correct answer)
- Change failure rate; less than 1%
- Lead time for changes; less than one day
Correct answer: Mean Time to Restore (MTTR); less than one hour
MTTR (Mean Time to Restore) measures recovery time from incidents; Elite DORA performers restore service in less than one hour.
When using the 'rolling' deployment strategy in an Azure Pipelines YAML deployment job, what does the 'maxParallel' property control?