knaxuslearn · build · ship

Roadmaps / Linux / Interview topics

Reference

Interview topics

Each question has the follow-up an interviewer might ask and what a Staff answer adds; each phase adds a design prompt with a timed outline. A good design answer names the budget, the failure that matters, the measurement and the rollback.

Phase 1

QuestionFollow-upStaff adds
What happens between pressing the power button and a login prompt?Where would you look if it hangs after the kernel starts?Which stage has a console and logs to read, and what you do on a remote host with no console
How do you make a service restart safely after a crash?What if it crashes on start every time?Start-limit settings, backoff, and an alert that fires before the restarts hide the failure
What is the difference between a process and a thread in Linux?What does clone do?Why a thread-heavy service needs TasksMax and a limit on file descriptors
What does a zombie process mean?How do you remove one?That the parent must call wait; fix the parent, not the zombie
How would you sandbox a service you do not trust?What are the limits of that sandbox?Name what the sandbox cannot stop (flaws inside the allowed set) and the cost in compatibility

Principal probe: which unit default would you change for every service on a fleet, and what would that break? A strong answer picks one (for example Restart= with a start limit), shows the measured effect on one service, and names the service it would hurt.

Design prompt (35 minutes): a host runs one service that must restart within 5 seconds and not lose data. Outline: failure cases (5 min), unit and sandbox (10), logging and alerts (10), what you measure and the rollback (10).

Phase 2

QuestionFollow-upStaff adds
The host is slow; what do you check first?What if load is high and CPU use is low?The USE method, PSI, and what each tool cannot see
How does the OOM killer choose a victim?How do you protect one process?Why oom_score_adj is a last resort and cgroup limits are the plan
What does a page cache hit rate tell you?When is drop_caches useful?Only for experiments; in production it hides the real working set
What is the difference between write and fsync?What does synchronous=FULL cost?The measured ratio and when losing the last second of data is acceptable
How would you stop a noisy neighbour on a shared host?What if two services must share a CPU?cpu.weight against cpu.max, and why a quota can raise tail latency

Principal probe: how would you set memory limits for services you have never measured? A strong answer observes in staging first, sets limits from the p99 working set with headroom, and alerts on oom_kill before enforcing.

Design prompt (35 minutes): twenty services share a 64 GB host and one leaks. Outline: limits and defaults (10), detection (10), what the owner sees (5), the policy and its cost (10).

Phase 3

QuestionFollow-upStaff adds
A request takes exactly 5 seconds sometimes; why?How do you prove it?The resolver timeout, a tcpdump showing the retry, and the fix with a number
How does a client run out of ports?Is raising the port range enough?Connection reuse and pooling are the real fix; the range only moves the limit
What does a default-drop firewall break?How do you roll out a change safely?A console fallback, a timed rollback, and a test from outside
What is a network namespace?How does a container use one?That a container is a set of namespaces and cgroups, not a different kernel
Why drop capabilities?Which would a web server need?Often none above port 1023; CAP_NET_BIND_SERVICE only for low ports

Principal probe: who owns the firewall policy when five teams share a host? A strong answer separates the host baseline (one owner, default drop) from per-service rules (each team, reviewed), with a tested rollback.

Design prompt (35 minutes): allow a new service to call one external API and nothing else. Outline: threat and failure cases (5 min), firewall and DNS (10), logging and alerts (10), rollout and rollback (10).

Phase 4

QuestionFollow-upStaff adds
How would you find why a process uses 100% CPU?What if it is in the kernel?perf record -g, kernel against user time, and what a flame graph hides
When do you use eBPF and when strace?What does each cost?strace slows the target heavily; eBPF has low overhead but needs kernel support and care
How do you upgrade a host with no downtime?What if the new kernel does not boot?A second instance or drain first, the old kernel entry as the way back
What is a good backup test?How often?A scheduled restore with a measured recovery time and recovery point
Walk through a postmortem you wrote.What changed afterwards?The measured outcome some months later, not only the actions

Principal probe: how do you show a committee that a standards change reduced incidents rather than moved them? A strong answer compares incident counts and time to restore before and after for the same services over a stated period, and names what else changed.

Design prompt (45 minutes): own the host standards for 300 Linux servers. Outline: what you standardise (10 min), limits and sandbox defaults (10), upgrade and rollback policy (10), how you measure that it works (10), what you leave to teams (5).