Module 11 Knowledge Check
5 questions. Pass mark 4 out of 5. Answer every question before checking the answer key below, then retry after reading the feedback.
1. A FastAPI background task is…
- A. durable and retried
- B. best-effort, in-process, and lost on restart
- C. run by a separate worker
- D. guaranteed to complete
2. An upload's size should be checked…
- A. after reading it
- B. while reading it
- C. from the Content-Length header only
- D. not at all
3. A blocking call inside async def under concurrency…
- A. is handled by the event loop
- B. serialises every request on that worker
- C. raises an error
- D. is automatically threaded
4. A streamed response gives up…
- A. memory efficiency
- B. the ability to fail with a 500 partway through
- C. the ability to set headers
- D. compression
5. Work that must happen exactly once belongs in…
- A. a background task
- B. a queue
- C. the response path
- D. a scheduler
---
Answer Key and Explanations
Check these only after attempting every question.
1. B - best-effort, in-process, and lost on restart
Use it only where losing the work is acceptable.
2. B - while reading it
Otherwise a gigabyte upload is already in memory when you refuse it.
3. B - serialises every request on that worker
Including requests to completely different endpoints.
4. B - the ability to fail with a 500 partway through
The status is sent before the body, so the client gets a truncated file with a 200.
5. B - a queue
A queue buys durability and retries; a background task offers neither.
Practical Check
Apply this module to your own work: complete the module activity for *Background Tasks, File Uploads and Async Boundaries*, then write one sentence naming what your result shows and one naming what it does not.
Strong Answer Pattern
A strong answer names the task, the evidence used, the check performed, and the remaining limitation. It avoids "proved", "guaranteed", or "always" unless the evidence genuinely supports it.
