More in DevOps & Cloud — page 11
Debug a running container with the Docker CLI
WHAT IT TESTS: practical container debugging. OUTLINE: 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.
Multi-stage builds for compiled languages
WHAT IT TESTS: image slimming and build hygiene. OUTLINE: 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.
Optimize Dockerfile layer caching for npm install
WHAT IT TESTS: layer caching mechanics. OUTLINE: copying all source first invalidates the npm install layer on any code change; instead copy package.json and lockfile, run npm install, then copy the rest.
Dockerfile CMD versus ENTRYPOINT
WHAT IT TESTS: container startup behavior. OUTLINE: ENTRYPOINT sets the fixed executable; CMD sets default args or the default command; run-time args override CMD but append to ENTRYPOINT. Use together to make a fixed binary with overridable defaults.
Dockerfile COPY versus ADD
WHAT IT TESTS: Dockerfile clarity and best practice. OUTLINE: COPY just copies local files; ADD also auto-extracts local tarballs and can fetch remote URLs; prefer COPY for predictability, use ADD for local archive extraction.
Build, tag, and run a container with port mapping
WHAT IT TESTS: core build and run CLI fluency. OUTLINE: docker build -t my-app:1.0 . to build and tag; docker run -d -p 8080:80 my-app:1.0 to run detached with host:container port mapping. RED FLAG: reversing the port order or forgetting the build context dot.
Trace a container process's syscalls from the host
WHAT IT TESTS: understanding that containers are host processes. OUTLINE: find the host PID via docker inspect or ps, then strace -p that PID from the host, since the container shares the host kernel.
What is the OCI and why do its specs matter?
WHAT IT TESTS: knowledge of container standards. OUTLINE: OCI defines vendor-neutral specs for image format and runtime so any compliant tool interoperates; runc implements the runtime spec; this prevents lock-in.
What is a container vs a VM?
WHAT IT TESTS: understanding of OS-level virtualization. OUTLINE: containers share the host kernel and isolate via namespaces and cgroups; VMs run a full guest OS on a hypervisor; containers are lighter and faster.
Migrating a stateful monolith to the cloud
WHAT IT TESTS: pragmatic migration planning. OUTLINE: assess and inventory, pick a migration pattern like rehost or replatform, handle data migration and cutover, mitigate downtime and data-loss risk.
Diagnosing slow auto-scaled PaaS workloads
WHAT IT TESTS: layered debugging under load. OUTLINE: application metrics like request latency, throughput, and DB query time; infrastructure metrics like CPU, memory, and scaling lag. RED FLAG: jumping to add instances without isolating the real bottleneck.
Blue/green versus canary deployments
WHAT IT TESTS: deployment-strategy fluency. OUTLINE: blue/green flips all traffic between two full environments; canary shifts a small slice gradually while watching metrics. RED FLAG: confusing the two or ignoring cost, rollback, and observability trade-offs.
High availability versus fault tolerance
WHAT IT TESTS: grasp of resilience tiers. OUTLINE: HA minimizes downtime via redundancy and failover; fault tolerance survives failure with zero interruption. RED FLAG: treating them as synonyms or equating multi-AZ with true tolerance.
Difference between metrics and logs
WHAT IT TESTS: observability fundamentals. OUTLINE: metrics are aggregated numeric time series good for trends and alerting; logs are discrete timestamped event records good for detailed root-cause analysis.
Design a multi-tenant model serving platform
WHAT IT TESTS: multi-tenant ML serving design. OUTLINE: share infrastructure to cut cost while enforcing tenant data isolation, fair resource allocation against noisy neighbors, and per-tenant performance via quotas and autoscaling.
Event bus versus message queue for triggers
WHAT IT TESTS: messaging pattern selection. OUTLINE: a queue is point-to-point buffered work for one consumer group; an event bus routes and filters one event to many decoupled subscribers. Event bus wins when many independent services must react.
Optimize cost of a big-data analytics platform
WHAT IT TESTS: practical cloud cost optimization. OUTLINE: storage tiering and lifecycle plus compression and partitioning; compute via spot instances, right-sizing, and efficient file formats; query and pipeline optimization to scan less data.
Strangler Fig with serverless and an event bus
WHAT IT TESTS: applying incremental migration with serverless. OUTLINE: API Gateway acts as the routing facade, new features run as Lambda functions, an event bus decouples and fans out to new services, and traffic shifts feature by feature until the monolith…
Configure a Kubernetes Horizontal Pod Autoscaler
WHAT IT TESTS: Kubernetes autoscaling mechanics. OUTLINE: HPA adjusts replica count toward a target CPU metric, needs the metrics server and pod resource requests, and scales a deployment between min and max.
When to choose bare metal over a VM
WHAT IT TESTS: hardware-level trade-offs. OUTLINE: bare metal suits latency-sensitive or high-throughput workloads needing no hypervisor overhead, single-tenant isolation for compliance, or direct hardware and licensing access.