Hi there, @sreecha actually produced a detailed document on this at https://github.com/grpc/grpc/blob/master/doc/epoll-polling-engine.md . I'd highly recommend it if you're interested in how gRPC C++ core's polling works.
Regards, Vijay On Thursday, February 8, 2018 at 2:07:06 AM UTC-8, Marios-Evaggelos Kogias wrote: > > Thank you very much for your reply Vijay. > So just to make it clear, any thread can call epoll and then do > network and application processing. Is there a way you allocate > connections per threads or all threads have all connections in their > epoll group and connections are protected by locks to avoid serving > the same connection in two threads at the same time? > > Thanks > > 2018-02-08 8:32 GMT+01:00 'Vijay Pai' via grpc.io <[email protected] > <javascript:>>: > > The gRPC C++ core (wrapped by APIs in C++, Python, etc) does not use > > dedicated threads for the network communication needs of RPCs; these are > > borrowed from applications or wrapped language implementations when they > > call into the library. There are a few dedicated threads for purposes > like > > timer management and DNS resolution, but not for actual RPC > communication. > > > > On Wednesday, February 7, 2018 at 2:25:42 AM UTC-8, [email protected] > > wrote: > >> > >> Thank you very much for the information on threading. I have a question > >> regarding network and application processing. > >> > >> Does gRPC have dedicated threads doing network processing and then > >> dispatch work to the thread pools, or net processing is multiplexed on > the > >> same threads that do application processing? > >> > >> Τη Πέμπτη, 28 Ιανουαρίου 2016 - 3:13:51 μ.μ. UTC+1, ο χρήστης > >> [email protected] έγραψε: > >>> > >>> What is the GRPC server threading model? For example, if I write a > GRPC > >>> C++ server, will GRPC automatically spawn multiple threads (or use an > >>> eventing model) to handle multiple simultaneous client requests? Are > there > >>> any configuration parameters I can modify that will impact the number > of > >>> supported simultaneous client connections? > >>> Also, are there any differences in the GRPC server threading model > used > >>> in a C++ server vs a Csharp server? > >>> > >>> Luke > > > > -- > > You received this message because you are subscribed to a topic in the > > Google Groups "grpc.io" group. > > To unsubscribe from this topic, visit > > https://groups.google.com/d/topic/grpc-io/Cul6fd7cOB0/unsubscribe. > > To unsubscribe from this group and all its topics, send an email to > > [email protected] <javascript:>. > > To post to this group, send email to [email protected] > <javascript:>. > > 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/a8be9c89-6984-4f21-ad0e-df896f6909d1%40googlegroups.com. > > > > > > For more options, visit https://groups.google.com/d/optout. > -- 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/020f05e7-08b2-4533-a9fa-edbbb3ca5473%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
