Poor performance around percentil 85 and on #8708
Replies: 1 comment 5 replies
-
Not really, but what is "poor performance" in actual numbers? One potential issue is the way you are recording the elapsed time. This isn't necessarily the time it takes for the request to be fetched, as any other tasks blocking the event loop would stop the code from resuming and recording the end time. Not related to your problem, but I'll also suggest leveraging the framework's functionality, rather than using a singleton class. In aiohttp we'd recommend adding it to the app object on startup and then retrieving it with |
Beta Was this translation helpful? Give feedback.
-
Hey there!
We have a simple app using FastAPI that execute requests to another endpoint but we are seeing poor performance on percentiles P85, P90 and P99 running around 200/rps - we only see slow responses inside our code because same metrics on API Gateway is not possible to see the same latency problem.
Based on that, I was imagining that we are facing some problem on how we are using aiohttp and we did some refactoring in the code:
Our code is very simple:
Any idea how to debug aiohttp to identify what's is wrong with our code? Do you see any smell in this code?
Beta Was this translation helpful? Give feedback.
All reactions