Adolfo,

Still could not test how sockets relate to shards and why I automatically 
> get 10 established sockets when opening a client:
>
> node = builder.client(clientOnly).data(!clientOnly).local(local).node();
>
> client = node.client();
>
>
> on default ES configuration, and many many more sockets after (up to 200), 
> and how this number changes when increasing/decreasing number of shards, 
>
>
Of course, your application should create only one client and then let all 
threads within the application share that one client. Each client, 
especially the NodeClient, typically creates a thread pool behind it. It's 
a very heavy-weight object, so do not create more than one of them. But 
it's perfectly thread-safe and can (should) be used by as many threads in 
your application as desired.

Brian 

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/653b907c-38fe-4cfd-9cb9-1e7dcfae9c00%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to