During high traffic times, our Elasticsearch cluster is experiencing latency, and we are considering a resharding strategy to optimize performance. Below is our current index setup and the proposed resharding plan:
Current Indices:
billing-index-v0.0: 45 GB, 20 shards (over-sharded)
billing-index-v1.0: 197 GB, 20 shards (over-sharded)
billing-index-v2.0: 1.4 GB, 20 shards (over-sharded)
billing-index-v4.0: 947 GB, 20 shards (over-populated)
Proposed Resharding: (25 GB Aimed per shard)
billing-index-v0.1: 45 GB, 2 shards
billing-index-v1.1: 197 GB, 8 shards
billing-index-v2.1: 1.4 GB, 2 shards
billing-index-v4.1: 947 GB, 40 shards
Questions:
- Will the proposed resharding strategy help alleviate latency during high traffic times?
- Are there any potential drawbacks or considerations we should be aware of?
- Should we consider a different resharding approach based on our current setup?
Query patterns:
{
"size": 20,
"query": {
"bool": {
"filter": [
{
"bool": {
"filter": {
"term": {
"accountId": "9812374287423"
}
},
"must_not": {
"exists": {
"field": "linkedAccount"
}
}
}
}
],
"must_not": [
{
"term": {
"isDeleted": {
"value": true
}
}
}
],
"must": [
{
"multi_match": {
"query": "Kelly",
"fields": [
"firstName.autocomplete",
"lastName.autocomplete",
"fullName.autocomplete",
"emailId.autocomplete",
"phone.autocomplete",
"companyName.autocomplete",
"country.autocomplete",
"state.autocomplete",
"city.autocomplete",
"address.autocomplete"
]
}
}
]
}
},
"sort": [
{
"modifiedDate": {
"order": "desc"
}
}
]
}
Hardware specifications: 4 Nodes, 16 Core CPUs, 32 GB Memory.
Any help is much appreciated. Thanks in advance.