Interview Q&A · questions with model answers
CI/CD & Deployment Interview Questions
Part of the study plan for: DevOps Engineer · Site Reliability Engineer (SRE) · QA Engineer / SDET
Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.
-
Most asked How do you run database migrations without downtime?
Use expand/contract: first make backward-compatible additive changes (add nullable columns or new tables), deploy code that writes to both/reads from new, backfill data in batches, switch reads, and…
-
Most asked How do you promote a single build artifact from development through staging to production?
Build the artifact once, tag it with the Git SHA, push it to a registry, then deploy that exact artifact to each environment. Never rebuild for staging or production — environment-specific…
-
How do you design for fast rollback?
Deploy immutable, versioned artifacts so rollback is redeploying the previous version; keep database changes backward compatible (expand/contract); use feature flags to disable features without…
-
How do you secure the software supply chain in CI/CD?
Pin dependencies with lockfiles and verify integrity, scan dependencies and images for vulnerabilities, pin CI actions to commit SHAs, use least-privilege pipeline tokens, sign artifacts and images…
-
How do you use build caching and dependency caching to speed up CI pipelines?
Cache dependencies (node_modules, pip packages, Go modules) between pipeline runs so they're downloaded once, not on every build. Cache build outputs (compiled artifacts, Docker layers) so only…
-
How do you speed up CI pipelines?
Cache dependencies and build layers, run jobs in parallel and shard tests, run only affected projects in monorepos, fail fast with cheap checks first, use larger or self-hosted runners for heavy…
-
What should you monitor during and after a deployment?
Error rates, latency percentiles, saturation (CPU, memory, pools), business metrics (signups, checkouts), logs for new error types, and comparisons between canary and baseline versions. Annotate…