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
53 practiced

An async API server goes from healthy to timing out on every endpoint within minutes of one downstream dependency slowing down, while CPU stays low. Which shared resources could be saturating, how would you tell which one it is, and how would you contain the blast radius next time?

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?

MediumTechnical
67 practiced

Tail-latency spikes in a Linux service line up with mutex contention. How would you find the hottest locks and critical sections in production, using tools such as perf, eBPF and flamegraphs, and which mitigations would you try first (sharding, batching, shrinking the critical section, thread-local state)?

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.

MediumTechnical
59 practiced

Your job runner executes two kinds of tasks: some saturate a core, others mostly wait on remote services. Leadership wants more throughput without breaking latency targets. How do you set concurrency for each kind, how do you know the settings are right, and how should the system adapt as load shifts?

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.