Skip to content

Commit

Permalink
config tweaking
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellblazer committed May 27, 2024
1 parent 6c7f414 commit 7326d62
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ public RouterImpl router(ServerConnectionCache.Builder cacheBuilder, Supplier<Li
}
ServerBuilder<?> serverBuilder = InProcessServerBuilder.forName(name)
.executor(Executors.newVirtualThreadPerTaskExecutor())
.scheduledExecutorService(
Executors.newScheduledThreadPool(100, Thread.ofVirtual()
.factory()))
.intercept(ConcurrencyLimitServerInterceptor.newBuilder(
limitsBuilder.build())
.statusSupplier(
Expand All @@ -102,6 +105,7 @@ private ManagedChannel connectTo(Member to) {
final var name = String.format(NAME_TEMPLATE, prefix, qb64(to.getId()));
final InProcessChannelBuilder builder = InProcessChannelBuilder.forName(name)
.executor(executor)
.offloadExecutor(executor)
.usePlaintext()
.intercept(clientInterceptor);
disableTrash(builder);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public MtlsClient(SocketAddress address, ClientAuth clientAuth, String alias, Cl
Limiter<GrpcClientRequestContext> limiter = new GrpcClientLimiterBuilder().blockOnLimit(false).build();
channel = NettyChannelBuilder.forAddress(address)
.executor(executor)
.offloadExecutor(executor)
.withOption(ChannelOption.TCP_NODELAY, true)
.sslContext(supplier.forClient(clientAuth, alias, validator, MtlsServer.TL_SV1_3))
.intercept(new ConcurrencyLimitClientInterceptor(limiter,
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,7 @@
<configuration>
<forkCount>${forks}</forkCount>
<reuseForks>true</reuseForks>
<argLine>-Djdk.tracePinnedThreads=full</argLine>
</configuration>
</plugin>
<plugin>
Expand Down

0 comments on commit 7326d62

Please sign in to comment.