Asynchronous and Event-Driven Programming Questions

The programming model of a single asynchronous runtime: callbacks, promises and futures, async/await, event loops and task/microtask scheduling (including microtask starvation and where rendering fits), reactive streams and back-pressure, and how ordering, cancellation, timeouts, retries and error propagation behave across JavaScript, Node.js, mobile coroutine or async runtimes, and a comparison with Python asyncio and Java futures. Includes the async mechanics of a data fetch such as parallel versus sequential requests, partial failure, stale or out-of-order responses, abort, debounced live search, single-flight token refresh, and bounded concurrency; wrapping callback APIs as promises, streaming work through async consumers, moving heavy work off the main thread and back, and diagnosing unhandled rejections, race conditions and leaked subscriptions. Excludes message-queue and pub/sub system design, server throughput and thread-pool tuning, per-language threading and memory models, rebuilding standard APIs from scratch, and fetch caching or state architecture.

MediumTechnical
56 practiced

Users report intermittent out-of-order updates in a production app that you cannot reproduce locally. How do you find out whether async responses are being applied out of order, what would you instrument and how do you keep the data volume sane, and how would you turn the finding into a reliable test?

EasyTechnical
84 practiced

A profile screen needs the user's data and their avatar. The avatar request can fail without breaking the screen: show a placeholder and still render the user data. Write the fetching code so both requests run at the same time and the failure of one does not discard the other.

EasyTechnical
52 practiced

A gallery page loads many images and thumbnails. When does it make sense to wait for every request, and when for only the first to answer? Give a concrete frontend case for each, and say what each approach does when one of the requests fails and what the user ends up seeing.

MediumTechnical
47 practiced

Write retryFetch(url, options, retries, backoffBaseMs) that retries only failures that are worth retrying, spaces attempts so many clients do not retry in lockstep, and stops a single hung attempt from blocking the rest. Explain which responses you would not retry and why.

HardTechnical
61 practiced

A large frontend codebase keeps producing intermittent unhandled promise rejection warnings and nobody can tell where they come from. What would you change in the code, the tooling and the review process so they stop appearing and any that remain are visible?

Unlock Full Question Bank

Get access to all 24 Asynchronous and Event-Driven Programming interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.