Hello,

I am using grpc for a university research project.
My experiment setup is as follows: I have a synchronous server running on 
one machine. On another machine, I start a process that creates and 
launches multiple threads (say X threads) that act as clients, and make 
synchronous rpc calls to this synchronous server. The client threads are 
then in the blocked state, waiting for responses from the server.
I want to find out how each client thread gets woken up when the 
synchronous rpc call completes, and the response is returned to the client. 
Is it that grpc has its own underlying thread pool where threads are woken 
up at random until the correct thread is woken up, which then notifies the 
corresponding thread in the 'X' client threads that I've created?

I ask because I notice a strange behavior: As I go on increasing the number 
of client threads, the responses take longer and longer to return to each 
client. Using MM1 queuing theory, I eliminated queuing at the server as the 
reason: the actual response latencies are orders of magnitude greater than 
what is contributed by queuing. Also, upon looking at time stamps on the 
send request to server and receive response from server paths, I find that 
the receive response from server path is the culprit. 
This possibly implies that the client is not able to pick up the response 
exactly when the response is received, even though it was blocked waiting 
for this response. So, my hypothesis is that random threads are woken up, 
until the correct one is identified, which then waked up the client thread 
that I created.

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/7f3da43c-3ed0-42e0-8655-342ad79bf250%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to