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.

HardTechnical
58 practiced

A Java service runs short parallel computations alongside many small asynchronous tasks, and some of those tasks occasionally block on I/O. When would you choose a work-stealing pool over a plain fixed-size executor, and what goes wrong when blocking calls land on its threads? How would you contain it?

HardSystem Design
57 practiced

Build a Python worker system that consumes tasks from many sources with bounded queues so memory stays flat. Ordering must hold within a source while sources run in parallel. How do you reason about backpressure, fairness between sources, and recovery from worker failure?

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?

HardTechnical
57 practiced

An in-memory cache takes heavy write traffic and stops scaling beyond a few threads. Profiling shows threads mostly waiting on one lock. How would you restructure it to scale, and what does each option cost you?

HardSystem Design
68 practiced

A server-side image pipeline runs fetch, decode, ML detection, annotate and render stages. How would you schedule the stages across thread pools to maximize throughput while keeping latency low for interactive requests? Discuss pool sizing per stage, batch sizes, backpressure between stages, prioritizing urgent requests, and memory limits.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.