Coding for Infra: the practice test
Practical builds in Python, Go and C++: a GPU credit scheduler, a rate limiter, a versioned KV store, merging GPU idle intervals, a batching queue, retry with backoff, concurrency under load, parsing a kernel trace. The screens that test whether you can ship infra code in 45 minutes. This test drills exactly that: 10 easy, 10 medium and 10 hard questions, every one explained, every explanation linking into the worked material.
Sample questions, answered
Charging at submit makes failures unfair; charging at completion lets an account overcommit by submitting many jobs it cannot pay for. Reserving the cost at submit and settling at completion keeps the invariant balance ≥ reserved ≥ 0, so an account never runs jobs it cannot pay for even with many pending, and a failed job releases its reservation without charging. Stating that invariant after every change is what the interviewer is listening for.
A timer thread per key drifts and does not scale; wall-clock time jumps on NTP adjustments. Computing the refill from the monotonic time elapsed since the last request is O(1), thread-free and exact, and injecting the clock makes the class testable without sleeping. The bucket then allows a burst of capacity after idle and a sustained rate of tokens per second, and a denied request can be told exactly how long to wait: (n − tokens) ÷ rate.
Go deeper than the quiz
A practice test measures recall. The material it draws from teaches the reasoning:
