Offload long-running tasks from web requests
WHAT IT TESTS: async background-job architecture. OUTLINE: enqueue the job to a queue, return immediately, process with separate workers, report status out of band. RED FLAG: doing the work in the request thread or fire-and-forget threads.
WHAT IT TESTS: decoupling slow work from the request cycle reliably. ANSWER OUTLINE: the web tier accepts the request, enqueues a job message onto a queue such as SQS, Pub/Sub, or a Celery broker, and immediately returns 202 with a status handle. Dedicated workers consume the queue, process the report, write the result to storage, and update status the client polls or is notified about. The queue gives durability, retries, and decoupled scaling. RED FLAG: blocking the request, or using in-process threads that vanish on restart.
Read the original → interview
- #message-queue
- #async
- #background-jobs
- #sqs
- #system-design
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.