FastAPI is a great, high performance web framework but far from perfect. This document is intended to provide some tips and ideas to get the most out of it
docker-compose build
app:
container_name: fastapi-performance-optimization
build:
context: app_files
dockerfile: Dockerfile
image: fastapi-performance-optimization:latest
cpus: 2
restart: always
ab -q -c 100 -n 1000 -T 'application/json' ...
git clone git@github.com:KissPeter/fastapi-performance-optimization.git
pip3 install -r test_files/requirements.txt
pytest -vv -rP test_files/