2

Is there any best practices about managing Netty resources (EventExecutorGroup) in a reactive Application having several client libraries which are using Netty?

Redis lettuce documentation states

A vast part of Client resources consists of thread pools (EventLoopGroups and a EventExecutorGroup) which build the infrastructure for the connection workers. In general, it is a good idea to reuse instances of ClientResources across multiple clients.

Spring documentation states that by default Client and Server shares their resources (Reactor Netty HTTP global resources)

Spring Boot defaults to Netty, because it is more widely used in the asynchronous, non-blocking space and lets a client and a server share resources.

And Postgresql R2DBC by default uses Reactor Netty TCP global resources (Not HTTP...)

Does it make sense to reuse this resources for Reactor Netty and redis Lettuce and other reactive clients?

Because if I have several reactive DB clients (Redis + R2DBC...) + (WebClient + Reactor Netty) each of them could create thread pool with Threads == number of processors.

Is not it wasteful?

Or is it better to keep them with their own resources?

Roman M.
  • 45
  • 1
  • 7
  • really nice question. It is sad that no one comment. We can find numerous tutorial teaching the basic setups and steps to get Webflux up and running but I miss a serious reasearch and some corporate case with real numbers. – Jim C Mar 12 '20 at 14:17

0 Answers0