# Replication unnecessarily routing requests over other nodes + timeouts

**URL:** https://discuss.elastic.co/t/replication-unnecessarily-routing-requests-over-other-nodes-timeouts/13266
**Category:** Elasticsearch
**Created:** [August 20, 2013, 8:46am UTC](https://discuss.elastic.co/t/replication-unnecessarily-routing-requests-over-other-nodes-timeouts/13266 "2013-08-20T08:46:04Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Thomas\_S](https://avatars.discourse-cdn.com/v4/letter/t/a698b9/32.png) [@Thomas\_S](https://discuss.elastic.co/u/Thomas_S)
#### Post date: [August 20, 2013, 8:46am UTC](https://discuss.elastic.co/t/replication-unnecessarily-routing-requests-over-other-nodes-timeouts/13266/1 "2013-08-20T08:46:04Z")

</div>

Hey guys,

I have currently two nodes (let's assume they are in different data  
centers) on a cluster set up for replication (there are five shards but  
each of the nodes contains all the shards). I set the following settings on  
both nodes:

action.write\_consistency: one  
action.replication\_type: async

I want the second node to serve mainly as a backup and it shouldn't affect  
the first node if it goes down. I tried simple GET requests on the first  
node for documents stored in the index and found out that every second GET  
request takes longer because it is transmitted over the network even though  
both of the nodes contain all the data. Why? How can I change that behavior  
so that the data is always fetched from the node that is being queried  
(unless the data is sharded and not stored on that node, of course)?

Moreover, when I interrupt the connection between the two nodes and make  
GET requests to the first (master) node, every second GET request will take  
over a minute (I measured 1m25s even though  
[http://www.elasticsearch.org/guide/reference/api/index\_/](http://www.elasticsearch.org/guide/reference/api/index_/) says the default  
timeout is 1 minute and even if I add ?timeout=1s to the GET params) until  
Elasticsearch realizes that the other node is down. How can I lower this  
timeout to 5 seconds or less?

Thanks,  
Thomas

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:20am UTC](https://discuss.elastic.co/t/replication-unnecessarily-routing-requests-over-other-nodes-timeouts/13266/2 "2017-07-06T02:20:34Z")

</div>


