Is FastAPI really fast ?
summary
Benchmarks compare FastAPI (async vs sync) to Flask, Django, Express and Go Gin using WRK and TechEmpower suites, run on Dockerized EC2 4 vCPU / 8 GB with 60s tests. Results show Gin often leads (e.g. ~498,192 reqs in JSON test) while FastAPI async under gunicorn+uvicorn or uvloop hits the ballpark (example: sync ~149k vs async ~379k requests in a GET test). Repo with CSV, WRK Lua scripts, and ORM-backed CRUD workloads proves real endpoints, not hello‑world, and shows where FastAPI wins and where it lags.
AI-written summary · about
chapters (25)
- 0:00Introduction to FastAPI
- 1:04Benchmarking frameworks overview
- 3:43TechEmpower benchmarking explained
- 7:39WRK benchmarking tool demo
- 8:45JSON serialization results
- 9:50Data updates benchmarking
- 10:36Real-world API workflow
- 11:41Custom benchmarking approach
- 13:52ORM and database setup
- 15:37Benchmarking environment details
- 16:20GET request performance results
- 17:25List product and delete results
- 18:07Post request performance results
- 18:50Final benchmarking verdict
- 19:54Uvloop performance boost
- 21:01Async vs sync API performance
- 21:45Development speed vs performance
- 23:33Pydantic and Rust serialization
- 24:19Automatic API documentation
- 25:20Django vs Flask vs FastAPI
- 26:49Choosing framework by use case
- 28:17Team expertise and deadlines
- 29:19Flask for lightweight needs
- 29:40Generative AI with FastAPI
- 30:00Final recommendations
