I’m using call_async to issue multiple parallel RPC calls into a nameko RPC service from a client. I was gathering some timing data around how long it takes to complete the task (I wanted to compare a serial request vs a parallel and see how it affected the system).
I noticed that serially, each call takes about 30ms. When run with call_async, each call to call_async takes about 20ms. Except sometimes (usually the first 2 calls in parallel) it will take under 2ms to complete the call_async. This is reliably reproduced; it seems if there is a barrage of requests, the first few are fast returning, the rest are delayed. Waiting a bit seems to reset something and again the next barrage of requests the first few are quick returning and the rest are delayed.
The overall time to complete the task serially is 14s and in parallel about 10s. So there is an improvement, but I was expecting more (I’m making about 400 calls total). The service is configured to run 10 workers.
Why does call_async take 20ms to complete? Does it wait for a rabbit ack before returning? Am I just setting my expectations too high?
What’s going on with the first few calls being 2ms? That’s what I was expecting all the calls to be, around that kind of performance. Feels like a configuration issue, but I’m not really sure what the issue would be.
Any insights would be really helpful and appreciated. Thanks!