I am using a 2 node cluster both are master and data.
ES version : 2.3.3
Whenever I pushed data from logstash to cluster with a new index name its creating 5 shards (Default) and 5 replicas. But its creating 2 shards primary & 3 replica in one server and 3 primary & 2 replica in one server. But I want to maintain all primary in one server & all replica in another one. How to do this??? Is this the best way to maintain in different servers???
What I have to do if I want to remove my replica server from my cluster.
I am chaging
cluster.routing.allocationbut its not becoming primary(which are showing as replica now). What to do in this case..
There is no such thing as a replica server in ES. The data is spread across all nodes as evenly as possible.
If you remove a server, any primary shards on the server that is no longer there will be replicated on the other server, so ES will see that and handle it appropriately.