Skip to content

BlockingTaskExecutor Question #5423

@angela278

Description

@angela278

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions