Index Instances
An Index can have multiple instances for:
- scalability/ load balancing
- cold standby/ backups
- migrations/ updates
- A/ B tests
Each of them can be configured separately. Currently, there are two instance types supported elastic_7, opensearch_1. The first instance will be created by default when a new index is created and is in state ACTIVE. More Instances can be added, but each of them receive the initial state ACTIVE_AFTER_REBUILD and create a index notification to inform the index about changes that will be applied after rebuild. The index instance automatically switch the state ACTIVE_AFTER_REBUILD to ACTIVE after successful index rebuild. If there are more than one instance configured, then one scheduling option round-robin, random, first can be selected. Otherwise, this option is disabled.
state/action | search | feed | index-rebuild |
---|---|---|---|
ACTIVE | ✅ | ✅ | ✅ |
STANDBY | ❌ | ✅ | ✅ |
ACTIVE_AFTER_REBUILD | ❌ | ❌ | ✅ |
INACTIVE | ❌ | ❌ | ✅ |
action | description |
---|---|
search | Search the index via search, suggest |
feed | Feed the index via full or delta updates, should not modify index mapping |
index-rebuild | Rebuild the index with full feed and latest mapping |
{
"loadbalancerStrategy": "round-robin (default), random, first",
"instances": [
{
"id": "node1",
"type": "elastic_7",
"state": "ACTIVE",
"endpoint": "https://aws.com/my-index"
},
{
"id": "node2",
"type": "elastic_7",
"state": "STANDBY",
"endpoint": "https://cloud.google.com/my-index"
},
{
"id": "node3",
"type": "opensearch_1",
"state": "ACTIVE_AFTER_REBUILD",
"endpoint": "https://localhost:9200/my-index"
}
]
}