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

You run a real-time metrics stream that normally has ~1K consumers but suddenly spikes to 50K; producers continue sending but downstream consumers are slow. Describe immediate mitigations to avoid exhaustion and data loss, and long-term architecture changes (fanout, tiered caching, backpressure-aware proxies) to handle such consumer spikes while preserving data integrity.

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

Implement an asynchronous token-bucket rate limiter in Node.js with an async acquire() method that returns immediately if a token is available or waits until a token becomes available. Requirements: support burstSize and refillRate tokens/second, work correctly under high concurrency across many callers, and include a cancelable wait with timeout.

MediumTechnical
69 practiced

As an SRE, you need to choose between an async single-threaded model (e.g., Node.js, Python asyncio) and a multi-threaded model for a new high-throughput HTTP service. Describe the trade-offs in terms of latency, throughput, memory usage, CPU utilization, handling blocking syscalls, debugging complexity, and ecosystem maturity. What criteria would cause you to pick one model over the other?

EasyTechnical
51 practiced

Describe approaches to unit and integration testing for asynchronous server code across Node.js (async/await), Python asyncio, and Java CompletableFuture/Reactive. Include strategies to make tests deterministic, mocking timers and I/O, simulating backpressure, and reducing flakiness due to concurrency. Provide example test patterns for asserting ordering and timing behavior.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.