InterviewStack.io LogoInterviewStack.io

Concurrency & Asynchronous Performance Questions

Using parallelism, concurrency, and asynchronous execution to improve throughput and responsiveness. Covers thread pools, event loops, async/non-blocking I/O, contention and lock overhead, and the coordination costs that limit parallel speedup. Focuses on the performance implications of concurrency choices rather than concurrency correctness alone.

MediumTechnical
57 practiced
You own an async event ingestion service. Propose SLOs for availability, ingestion latency (e.g., p50/p95), and data loss, and define an error budget policy. Give concrete remediation steps engineers must take if the error budget is exhausted. Explain how queueing delays, retries, and overloaded consumers translate into SLO violations on downstream services.
MediumTechnical
47 practiced
Legacy services use nested asynchronous callbacks causing hard-to-maintain code and resource leaks. Explain structured concurrency concepts and how modern features (async/await, task groups in Python 3.11, StructuredTaskScope in Java) help. Provide a pragmatic plan to refactor a legacy callback-based service to structured concurrency to improve lifecycle management and error propagation.
MediumTechnical
60 practiced
You receive urgent alerts: a Node.js API's 95th percentile latency spiked and many requests are timing out. Process CPU is low, but event-loop lag (measured by event-loop-delay metric) is high. Describe a step-by-step incident-response plan: what metrics and traces you inspect, quick mitigations to restore service, and how to find the blocking code causing event-loop starvation.
MediumTechnical
56 practiced
In Go, implement a worker pool that processes jobs concurrently with a configurable maxWorkers and a bounded job queue of size N. Requirements: support context cancellation, graceful shutdown where in-flight jobs finish (or are cancelled by context), and expose metrics for queue length and active workers. Provide function signatures and outline how you'd test for race conditions and correct shutdown.
EasyTechnical
67 practiced
Explain the Node.js event loop phases and how timers, I/O callbacks, microtasks (process.nextTick and Promise callbacks), setImmediate, and the poll/check phases interact. Provide a short Node.js example showing output order for setTimeout(..., 0), setImmediate, process.nextTick, and a resolved Promise, and explain why the observed order occurs in Node 14+.

Unlock Full Question Bank

Get access to hundreds of Concurrency & Asynchronous Performance interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.