Elasticsearch geo/site based replica


We would like to install a bigger graylog cluster, with 4 elasticsearch node, on 2 phisical different site.
I can set elasticsearch replica, but how can I provide the system will make the replica on different site?
(Of yourse I can set 3 replica, or at least 2, and in this case at least one will on different site, but if I set only 1 replica would be the best with an automatic “separation” instead set the location on every shard/index evertime)

  Site A            -            Site B
HostA HostB                    HostC HostD

(Jochen) #2

You can use Shard Allocation Filtering for this and tag your Elasticsearch nodes accordingly.


i have checked it, but as I see, I can only move indexes manually.
I tried to do more search, and I found this
Thanks, you showed me the way.

(system) #4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

(Jochen) #5


I have finnished my server installation, and the solution was:

 node.site: A
 cluster.routing.allocation.awareness.force.site.values: A,B
 cluster.routing.allocation.awareness.attributes: site

And the result:

curl -XGET http://IP:9200/_cat/shards
graylog_1 1 p STARTED 1735 242.1kb IP.220 HOST_b1
graylog_1 1 r STARTED 1735   242kb IP.216 HOST_a2
graylog_1 0 r STARTED 1813 250.5kb IP.221 HOST_b2
graylog_1 0 p STARTED 1813 250.6kb IP.215 HOST_a1
graylog_2 1 p STARTED 2804 412.3kb IP.215 HOST_a1
graylog_2 1 r STARTED 2804 406.1kb IP.220 HOST_b1
graylog_2 0 p STARTED 2833 393.3kb IP.221 HOST_b2
graylog_2 0 r STARTED 2833 393.3kb IP.216 HOST_a2