Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search requests should prefer nodes within the same availability zone #60236

Open
jimczi opened this issue Jul 27, 2020 · 7 comments
Open

Search requests should prefer nodes within the same availability zone #60236

jimczi opened this issue Jul 27, 2020 · 7 comments
Labels
>enhancement :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team

Comments

@jimczi
Copy link
Contributor

jimczi commented Jul 27, 2020

In 7.x we deprecated search routing based on allocation awareness and decided to always use adaptive replica selection starting in 8. However this change may be an issue for some users due to cross-zone traffic costs. One way to solve this issue could be to add an opt-in option in 8 so that users can still use allocation awareness in search, but that doesn't work in all cases since search routing picks nodes that have at least one awareness attribute value in common.

So instead, we've decided to start a new discussion on how coordinating nodes could prefer nodes in the same "availability-zone". The first question we'd like to answer is whether this should be a hard requirement or should we allow cross-zone traffic if shards within the same availability zone are not ready to accept search requests ?

Depending on the answer we might also want to reduce the cross-zone traffic by splitting the request into multiple "availability-zone" search requests, each one being responsible to retrieve and merge the results coming from a single availability zone. That's something we already do for cross-cluster search in order to reduce the number of connections to the remote cluster but this is also just one possible optimization.

So the gist of this issue is to propose a better way to avoid cross-zone traffic in search that is not only based on user's conventions (based on random tags in the allocation awareness attributes).

@jimczi jimczi added >feature :Search/Search Search-related issues that do not fall into other categories labels Jul 27, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

@AyWa
Copy link

AyWa commented Sep 18, 2020

The first question we'd like to answer is whether this should be a hard requirement or should we allow cross-zone traffic if shards within the same availability zone are not ready to accept search requests ?

I can not talk for all the user of ES, but this my current use case. (read heavy cluster with huge spike of req between day and night -> so in fact we have a lot of shards replica during spike).

We will always prefer having a shard doing cross-zone traffic than failing the request (if the node in the AZ are all busy etc). However we just prefer for cost optimization to stay in the AZ.

The reason behind that is:

  • we do not control the client -> Sometimes client might be unbalanced between AZ
  • we do not control the ES cluster autoscaling 100% -> sometimes an AZ scale more than an other one

I hope the information are usefull ~

@andrassy
Copy link

andrassy commented Feb 15, 2022

Wondering what the status of this is now that 8.0 is GA? Is there a new mechanism to replace the previous default behaviour, or is the old behaviour still just deprecated rather than removed? 🙏

@dorony
Copy link

dorony commented Feb 4, 2024

Hi @jimczi, is there any update on this issue?

@tailnode
Copy link

also want this feature, our cross zone cost is high.

@tinder-igorsokolov
Copy link

the same here - after migration to the ECK/ES8 we observed eye-popping increase in the network cost.

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team
Projects
None yet
Development

No branches or pull requests

9 participants