Skip to content
Tech Interview Prep
Technical interview guide

Deployment Strategies (Blue-Green, Canary, Rolling)

Different ways to roll a new version out safely, trading off speed, blast radius, and infrastructure cost.

Read
30 min
Practice MCQs
25
Interview Q&A
25
Edition
v4
Editorial status
Reviewed

Scope: Kubernetes, Argo Rollouts, Istio, Flagger, Amazon ECS, OpenFeature, DORA, Google SRE, and NIST guidance current 2026-08-31.

Curated: · Written: · Reviewed:

25 questions

MCQ-17A team merges a new checkout path, deploys it to production behind a flag, and then enables it for 1% of users, then 50%, then everyone, without another deploy. Which two concerns did the flag separate?
MCQ-3A Deployment runs 6 replicas with strategy RollingUpdate, maxSurge: 25% and maxUnavailable: 25%. During a rolling update, what is the largest number of Pods that can exist at once and the smallest number of ready Pods that must stay available?
MCQ-4A Deployment `api` runs 10 replicas with `maxSurge: 2` and `maxUnavailable: 2`. A PodDisruptionBudget with `minAvailable: 9` selects the same pods. During a rolling update to a new image, what is the lowest number of Ready pods?
MCQ-5A payments API runs blue-green on one Postgres primary with `max_connections = 300`; 20 are reserved for the admin and monitoring roles, leaving 280 for the app. Each app instance opens a fixed pool of 20 connections, and blue runs 8 instances. The team will deploy green with 8 instances and keep both fleets serving traffic for the entire cutover window; the DBA will not raise `max_connections`. What is the largest per-instance pool size that keeps both fleets inside the 280-connection budget?
MCQ-6A payments API runs 40 pods, each requesting 1500m CPU and 3 GiB. Its node pool has 8 vCPU and 32 GiB allocatable per node and is capped at 12 nodes. For zero-downtime releases with instant rollback the team adopts blue-green: the live fleet keeps serving while a second, identical fleet is scheduled and passes readiness, then the load balancer switches over. What happens at the first cutover?
MCQ-1A payments API runs 12 replicas spread one per node with podAntiAffinity; each pod sustains 600 rps at a p99 of 150 ms. Steady load is 5,400 rps of short HTTP requests distributed evenly across endpoints. The Deployment rolls out with maxSurge: 0 and maxUnavailable: 25%, gated by a readiness probe. The moment the first pods leave service, service-wide p99 climbs from 150 ms to 900 ms and stays there until the rollout finishes. Error rate stays 0.0% and no pod ever reports NotReady. What explains the p99 rise?
MCQ-2An API runs on 10 identical instances behind a round-robin load balancer. Each instance serves up to 300 rps before its p99 crosses the client's 2 s timeout, and steady traffic is 2,700 rps. The new build ships as a rolling update with maxUnavailable 20% and maxSurge 0: the controller takes two instances out of rotation, starts their replacements, and waits for both to pass readiness before taking the next pair. A replacement is ready 40 s after it starts. What happens to requests during the rollout?
MCQ-7A payments API's retry path is being rewritten. The path behaves differently for card-present and card-not-present traffic, and three app versions are in the field. The team must pick the canary cohort. Which cohort best tests the change before full rollout?
MCQ-10A v2 canary takes 1% of traffic. In its first 30 minutes it serves 400 requests and returns 4 5xx responses (1.0%). Over the same window the v1 baseline serves 40,000 requests and returns 240 5xx (0.6%). The rollout tool promotes v2 automatically unless the engineer pauses it. What should the engineer do?
MCQ-11A canary receives 5% of a service's 20,000 req/min, so its 10-minute analysis window should hold about 10,000 requests. The error-rate query returns 400 samples at 0.2% errors; the baseline query returns 200,000 samples at 0.4%. The template's error-rate threshold is 1%, and it declares that a metric returning less than 90% of the expected sample count is a failed measurement, with the run failing on the first failed measurement. What is the correct outcome of this analysis run?
MCQ-9A checkout service is rolling out v2 behind a canary that takes 10% of live traffic for six hours. Promotion is gated on three signals measured against the v1 baseline: 5xx rate under 0.5%, p99 latency under 400 ms, and CPU under 70%. All three pass, the canary is promoted, and within a day 2.1% of orders are double-charged. The double-charge path returns HTTP 200 in 180 ms, and during the canary 1,400 orders took that path, 29 of them charged twice. Which change to the guardrail would have blocked the promotion?
MCQ-8A service releases version 42 as a canary: 5% of live traffic hits the canary and 95% hits stable, both at the same time. From 13:00 to 14:00 a shared cache node begins evicting. At 14:00 the canary's p99 is 240 ms, up from its own 130 ms an hour earlier; stable's p99 at 14:00 is 235 ms, up from 125 ms an hour earlier. What should the on-call engineer conclude about the canary's p99?
MCQ-12A service mesh balances inbound HTTP requests between v1 and v2 by weighted cluster, 90/10, with the decision made per request; client retries and hedging are disabled and both versions fail 0.1% of requests. A steady 30-minute load test at 1,000 req/s has the mesh reporting 10% of requests to v2 while per-pod CPU counters show the v2 handlers burning 31% of the fleet's handler CPU, also steady. v1 handlers consume 12 ms of CPU per request; v2 handlers consume 48 ms. No pod restarted or did background work during the test. Which conclusion fits?
MCQ-13A signup service handles 250 requests/s. A team enables traffic mirroring at the API gateway, copying 20% of live requests to a shadow instance for 10 minutes. The shadow shares the production Postgres primary and the production email provider. 30% of requests are `POST /signup`; the handler inserts a row with `ON CONFLICT (email) DO NOTHING` and then sends a welcome email, whether or not the insert conflicted. The shadow runs the same code as production. How many extra welcome emails does the email provider send during the mirror window?
MCQ-18A payments service reads `payments.retry_v2` from a remote flag provider. The SDK caches rules for 30 seconds; when the cache is cold and the provider is unreachable, it evaluates the flag's default. The v2 path calls a retry queue that is provisioned in only two of five regions, and the flag is still rolling out. What should the default be set to?
MCQ-19A SaaS product ships a browser SDK that downloads a JSON ruleset, caches it in localStorage, and evaluates targeting locally. The `audit-export` REST endpoint is gated by `plan == "enterprise"` in that ruleset; the endpoint itself checks only that the request carries a valid session token. A free-plan user edits the cached ruleset so the rule reads `true`, and the export runs. The team wants the export to stop working for free-plan accounts, while keeping local evaluation for the UI (menu items, upsell banners). What should they change?
MCQ-14A service deploys blue-green. Eight pods of v1 (blue) and eight pods of v2 (green) sit behind one router, both talking to the same Postgres 15 database. The v2 migration dropped orders.legacy_status and added orders.status_code as NOT NULL with a default; v2 uses only status_code, and v1's queries were written against the older columns. Nine minutes after 100% of traffic moves to green, p99 on the order endpoint goes from 120 ms to 540 ms, so the operator flips all traffic back to blue. Within a minute, every blue order request returns 500. Which explanation fits?
MCQ-15`orders-api` runs 20 pods behind a Service. A rolling update with `maxUnavailable=0` and `maxSurge=1` takes about 9 minutes, and v1 and v2 pods serve traffic side by side for that whole window, both writing to the same Postgres `orders` table. The v2 release runs `ALTER TABLE orders DROP COLUMN legacy_ref;` as a pre-start step before the first v2 pod serves, and v1 code still inserts `(id, total_cents, legacy_ref)`. What happens to v1's inserts during the rollout?
MCQ-16On Postgres 15, release 42 of a payments API ships one migration and one code change together: the migration adds `email_address`, backfills all 8M rows, then drops `email`; the code reads and writes `email_address`. The rolling update runs across 40 pods. Twelve minutes in, 4% of requests fail on the new code path, and the on-call rolls back to release 41. What is the state of the service once the rollback completes?
MCQ-21checkout-service v42 ships with a migration that drops `orders.legacy_status` and backfills `orders.status_code` as NOT NULL; the migration finished on all 12 shards before the app rollout started. Ten minutes in, v42's error rate is 8% against a 0.2% baseline, traced to a retry loop v42 added behind the `retry_v2` flag. v41's code still selects `legacy_status`. What should the on-call do?
MCQ-20Service `checkout` runs v41 on 200 pods behind a feature flag. A v42 canary takes 5% of traffic; 20 minutes in, its 5xx rate is 4.2% against a 0.3% baseline. v42 also added a nullable `coupon_id` column (backfilled, never read by v41) and a new consumer group on the shared `orders` topic. The on-call engineer triggers abort. What should the abort do?
MCQ-22A progressive delivery controller manages two Rollouts, A and B, that both target the same Kubernetes Service 'web'. The Service selector initially points to stable pods (app=web). A promotion for A sets the Service selector to app=A and sets A's canary weight to 20. A promotion for B sets the Service selector to app=B and sets B's canary weight to 20. A's promotion request arrives first, then B's arrives 10 ms later. The controller serializes promotion by target Service: it processes one promotion to completion before starting the next. What is the final state of the Service selector and the Rollouts?
MCQ-23A canary rollout of checkout-service is aborted at 30% traffic after its error rate crosses the alert threshold. The controller reports success: traffic is confirmed back to 100% on the stable version, candidate replicas are scaled to zero, and the controller process exited 0. Ten minutes later the stable version's p99 is 180 ms against a 40 ms baseline, its 20-connection database pool is pinned at the limit, and the retry counter reads 3× baseline. What does this pattern show?
MCQ-25A checkout service is rolling out a change that adds a required field to the order-creation request and also alters the nightly reconciliation job. The canary runs at 5% of traffic for 40 minutes: 24,000 requests, 0 errors, p99 190 ms against a 185 ms baseline, all request-path guardrails green. The reconciliation job runs once at 02:00, processes the day's orders in one batch, and writes settlement records that cannot be regenerated without a manual replay. The canary window ended at 14:40. What does this result justify?
MCQ-24A payments platform is picking the single headline metric for its quarterly engineering scorecard. Last quarter the team with the highest deploy frequency also shipped the release that took checkout down for six hours, and its on-call pages doubled. Leadership wants a target that cannot be raised by shipping more often without improving outcomes. Which candidate is the poor choice for that target?