Bulk requests are not parsed before they reach the destination node. They
are split by a stream separator character (the line feed) and so the
destination node can be found by merely looking at the bulk doc header,
without doc parsing.
The bulk action sorts the bulk items so all docs for a shard are sent with
one network transmission.
The difference between TransportClient and NodeClient regarding the hops is
true, but it will take enormous load and network latency to see an effect.
And there are other tradeoff factors. For example, if expensive code is run
at TransportClient machine to build the JSON docs, this takes CPU load from
the ES cluster because otherwise it would have to be performed at cluster
side. This CPU win has to be balanced against the slightly slower network
transmission.

Jörg




On Sat, Mar 29, 2014 at 11:21 PM, slushi <[email protected]> wrote:

> I have been running some performance tests with some bulk indexing
> requests. One thing that is puzzling me is that I see pretty similar
> latency/cluster CPU usage when using the node vs transport client (client
> is on same network, cluster of 4 nodes). I am not that familiar with the
> client code, but as far as I can tell, the bulk request tries to divide up
> the documents per shard and route them using multiple requests. I would
> think this would lower cluster CPU usage and latency as the documents would
> be sent to the right node immediately rather than a potential 2 hop
> operation when using the transport client? My reasoning is that on the
> initial client -> node request, may need to parse the request and then
> re-route the portion of requests that need to go to another node. Those
> re-routed requests would then need to be re-parsed.
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/f1e1448a-76d3-4e9d-bb3e-a5dff827e241%40googlegroups.com<https://groups.google.com/d/msgid/elasticsearch/f1e1448a-76d3-4e9d-bb3e-a5dff827e241%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAKdsXoG1uO9%2BiEqeCN2RkG6bgB2qUDtdWtTvc9aOcdOOQk2KnA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to