Recommended way of connecting to the cluster

The reference says that there are two ways of connecting to elasticsearch
as a client (considering Java here).

  1. Create client node (nodeBuilde with client=true)
  2. Create TransportClient with seed addresses.

What are the differences between these methods? When should I use one or
the other? Pros/cons.
The reference claims that option 1 is the most common, but is that really
true?
When I connect with the nodebuilder in client mode the client pops up in
the cluster view in elasticsearch-head. Is there an overhead if I have lots
of clients?

--

I found another topic that discussed the issue:
https://groups.google.com/forum/?fromgroups=#!searchin/elasticsearch/guice/elasticsearch/TihFMAJjTR4/k5Wquq6JkS0J

But I couldn't find any conclusions.

On Thursday, November 29, 2012 1:06:03 PM UTC+1, Henrik Nordvik wrote:

The reference says that there are two ways of connecting to elasticsearch
as a client (considering Java here).

  1. Create client node (nodeBuilde with client=true)
  2. Create TransportClient with seed addresses.

What are the differences between these methods? When should I use one or
the other? Pros/cons.
The reference claims that option 1 is the most common, but is that really
true?
When I connect with the nodebuilder in client mode the client pops up in
the cluster view in elasticsearch-head. Is there an overhead if I have lots
of clients?

--

IMHO, using TransportClient has less overhead as the cluster doesn't have to
detect when the node quit or join the cluster.
NodeClient is using a little more threads.

That said, NodeClient automaticaly manage everything for you. With the transport
client, you have to define some adresses (so autodiscovering is not available).

From my past project, I started with a NodeClient and finally used after some
months the TransportClient. The only main reason is that I didn't want to see
stack traces in elasticsearch logs when my JVM client is killed (as the node is
removed hardly).

I'm not sure that you can really see any overhead when using NodeClient as this
overhead is IMHO very tiny.

My 2 cents

Le 29 novembre 2012 à 15:59, Henrik Nordvik henrikno@gmail.com a écrit :

I found another topic that discussed the issue:

Redirecting to Google Groups

But I couldn't find any conclusions.

On Thursday, November 29, 2012 1:06:03 PM UTC+1, Henrik Nordvik wrote:

The reference says that there are two ways of connecting to
elasticsearch as a client (considering Java here).

  1. Create client node (nodeBuilde with client=true)
  2. Create TransportClient with seed addresses.

What are the differences between these methods? When should I use one or
the other? Pros/cons.
The reference claims that option 1 is the most common, but is that really
true?
When I connect with the nodebuilder in client mode the client pops up in
the cluster view in elasticsearch-head. Is there an overhead if I have lots
of clients?

--

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--