Can we have only replica shards in a zone


(Venkatamadhu Konagandla) #1

I have two datacenters, aus and sfo.

I have installed elasticsearch 1.7.5 version. and I want have all primary/replica(1) shards in aus and remaining replica shard(1) in sfo data center. Is it possible?

Ex: test is index with 10 primary shards and 10 replicas. I want have all primary shards in aus data center nodes and replica shards in sfo data center data nodes.


(Adrien Grand) #2

What is the expected benefit? Primaries and replicas perform the same work when it comes to indexing or searching.


(Christian Dahlqvist) #3

You can not control which node holds the primary or replica shards, and Elasticsearch will promote shards to primary status whenever needed. As Adrien points out, there is very little difference between primary and replica shards as they do the same amount of work.

Elasticsearch requires good latency and throughput between the nodes in the cluster, so deploying Elasticsearch across multiple datacenters is a bad idea and not supported. Queries are distributed across all nodes in the cluster, but in addition to possible performance issues due to this, it can also affect stability as you risk having a lot of data copied over between data centres as part of recovery whenever there are connection issues between the datacenters.


(system) #4