# Preference local on a transport client

**URL:** <https://discuss.elastic.co/t/preference-local-on-a-transport-client/19934>\
**Category:** Elasticsearch\
**Created:** [September 24, 2014, 7:50am UTC](https://discuss.elastic.co/t/preference-local-on-a-transport-client/19934 "2014-09-24T07:50:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![x1a0](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/x1a0/32/1270_2.png) [@x1a0](https://discuss.elastic.co/u/x1a0)\
**Post date:** [September 24, 2014, 7:50am UTC](https://discuss.elastic.co/t/preference-local-on-a-transport-client/19934/1 "2014-09-24T07:50:50Z")

</div>

Hi,

I am using ES 1.3.2 and setup a cluster with 3 nodes, having about 350,000  
docs right now. (1 shard, 2 replicas)

In my service I create a transport node connecting to the cluster, and use  
Java API to search.

Then I benchmarked my service - each HTTP request to my service will  
trigger about 12 to 15 queries (sent with multi-search api).

- Without preference set to local, all requests get slow when  
concurrency goes high.
- With preference set to local, some of the requests are as fast as low  
concurrency under high concurrency, but some of them are super slow

So I want to know how does this config affect the performance in my setup  
(1 transport --\> 3 data nodes).  
Also I don't understand why some node can handle the queries very fast  
while the others are super slow... I thought in my setup every node should  
have complete data stored.

Thanks 🙂

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a1a233a5-9988-4ba5-9c5c-14d0b3fc3a2e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a1a233a5-9988-4ba5-9c5c-14d0b3fc3a2e%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:00am UTC](https://discuss.elastic.co/t/preference-local-on-a-transport-client/19934/2 "2017-07-06T01:00:19Z")

</div>


