elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.62k stars 24.64k forks source link

Support adaptive replica selection and preference #89453

Open CAFxX opened 2 years ago

CAFxX commented 2 years ago

Description

Currently if the preference is set during a search operation it disables adaptive replica selection for that query. This is understandable, as the two mechanisms are different and conflicting approaches for replica selection.

In some cases it would be ideal though if there was a hybrid schema that allowed to reap the benefit of both, and specifically improving caching hit ratios (by using a custom string preference to steer similar requests to the same nodes) while avoiding hotspots (by using adaptive replica selection to spread the load only in case it becomes excessive on any individual node).

The ideal solution would steer requests for the same preference string to the minimum number of replicas required to prevent any individual node from becoming overloaded.

So e.g.

elasticsearchmachine commented 2 years ago

Pinging @elastic/es-distributed (Team:Distributed)