Collection of APIs to explore how slow blocking operation impact APIs performance
Each API has two endpoints /delay and /other. The delay endpoint is very slow, simulating a slow IO call, blocking the process of the request. The other endpoint has no IO and should respond instantly.
We you use vegeta to put load in the /delay endpoint. When the /other endpoint is affected by such load, it means that we are generating cascading failures
Go to folder with
cd go-api
Run server with
go main.go
Stress /delay endpoint with
vegeta attack -targets=config.txt -rate=300/s -duration=200s | vegeta report
Ensure that /other endpoint is still working
http localhost:8000/other
Go to folder with
cd fast-api-async
Run server with
uvicorn main:app
Stress /delay endpoint with
vegeta attack -targets=config.txt -rate=300/s -duration=200s | vegeta report
Ensure that /other endpoint is still working
http localhost:8000/other
Go to folder with
cd fast-api-sync
Run server with
uvicorn main:app
Stress /delay endpoint with
vegeta attack -targets=config.txt -rate=300/s -duration=200s | vegeta report
Ensure that /other endpoint is still working
http localhost:8000/other