Benefits of using client=true over just data=false

Hi,

I've read about some "optimizations" in using a Client node as opposed to
just using a non-data node. What are they exactly?

Some of my nodes are just "data shovelers" or web UIs which use the Java
API to connect to the cluster and issue operations against it.

In particular, I'm interested in using a non-data node for them, but
piggyback on the Stats endpoint (to get mem/FS/JVM stats) which doesn't
seem to be available when the node is defined as client=true.

Thanks,

Itamar.

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Itamar Syn-Hershko wrote:

In particular, I'm interested in using a non-data node for them,
but piggyback on the Stats endpoint (to get mem/FS/JVM stats) which
doesn't seem to be available when the node is defined as
client=true.

A client node is a first-class citizen in every sense other than 1)
it doesn't store data, which means that it will never be routed an
index or search request, and 2) it won't be elected master. It keeps
cluster state and can answer any question about the other nodes that
you would ask a data node.

If a client node can't reach any data node, requests sent to that
client node may not do what you expect. Cluster state will block,
for example. However, stats should still work. Which endpoint are
you hitting?

-Drew

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

So how is it different from simply setting data=false?

I'm using this using the Java API:

NodesStatsResponse nodesStatsResponse =
client.admin().cluster().prepareNodesStats().all().execute().actionGet();

(where client was initialized with
nodeBuilder().client(true).node().client())

And always getting the FS, JVM and memory data structures completely empty.

On Tue, Feb 26, 2013 at 4:31 PM, Drew Raines aaraines@gmail.com wrote:

Itamar Syn-Hershko wrote:

In particular, I'm interested in using a non-data node for them,
but piggyback on the Stats endpoint (to get mem/FS/JVM stats) which
doesn't seem to be available when the node is defined as
client=true.

A client node is a first-class citizen in every sense other than 1)
it doesn't store data, which means that it will never be routed an
index or search request, and 2) it won't be elected master. It keeps
cluster state and can answer any question about the other nodes that
you would ask a data node.

If a client node can't reach any data node, requests sent to that
client node may not do what you expect. Cluster state will block,
for example. However, stats should still work. Which endpoint are
you hitting?

-Drew

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

I just confirmed this is also the case for non-data nodes - the node stats
will not provide full JVM / FS / OS stats for it.

Furthermore, if a data node hasn't been searched on, the getOs().getMem()
in the NodesStatsResponse for that node will be null. It appears as if an
actual search request has to be issued against a node for that to be
populated.

Is any of this by design, or is a bug?

Either way, I'd really like to be able to piggyback on this functionality
for monitoring also non-data nodes, if requested explicitly

On Tue, Feb 26, 2013 at 4:37 PM, Itamar Syn-Hershko itamar@code972.comwrote:

So how is it different from simply setting data=false?

I'm using this using the Java API:

NodesStatsResponse nodesStatsResponse =
client.admin().cluster().prepareNodesStats().all().execute().actionGet();

(where client was initialized with
nodeBuilder().client(true).node().client())

And always getting the FS, JVM and memory data structures completely empty.

On Tue, Feb 26, 2013 at 4:31 PM, Drew Raines aaraines@gmail.com wrote:

Itamar Syn-Hershko wrote:

In particular, I'm interested in using a non-data node for them,
but piggyback on the Stats endpoint (to get mem/FS/JVM stats) which
doesn't seem to be available when the node is defined as
client=true.

A client node is a first-class citizen in every sense other than 1)
it doesn't store data, which means that it will never be routed an
index or search request, and 2) it won't be elected master. It keeps
cluster state and can answer any question about the other nodes that
you would ask a data node.

If a client node can't reach any data node, requests sent to that
client node may not do what you expect. Cluster state will block,
for example. However, stats should still work. Which endpoint are
you hitting?

-Drew

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Itamar Syn-Hershko wrote:

I just confirmed this is also the case for non-data nodes - the
node stats will not provide full JVM / FS / OS stats for it.

Furthermore, if a data node hasn't been searched on, the
getOs().getMem() in the NodesStatsResponse for that node will be
null. It appears as if an actual search request has to be issued
against a node for that to be populated.

Is any of this by design, or is a bug?

I can reproduce on master, and it does seems like a bug to me.
Please file an issue and we'll take a look.

-Drew

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

I took the liberty of reporting both as issues


I'll be happy to investigate and fix both myself, however as I have too
many pending PRs on this project I'd rather not do that before I'm sure
they'll be processed...

On Wed, Feb 27, 2013 at 6:16 PM, Drew Raines aaraines@gmail.com wrote:

Itamar Syn-Hershko wrote:

I just confirmed this is also the case for non-data nodes - the
node stats will not provide full JVM / FS / OS stats for it.

Furthermore, if a data node hasn't been searched on, the
getOs().getMem() in the NodesStatsResponse for that node will be
null. It appears as if an actual search request has to be issued
against a node for that to be populated.

Is any of this by design, or is a bug?

I can reproduce on master, and it does seems like a bug to me.
Please file an issue and we'll take a look.

-Drew

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Itamar Syn-Hershko wrote:

I took the liberty of reporting both as issues

https://github.com/elasticsearch/elasticsearch/issues/2703
https://github.com/elasticsearch/elasticsearch/issues/2704

Thanks! Followed up on the second ticket.

-Drew

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.