Fetch many URLs concurrently with a limit and retries
MediumConcept25 minSWEREMLEPro outline
The question
Write an async function that fetches a list of URLs with at most K requests in flight, retries failures up to 3 times with back-off, and returns results in the input order.
Talk through the design, then sketch the code.
What the interviewer is looking for
- Uses a semaphore or worker pool to bound concurrency
- Preserves input order
- Retries with back-off and a cap
- Handles timeouts and cancellation
- Knows the difference between async and threads
Your answer
Saved in this browser only. Nobody else sees it.
Why this question
Written by BlogLLM in the style of a publicly reported OpenAI question type: object-oriented design with iterators or abstract classes, and coroutine or concurrency problems.
Reported in: interviewing.io
Practice question written by BlogLLM based on publicly reported interview formats. Not an official OpenAI question.