Hey there,
I'm using the Java TransportClient in my application and I've noticed that one instance of my application creates a lot of threads to communicate with Elasticsearch:
I noticed that it creates twice as much transport_client_boss threads as there are CPUs.
This is a problem as we are running many instances of the application of the same server to connect to the same Elasticsearch node. We'd like to limit the number of threads.
I achived this by setting "processors" manually when creating the TransportClient:
Settings internalSettings = Settings.builder().put(..)
.put("processors", 2)
.build();
TransportClient client = new PreBuiltTransportClient(internalSettings);
I did this based on this recommendation: https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-threadpool.html#processors
The question now is: Are there any side effects? Do I need to adjust other settings as well? I could not find any documentation about it.
Thanks,
Jul