Wednesday 30 December 2020

Async python smooth latency

I'm using grpc.aio.server and I stuck with problem that if I try to make load test on my service it will have some requests lagged for 10 seconds, but requests are similar, load is stable (200rps) and latency of almost requests is almost same. I'm ok with more high, but stable latency, I tried to google something like async task priority, in my mind it means that something wrong with priority of tasks which wait very long time, but they're finished or whole request task is waiting to start long time.

e.g 1000 requests were sent to gRPC service, they have the same logic to execute, the same db instance, the same query to this db, the same time to get results from db, etc, everything is the same. I see that e.g. 10th request latency is 10 seconds, but 13th request latency is 5 seconds. Also I can see in logs that db query have almost the same execution time.

Any suggestions? maybe I understand something wrong



from Async python smooth latency

No comments:

Post a Comment