🔁 CI/CD, Linux and Nginx — interview questions

12 questions. Filter by what the role asks for; open one for the six layers of the answer. The course is where the answers come from.

12 of 12

01A team's pipeline runs integration tests (Testcontainers, several minutes) before unit tests and lint. A new engineer reorders it to lint, unit tests, build, then integration tests. What's the actual argument for that order, beyond "it's the convention"?Pipelineseasy0-2y02A team picks a rolling deployment for its API because "it's simpler." An incident review later asks why rollback took eleven minutes. What actually made it slow, and what would blue-green have done differently?Deployment strategieseasy0-2y03A Java service has been running fine for weeks and suddenly starts throwing `java.io.IOException: Too many open files` and refuses new connections, with no code deploy that day. What's actually happening, and where do you look first?Linuxmedium0-2y04A team's CI cache is keyed on the branch name to "make sure feature branches don't pollute main's cache." Builds are inconsistent — sometimes fast, sometimes a full reinstall, and occasionally a build succeeds locally but fails in CI with a dependency version mismatch. What's wrong with keying the cache that way?CI pipelinesmedium3-5y05A rolling deploy ships a migration that renames `users.email` to `users.email_address` in the same release as the code that reads the new name. Midway through the roll, requests start failing. Why, and what's the actual fix — not "don't rename columns," but the mechanism that makes a rename safe under a rolling deploy?Database migrationsmedium3-5y06A systemd unit's `ExecStart` runs `/bin/sh -c "java -jar app.jar"`. `systemctl stop` is issued, and the JVM keeps running past `TimeoutStopSec` until systemd kills it with `SIGKILL`. What actually happened to the `SIGTERM`, and why does `exec java -jar app.jar` fix it?Linux signalsmedium3-5y07nginx handles thousands of concurrent connections with a handful of worker processes — typically one per CPU core. Mechanically, how does one worker do that without one OS thread per connection, and why does a thread-per-connection server run out of resources before nginx does at the same connection count?nginxhard5-8y08A team wants to send exactly 5% of production traffic to a canary release and watch its error rate before widening. Someone proposes adding a second DNS record for the service's hostname pointing at the canary, expecting roughly 5% of lookups to resolve there. Why doesn't this hold anywhere near 5%, and what would actually work?Deployment strategieshard5-8y09A service's rate limiter reads `X-Forwarded-For` from every incoming request and blocks abusive IPs by that value. An attacker gets around it easily. What's the actual mistake, and what should the rate limiter read instead?nginxhard5-8y10During a traffic spike, users report a mix of errors: some requests get an instant failure, others hang for exactly 60 seconds before failing. The on-call engineer sees both 502s and 504s in the nginx access log at the same time. Walk through what's different about these two failure modes and where you'd look for each.nginxhard5-8y11A team's self-hosted CI runner executes untrusted pull-request builds directly on the host, sharing a filesystem and process table with every other concurrently running job, "because containers add overhead." What specifically goes wrong, and what do namespaces and cgroups actually provide that a shared host cannot?CI/CD infrastructuresenior8+y12A production incident: a Spring Boot service's shutdown hook hangs during a deploy, blocked forever on a socket read to a downstream service that never responds. `TimeoutStopSec=15` is configured. Walk through exactly what happens, mechanically, from `systemctl stop` to the process actually being gone — and explain why the JVM's shutdown-hook mechanism doesn't run your cleanup code directly inside the OS signal handler in the first place.Linux signalssenior8+y