Intermediate interview questions in DevOps & Cloud, page 2
Multi-stage builds for compiled languages
Build in a stage with the full toolchain, then COPY --from only the artifact into a tiny final base, shrinking image size and attack surface.
Managing state across ephemeral instances
Keep instances stateless, externalize sessions to Redis, data to managed databases, files to object storage.

How do feature flags enable unfinished work in Trunk-Based Development?
Commit behind off flags; CI/CD deploys trunk continuously; flags gate exposure for gradual rollouts.
Structured vs unstructured logging: why it matters
Unstructured logs are free-text lines hard to parse; structured logs are machine-readable key-value or JSON records; structure enables reliable querying…
Debug a running container with the Docker CLI
Docker inspect for full state and config, docker logs -f to follow output live, docker exec -it <id> sh or bash for an interactive shell.
The instance metadata service explained
A local endpoint exposing instance identity, region, and temporary role credentials.
How do you safely merge a 50-commit stale branch with conflicts?
Assess relevance, merge main locally, validate via draft PR and tests, merge off-peak with rollback ready.
How does distributed tracing work?
Trace ID ties one request together, span IDs are individual operations, context propagates via headers.
What is a dangling image and how to prune it
A dangling image is an untagged layer (<none>:<none>) orphaned when a tag moves to a rebuilt image; list with docker images -f dangling=true, remove with docker image prune.
Black-box vs white-box monitoring for legacy apps
Black-box probes from outside, white-box reads internal state; start black-box for fast user-facing signal.

Your build times increased significantly. How do you investigate and optimize?
Tests methodical CI/CD bottleneck analysis and build optimization tactics. Strong answers baseline the timeline, isolate the slowest stage with metrics, then apply parallelism, caching, or dependency pruning.
Diagnosing high I/O wait on a database volume
Check IOPS and throughput against the volume limit, look for burst-credit exhaustion, then move to provisioned IOPS or a larger volume.
Explain dependency management and diamond conflicts in automated builds
Tests transitive dependency resolution and conflict strategies in build pipelines. Strong answers mention nearest-wins eviction, strict versioning, shading, or classloader isolation. Red flag: manual jar swaps or pinning without understanding ABI breakage.
Shared file system access across many VMs
Use a managed NFS service like EFS or Filestore; watch per-operation latency, throughput modes, and metadata-heavy small-file workloads.

Compare ephemeral container agents versus persistent build agents
Ephemeral agents ensure clean state but add cold-start latency; persistent agents speed builds via caching yet risk config drift.
Protecting object storage from accidental loss
Enable versioning, MFA delete or object lock, cross-region replication, and least-privilege policies.
How would you design a multi-arch build process and anticipate challenges?
Mention buildx or cross-compilation, split native and emulated builds, cache per-arch layers.
Docker Compose default networking
Compose creates one default user-defined bridge network for the project; all services join it and reach each other by service name via embedded DNS, isolated from other projects.
Object storage tiers and lifecycle automation
Tiers trade storage price for retrieval cost and latency; automate with lifecycle rules or intelligent tiering.
Diagnosing a healthy p50 but breaching p99
One percent of requests are slow, hurting power users and fan-out calls; investigate GC, locks, contention, cold caches, retries.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles