Could you help to see this relevant this thread: grpc cpp async server mutlple threads (after reading relevant test files) https://groups.google.com/forum/#!topic/grpc-io/CC73-Dr4Ilc
On Wednesday, February 3, 2016 at 8:50:56 AM UTC+8, Craig Tiller wrote: > > Hey, > > Great question! > > The C++ server has two threading models available: sync and async. Most > users will want to use the sync model: the server will have an (internal) > threadpool that manages multiplexing requests onto some number of threads > (reusing threads between requests). The async model allows you to bring > your own threading model, but is a little trickier to use - in that mode > you request new calls when your server is ready for them, and block in > completion queues while there is no work to do. By arranging when you block > on the completion queues, and on which completion queues you make requests, > you can arrange a wide variety of threading models. > > We're working on exposing some knobs to control the behavior of the > synchronous thread pool. I expect to start seeing those changes hit the > codebase in the next 4-6 weeks, depending on where our priorities land. > > The C# server is similar to the synchronous mode of C++, mixed with C#'s > excellent async capabilities so that a request doesn't always take up a > thread if there's no processing on it. > > Hope this helps, > Craig > > On Thursday, January 28, 2016 at 6:13:51 AM UTC-8, [email protected] > wrote: >> >> 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 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/789c4bb0-811d-4593-81f1-7bec310fa877%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
