QuizzesLong-Running Operations — Concept Check
intermediate
full-stack

Long-Running Operations — Concept Check

Questions on Long-Running Operations. Anything slower than a few seconds should not be an HTTP request. Accept the work, return an id, and report progress separately.

8 minutes 8 questions Pass at 70%
Time Limit
8 minutes - timer starts when you begin
Change Answers Freely
Revisit and change any answer before submitting
Full Review After Submit
Correct answers and explanations shown for every question
Auto-submit on timeout
Quiz submits automatically when time runs out

Questions in this quiz

8 questions on Long-Running Operations — Concept Check. Work through them here, then start the quiz to answer them and see your score.

  1. 1.A user submits a request to generate a report, but navigates away before completion. What should the system do?

    • ACancel the report generation
    • BContinue processing the report on the server
    • CRestart the report generation when the user returns
    • DPause the report generation until the user returns
  2. 2.Which method is best suited for a user interface that needs to show live progress updates?

    • APolling
    • BWebSockets
    • CServer-Sent Events (SSE)
    • DWebhooks
  3. 3.A long-running job fails after the worker dies mid-task. How should the system handle this?

    • ANotify the user to retry manually
    • BRetry the job automatically
    • CMark the job as failed permanently
    • DIgnore the failure and move on
  4. 4.What is a common mistake when handling long-running HTTP requests?

    • AProviding a status URL for job tracking
    • BReturning a 202 status with a job ID
    • CDoing the work directly in the HTTP request
    • DUsing a queue to manage tasks
  5. 5.How should a system inform a user about the completion of a long-running job if they have navigated away?

    • AAssume the user will check back manually
    • BWait for the user to return and refresh the page
    • CRely on browser notifications
    • DSend an email notification
  6. 6.Which of the following is NOT a suitable method for learning the outcome of a long-running job?

    • APolling
    • BWebhooks
    • CServer-Sent Events (SSE)
    • DDirect database queries from the client
  7. 7.Why is it important for jobs to be idempotent in a long-running operation system?

    • ATo reduce the number of requests to the server
    • BTo prevent jobs from completing too quickly
    • CTo ensure tasks can be retried without side effects
    • DTo allow users to cancel jobs at any time
  8. 8.What should a system do if a job remains in 'running' status for an unusually long time?

    • AAssume the job will complete eventually
    • BRestart the job automatically
    • CContinue polling indefinitely
    • DMark the job as failed and notify the user