All quizzes
Free quiz · 20 questions in the bank

Uvicorn quiz

Test your Uvicorn knowledge with a free interactive quiz — 20 questions with answers and explanations. No signup needed to play.

Question 1/5Score 0

What is the purpose of the `lifespan` protocol that ASGI servers like Uvicorn support?

Questions in this quiz
  1. What is the purpose of the `lifespan` protocol that ASGI servers like Uvicorn support?
  2. What is the common pattern of running Uvicorn workers managed by Gunicorn (`gunicorn -k uvicorn.workers.UvicornWorker`)?
  3. What role does Python's `asyncio` play underneath Uvicorn's request handling?
  4. What does the `--workers` flag do when running Uvicorn directly (without a separate process manager like Gunicorn)?
  5. What is the key limitation of WSGI (used by servers like Gunicorn's default sync workers) that ASGI (and Uvicorn) was designed to address?
  6. Why might a production deployment run multiple Uvicorn worker processes rather than a single one?
  7. What does it mean that Uvicorn is described in its own documentation as a "server," not a full web framework?
  8. Why does FastAPI documentation commonly recommend running a FastAPI app with Uvicorn?
  9. Why might Uvicorn be described as "unopinionated" in terms of which Python web framework it serves?
  10. What is Hypercorn, and how does it relate to Uvicorn?
  11. Why is a single Uvicorn worker (using asyncio's cooperative concurrency) potentially problematic for a handler that performs a long, blocking, synchronous CPU-bound operation?
  12. What is a common command to run a FastAPI app in development using Uvicorn?
Gaps to close?
Read the curated Uvicorn notes — core concepts, patterns, interview prep.
Uvicorn notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web