1

I have a finch endpoint that works fine when sequential calls are made.in case of concurrent requests, service latency is increasing in the proportion of the number of concurrent requests.I have two questions regarding this.

  1. Is blocking of thread causing latency problem?
  2. How many worker threads are present in finch?
  3. How to increase the number of worker threads?
  4. How will the system affect after changing default worker thread count?
Kumar Waghmode
  • 509
  • 2
  • 18

1 Answers1

1

Blocking a Finagle thread is never a good idea. Normally you get 2 * CPU cores threads in your thread-pool. You can try overriding it with the -Dcom.twitter.finagle.netty4.numWorkers=48 flag.

Before tweaking the thread pool, I'd recommend looking into FuturePools for means to offload your blocking code from a Finagle thread.

Vladimir Kostyukov
  • 2,492
  • 3
  • 21
  • 30
  • I am using future pool for blocking code.I think service is using worker thread for encoding and decoding. – Kumar Waghmode Nov 17 '17 at 05:49
  • 1
    Some of the calls remain in the queue even when there are no active calls in the system.This happens randomly.What could be the possible reason behind it? – Kumar Waghmode Nov 21 '17 at 06:28