Concurrency & Asynchronous Performance Questions

How concurrency choices change throughput, latency and resource use in server-side software. Covers sizing and choosing thread pools and executors for CPU-bound versus I/O-bound work, including bounded queues, rejection policies and work-stealing pools, event-loop behavior and what blocks it, offloading blocking calls, the GIL and process-versus-thread trade-offs, connection and worker pool limits and exhaustion under a slow dependency, lock contention and how to find it (perf, eBPF, flamegraphs), lock sharding and striping, lock convoys, spinning versus blocking and backoff, head-of-line blocking, request coalescing so concurrent callers share one fetch, scheduling pipeline stages across pools, and the coordination costs that cap parallel speedup. Focuses on the performance consequences of concurrency design rather than the correctness theory of synchronization or any one language's API. Primitives and deadlock theory, per-language concurrency APIs, async syntax and promise semantics, message-driven system design, and database isolation are covered elsewhere.

MediumTechnical
48 practiced

A Node.js API's p99 latency spikes whenever one endpoint runs a roughly 200 ms synchronous computation, and every other request waits behind it. How do you confirm the event loop is the problem, and what are your options for fixing it?

EasyTechnical
49 practiced

How do you decide how many threads a server's worker pool should have? Compare a web service that mostly waits on downstream calls with one that spends its time resizing images, and say what you do about the queue in front of the pool when load exceeds capacity.

MediumTechnical
69 practiced

You are choosing a concurrency model for a new high-throughput HTTP service: an event loop per process or a thread per request. How do you decide? Think through latency, memory per connection, what happens when a handler blocks, and how failures show up in production.

EasyTechnical
100 practiced

When would you use processes instead of threads for a Python server? What does the GIL actually prevent, and what does going multi-process cost you?

MediumTechnical
69 practiced

You are moving a synchronous Python service to asyncio, but its database driver blocks. How can you keep the event loop responsive, and what does each way out cost you?

Unlock Full Question Bank

Get access to all 9 Concurrency & Asynchronous Performance interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.