FastAPI
困难
面试题库
FastAPI
简单
容器化部署 FastAPI 时 Dockerfile 与启动命令如何写?
FastAPI
困难
如何监控 FastAPI 应用的指标(Prometheus)与日志(结构化日志)?
FastAPI
中等
如何做优雅停机(graceful shutdown)?uvicorn 与 Gunicorn 分别如何处理?
FastAPI
困难
如何做水平扩展?无状态设计、会话外置与负载均衡如何配合?
FastAPI
中等
FastAPI 有哪些常用的性能优化手段(响应类、序列化、缓存)?
FastAPI
中等
什么是 ASGI 服务器与 ASGI 应用?uvicorn 如何把请求桥接给 FastAPI?
FastAPI
中等
如何配置 --workers、--loop(uvloop)与 --http(httptools)?
FastAPI
困难
为什么 Gunicorn + UvicornWorker 是常见组合?与纯 uvicorn 多进程有何区别?
FastAPI
中等
uvicorn 的 worker 数量如何确定?CPU 核数与 IO 密集如何权衡?
FastAPI
简单
生产环境为什么不能只用 uvicorn app:app --reload 直接跑?
FastAPI
中等