# Queries against replica twice as slow versus primary

**URL:** <https://discuss.elastic.co/t/queries-against-replica-twice-as-slow-versus-primary/11010>\
**Category:** Elasticsearch\
**Created:** [March 5, 2013, 3:41am UTC](https://discuss.elastic.co/t/queries-against-replica-twice-as-slow-versus-primary/11010 "2013-03-05T03:41:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tinou\_Bao](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tinou_bao/32/1736_2.png) [@Tinou\_Bao](https://discuss.elastic.co/u/Tinou_Bao)\
**Post date:** [March 5, 2013, 3:41am UTC](https://discuss.elastic.co/t/queries-against-replica-twice-as-slow-versus-primary/11010/1 "2013-03-05T03:41:17Z")

</div>

Hi,

I have a pretty basic setup: 2 physical servers, 1 data node on each  
(master on another server). I create an index w/ 1 shard, 1 replica. So one  
server is the primary and the other is the replica. Queries against the  
primary server might take 50ms. But the query against the replica will be  
100ms. Very consistent. It's happening in out QA and load environments.  
Seems like queries against the replica is always much slower. We're running  
0.19.12. Any ideas? Does the replica need to communicate w/ the primary  
during queries and this is the extra overhead? I thought the replica was  
pretty independent and had all the data it needed to respond to queries.

Thanks  
-T

--  
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:** ![otisg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otisg/32/492_2.png) [@otisg](https://discuss.elastic.co/u/otisg)\
**Post date:** [March 5, 2013, 3:30pm UTC](https://discuss.elastic.co/t/queries-against-replica-twice-as-slow-versus-primary/11010/2 "2013-03-05T15:30:12Z")

</div>

Hi Tinou Bao,

I don't think should be happening, no. I assume the hardware is identical?  
What do other ES and server metrics/stats look like? Any differences  
among them may hint at the source of the problem. See my signature if you  
don't have any ES-specific monitoring in place. What happens if you shut  
down the faster server?

## Otis

ELASTICSEARCH Performance Monitoring - [Sematext Monitoring | Infrastructure Monitoring Service](http://sematext.com/spm/index.html)

On Monday, March 4, 2013 10:41:17 PM UTC-5, Tinou Bao wrote:

> Hi,
> 
> I have a pretty basic setup: 2 physical servers, 1 data node on each  
> (master on another server). I create an index w/ 1 shard, 1 replica. So one  
> server is the primary and the other is the replica. Queries against the  
> primary server might take 50ms. But the query against the replica will be  
> 100ms. Very consistent. It's happening in out QA and load environments.  
> Seems like queries against the replica is always much slower. We're running  
> 0.19.12. Any ideas? Does the replica need to communicate w/ the primary  
> during queries and this is the extra overhead? I thought the replica was  
> pretty independent and had all the data it needed to respond to queries.
> 
> Thanks  
> -T

--  
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:48am UTC](https://discuss.elastic.co/t/queries-against-replica-twice-as-slow-versus-primary/11010/3 "2017-07-06T02:48:17Z")

</div>

Closed on July 6, 2017, 2:48am UTC


