Skip to content

Prefer adaptive replica selection over awareness attribute based routing #760

@malpani

Description

@malpani

Is your feature request related to a problem? Please describe.

Search routing preference and decisions enable coordinators to decide which copy of a shard should be picked to serve the shard query. By default, if shard allocation awareness is configured (eg. zone awareness/rack awareness), the coordinator always prefers to route the shard query to a node with local awareness attributes.

This can also result in major skews - eg. an index with 2 replicas on a cluster with 2 zones --> ie. one zone has 2 copies of the shard (say a primary and replica) whereas other zone has single copy(replica). In such situations, assuming round robin coordination - the shard on zone with single copy will see double requests as compared to the other 2 copies

Further, Adaptive Replica Selection kicks in only when allocation awareness attributes is not set. This implies most production grade clusters dont reap the benefits of tail latency reduction from ARS.

Describe the solution you'd like
My proposal is to

  1. [Already present] Introduce a new cluster setting (es.search.ignore_awareness_attributes) that prefers ARS over shard allocation awareness attribute based routing
  2. Run some experiments with the setting toggled - the intuition here is ARS will be able to make a smarter decision than human inputs on locality
  3. If the experiments, look right turn this on by default

Metadata

Metadata

Assignees

Labels

enhancementEnhancement or improvement to existing feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions