Follơw these steps to set up and run the Call_record API:
git clone https://github.com/minh132/call_record.git
Run the following command to build docker compose:
docker compose build
Run docker compose, execute command below and wait a few minutes to run testcase and start server:
docker compose up
Go to http://0.0.0.0:8888/docs
to test API
Gunicorn supports working as a process manager and allowing users to tell it which specific worker process class to use. Then Gunicorn would start one or more worker processes using that class. I use JMeter to test success rate when send many request with resource limit in docker-compose(2 core cpu and 2048m memory) . Result when use uvicorn, gunicorn and test with same config in JMeter, send 2500 request in 2 seconds and set timeout 2s:
Gunicorn
The result shows that using Gunicorn help error rate reduce from 84% to 39%