title: Tuning gRPC thread pool
body: <p>I'm dealing with a legacy synchronous server that has operations running for upto a minute and exposes 3 ports to overcome this problem. There is &quot;light-requests&quot; port, &quot;heavy-but-important&quot; requests port and &quot;heavy&quot; port.</p>
  <p>They all expose the same service, but since they run on separate ports, they end up with dedicated thread pools.</p>
  <p>Now this approach is running into a problem with load balancing, as Envoy can't handle a single services exposing the same proto on 3 different ports.</p>
  <p>I'm trying to come up with a single threadpool configuration that would work (probably an extremely overprovisioned one), but I can't find any documentation on what the threadpool settings actually do.</p>
  <pre><code>NUM_CQS     
  Number of completion queues.
  
  MIN_POLLERS     
  Minimum number of polling threads.
  
  MAX_POLLERS     
  Maximum number of polling threads.
  
  CQ_TIMEOUT_MSEC     
  Completion queue timeout in milliseconds.
  </code></pre>