Hi, we're currently using ServerBuilder and adding gRPC services to it like so:
builder
.meterRegistry(meterRegistry)
.serviceUnder("/docs", new DocService())
.serviceUnder("/", tomcatService)
.service(
GrpcService.builder()
.addServices(bindableServices)
.useClientTimeoutHeader(false)
.build());
We'd like to add to a blocking task executor, and were wondering what the difference between adding it to the ServerBuilder builder.blockingTaskExecutor(numThreads) versus adding it to the GrpcService builder GrpcService.builder.useBlockingTaskExecutor(true) would be. How would adding it to the ServerBuilder affect the blocking in the TomcatService?
Also where does the NUM_COMMON_BLOCKING_TASK_THREADS flag get factored in? Does the numThreads passed in builder.blockingTaskExecutor(numThreads) override it?
Finally, we noticed that the blocking task executor is by default unbounded. Is there a way for us the make it bounded, and reject requests after a certain limit?
Thank you!
Hi, we're currently using ServerBuilder and adding gRPC services to it like so:
We'd like to add to a blocking task executor, and were wondering what the difference between adding it to the ServerBuilder
builder.blockingTaskExecutor(numThreads)versus adding it to the GrpcService builderGrpcService.builder.useBlockingTaskExecutor(true)would be. How would adding it to the ServerBuilder affect the blocking in the TomcatService?Also where does the
NUM_COMMON_BLOCKING_TASK_THREADSflag get factored in? Does the numThreads passed inbuilder.blockingTaskExecutor(numThreads)override it?Finally, we noticed that the blocking task executor is by default unbounded. Is there a way for us the make it bounded, and reject requests after a certain limit?
Thank you!