Skip to content

Shard allocation awareness and search routing #43453

Closed
@jimczi

Description

@jimczi

Today when shard allocation awareness is activated we try to route searches to nodes that have any awareness attribute in common with the coordinating node. However the routing of these search can have a negative effect on the cluster for different reasons:

  • Users can overload a single zone if they don't route the search requests to nodes with different attributes.

  • Nodes are picked without checking the stats of the adaptive replica selection so an overloaded node will continue to receive the same amount of traffic even if we have evidence
    (service time) that it behaves poorly compared to other.

For these reasons I'd like to propose three options to enhance the situation:

  1. Completely decouple allocation awareness and search routing. We'd apply adaptive replica selection by default (or round robin if it is deactivated) even if nodes have allocation awareness attributes.

  2. Apply search routing based on allocation awareness attributes only if the adaptive replica selection is deactivated.

  3. Add an option in the search preference to reference the awareness attributes that should be used for routing.

1 might be a bit radical so I have a slight preference for 2 and 3 since users that relies on this feature could restore the current behavior by changing a cluster setting (2) or an option in their search requests (3). The benefit of all these options is that we'd use adaptive replica selection by default in all cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Search/SearchSearch-related issues that do not fall into other categories

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions