Backend Engineering
Concurrency
5 practice questions. Free questions open a full answer guide; the rest unlock with Pro.
- Under load, your service occasionally produces a wrong result — a counter that's off, a duplicate record — but it never reproduces in a single-threaded test. How do you reason about what's going wrong and fix it?
- A service that does one database query per request starts timing out under load, even though CPU and the database are barely utilized. You find requests piling up waiting for a connection from the pool. Walk me through what's likely happening and how you'd fix it.Go Pro
- A multithreaded request handler runs much slower than you'd expect when you scale it across many cores — throughput barely improves past a handful of threads, and profiling shows threads spending time waiting rather than computing. How do you diagnose and address contention like this?Go Pro
- What is a deadlock, and what's a practical way to prevent one when your code needs to hold more than one lock?Go Pro
- Your service runs on a single-threaded async runtime like Node.js or Python's asyncio. Under load every request gets slow at once — even the health check that does almost nothing — and CPU on the box is pegged. What's likely happening, and how do you fix it?Go Pro
Want questions matched to your role? Paste a job title, job description, or CV for a personalized set, or go Pro to unlock the full bank.