Sample questions
Question 1Easy
- Only internal users get the new version
- Instances are replaced with the new version a few at a time
- Two full environments run side by side and all traffic switches from one to the other at once
- All instances are stopped, then the new version starts
Answer: B. Instances are replaced with the new version a few at a time
Explanation
Rolling updates keep the service up while gradually replacing old instances.
Step-by-step solution
- A rolling deployment replaces old instances gradually.
- A few instances are updated at a time while the rest keep serving traffic.
- Option B says instances are replaced a few at a time, so it is correct.
Why the other options are wrong
- A. Rolling updates replace instances for all users, not only internal ones.
- C. Two full environments with one traffic switch describes blue-green.
- D. Stopping all instances first is the recreate strategy, which causes downtime.
Tip: Rolling means a few at a time; all at once with downtime is recreate.
Question 2Easy
In a blue-green deployment, what does 'green' usually refer to?
- The older, current version
- The production database
- The idle environment with the new version, before traffic switches
- A test-only branch in Git
Answer: C. The idle environment with the new version, before traffic switches
Explanation
Blue serves users while green is prepared; traffic then switches to green.
Step-by-step solution
- Blue serves users while green is prepared.
- Traffic then switches to green.
- Green refers to the idle environment with the new version.
- Before traffic switches, green is ready.
- Final answer: The idle environment with the new version, before traffic switches.
Why the other options are wrong
- A. The older, current version is the blue environment, which serves users until the switch.
- B. The production database is a data store; green names a whole environment, not a database.
- D. A test-only Git branch is not what green means; green is a running environment.
Tip: Blue runs live; green waits ready.
Question 3Easy
Why do teams use progressive delivery (canary, feature flags, gradual rollouts)?
- To release less often, so that each release can be tested more thoroughly before going out
- To skip monitoring
- To limit how many users a bad change can affect
- To avoid writing tests
Answer: C. To limit how many users a bad change can affect
Explanation
Exposing changes gradually reduces the blast radius of failures.
Step-by-step solution
- Progressive delivery releases gradually.
- Only some users get a change first.
- A bad change affects fewer users.
Why the other options are wrong
- A. It does not mean fewer releases.
- B. Monitoring is essential.
- D. Tests are still needed.
Tip: Small blast radius.
Question 4Easy
The 'recreate' deployment strategy:
- Keeps two environments live
- Stops all old instances, then starts new ones, causing downtime
- Releases to 1% of users first
- Mirrors a copy of live traffic to the new version while users keep being served by the old one
Answer: B. Stops all old instances, then starts new ones, causing downtime
Explanation
Simple and avoids running two versions at once, but the service is down between stop and start.
Step-by-step solution
- Recreate stops every old instance first.
- Only after that does it start the new version.
- The gap between stop and start causes downtime, so option B is correct.
Why the other options are wrong
- A. Recreate runs only one version at a time, with no second live environment.
- C. Releasing to 1% of users first describes a canary release.
- D. Mirroring live traffic while old instances serve users describes shadow testing.
Tip: Recreate means stop, then start: simple, but with downtime.
Question 5Medium
Why is 'roll forward' sometimes chosen over rollback?
- Roll forward is always faster, since a rollback needs a full rebuild of the old version from source
- Roll forward needs no testing
- Rollbacks are illegal
- A rollback may be impossible after irreversible changes like migrations
Answer: D. A rollback may be impossible after irreversible changes like migrations
Explanation
If data or schema changes cannot be undone safely, shipping a quick fix forward may be the only option.
Step-by-step solution
- A rollback sends traffic back to an older version.
- A new version may have made migrations or data changes that cannot be undone.
- If the change cannot be reversed safely, a fix shipped forward may be the only option. Option D is correct.
Why the other options are wrong
- A. Roll forward is not always faster, and a rollback does not need a rebuild from source.
- B. Roll forward still needs testing before release.
- C. Rollbacks are allowed; they are just not always possible.
Tip: Check whether the release changed data or schema before choosing rollback.
Question 6Medium
Canary release vs A/B testing:
- Canary releases are used only for mobile apps, while A/B testing is used only for web backends
- They are identical
- A/B testing is a rollback technique
- Canary checks a release is safe; A/B compares variants on a business metric
Answer: D. Canary checks a release is safe; A/B compares variants on a business metric
Explanation
Canary is about risk reduction for a new version; A/B experiments measure which variant performs better.
Step-by-step solution
- A canary checks that a release is safe.
- A/B testing compares variants on business metrics.
- The goals differ.
Why the other options are wrong
- A. Both apply broadly.
- B. They are not identical.
- C. A/B is not rollback.
Tip: Canary = safety; A/B = outcomes.
Question 7Medium
Shadow (dark) traffic testing means:
- Sending all traffic to the new version
- Deploying the new version only at night, when traffic is low and fewer users could notice errors
- Copying live requests to the new version and discarding its responses
- Testing with fake users only
Answer: C. Copying live requests to the new version and discarding its responses
Explanation
The new version sees real load and inputs without affecting users; side effects must be suppressed.
Step-by-step solution
- Shadow testing copies live requests to the new version.
- The new version processes them, but its responses are thrown away.
- Users only see the old version, so option C is correct.
Why the other options are wrong
- A. Sending all traffic to the new version is a full cutover, not shadow testing.
- B. Choosing a quiet time to deploy is not shadow testing.
- D. Shadow testing uses real live requests, not fake users.
Tip: Shadow traffic means real requests, copied, with responses discarded.
Question 8Medium
Why are canary releases often paired with automated metrics analysis?
- Metrics make canaries free
- Canaries cannot be rolled back manually
- Analysis replaces all testing
- Humans are too slow to watch every rollout step reliably
Answer: D. Humans are too slow to watch every rollout step reliably
Explanation
Automated checks compare canary and baseline metrics and halt bad rollouts within minutes.
Step-by-step solution
- Canaries expose a release to a small share.
- Metrics must be checked at every step.
- Automation does it faster than people.
Why the other options are wrong
- A. Canaries are not free.
- B. Rollback is possible.
- C. Analysis does not replace testing.
Tip: Canary + auto metrics.
Question 9Hard
The expand-and-contract (parallel change) pattern renames a column by:
- Dropping the table and recreating it
- Adding the new column, writing both, migrating, then dropping the old
- Renaming it in place during the deploy, inside one transaction so that no queries can fail
- Editing production data by hand
Answer: B. Adding the new column, writing both, migrating, then dropping the old
Explanation
Each step is backward compatible, so old and new app versions keep working throughout the rollout.
Step-by-step solution
- Expand and contract renames a column in safe, backward-compatible stages.
- First add the new column, then write to both the old and new columns.
- Migrate the data, then drop the old column. Option B matches these steps, so it is correct.
Why the other options are wrong
- A. Dropping and recreating the table loses the data in it.
- C. An in-place rename breaks older app versions still running during the deploy.
- D. Hand edits to production data are risky and are not the pattern.
Tip: Expand first, migrate, then contract: every step must work for both old and new code.
Question 10Hard
In a Kubernetes rolling update with maxUnavailable: 0 and maxSurge: 1, what happens?
- One extra new Pod starts, and an old one is removed only when it is ready
- All old Pods are removed first
- Pods are replaced with no new Pods created
- The update cannot proceed at all, because Kubernetes needs at least one unavailable Pod to start
Answer: A. One extra new Pod starts, and an old one is removed only when it is ready
Explanation
Capacity never drops below the desired count; the rollout moves one Pod at a time.
Step-by-step solution
- MaxSurge:1 means one extra new Pod starts.
- MaxUnavailable:0 means no old Pods can be removed until replaced.
- New Pod starts, old Pod is removed only when new is ready.
- Capacity stays at desired count during rollout.
- Final answer: One extra new Pod starts, and an old one is removed only when it is ready.
Why the other options are wrong
- B. Removing all old Pods first would drop capacity to zero, which maxUnavailable 0 forbids.
- C. Replacing without creating new Pods is what maxSurge 0 would do; here maxSurge 1 adds a new Pod first.
- D. The update can proceed: maxUnavailable 0 needs no unavailable Pod, and maxSurge 1 supplies the extra.
Tip: Remember: maxUnavailable:0 means no old Pods can be removed until replaced.
Practise all 20 questions free
The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.
Open this topic in the app →