I have a question regarding index.number_of_replicas setting in elasticsearch.yml. I'm using elastisearch 2.4. Let me explain the situation. I mirror the ES index from single (PROD) node into 3 nodes, which together form a 3 node cluster. To ensure resilience I configured each node via elasticsearch.yml to contain:
index.number_of_shards: 1
index.number_of_replicas: 2
The problem is after I start up the cluster, replicas are not being created.
index shard prirep state docs store ip node
searchables_c-03_production_cplace 0 p STARTED 87920 408mb 10.96.63.251 ES1
searchables_c-01_production_cplace 0 p STARTED 12498936 293.4gb 10.96.63.148 ES2
searchables_c-02_production_cplace 0 p STARTED 530056 4gb 10.96.63.248 ES3
How can I ensure replica creation is issued at startup?
When I use API, replicas are being created:
curl http://10.96.63.248:9200/_cat/shards?v
index shard prirep state docs store ip node
searchables_c-03_production_cplace 0 p STARTED 87920 408mb 10.96.63.251 ES1
searchables_c-03_production_cplace 0 r INITIALIZING 10.96.63.148 ES2
searchables_c-03_production_cplace 0 r INITIALIZING 10.96.63.248 ES3
searchables_c-01_production_cplace 0 r INITIALIZING 10.96.63.251 ES1
searchables_c-01_production_cplace 0 p STARTED 12498936 293.4gb 10.96.63.148 ES2
searchables_c-01_production_cplace 0 r INITIALIZING 10.96.63.248 ES3
searchables_c-02_production_cplace 0 r INITIALIZING 10.96.63.251 ES1
searchables_c-02_production_cplace 0 r INITIALIZING 10.96.63.148 ES2
searchables_c-02_production_cplace 0 p STARTED 530056 4gb 10.96.63.248 ES3