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

[RW Separation] Enable auto-expand-replica for search replicas #17310

Open
vinaykpud opened this issue Feb 10, 2025 · 2 comments
Open

[RW Separation] Enable auto-expand-replica for search replicas #17310

vinaykpud opened this issue Feb 10, 2025 · 2 comments
Assignees
Labels
enhancement Enhancement or improvement to existing feature or request Search:Performance

Comments

@vinaykpud
Copy link
Contributor

vinaykpud commented Feb 10, 2025

The setting index.auto_expand_replicas determines whether the cluster should automatically adjust the number of replica shards for an index based on the current number of data nodes. More details on this can be found here

Requirement:

  • Search replicas should honor index.auto_expand_replicas settings on the index and it has to expand based on the number of search dedicated node

Earlier we decided to disable the auto_expand_replicas for search replicas, which is not applicable now.
#16912

Related component

Search:Performance

Describe alternatives you've considered

No response

Additional context

No response

@vinaykpud vinaykpud added enhancement Enhancement or improvement to existing feature or request untriaged labels Feb 10, 2025
@vinaykpud vinaykpud changed the title [RW Separation] Enable auto-expand-replica case with search replicas [RW Separation] Enable auto-expand-replica for search replicas Feb 10, 2025
@vinaykpud
Copy link
Contributor Author

This is related to Meta issue : #15306

@vinaykpud
Copy link
Contributor Author

vinaykpud commented Mar 10, 2025

Existing Behavior:

Auto-expand replicas can be enabled for an index using the setting:

index.auto_expand_replicas

The value of this setting defines the minimum and maximum number of replicas:

  • Example:
    • 0-3: The index will have a minimum of 0 replicas and a maximum of 3
    • 0-all: The index will have a minimum of 0 replicas and a maximum equal to (total data nodes - 1).
      • For example, in a cluster with 5 data nodes, an index with 1 primary will automatically scale up to 4 replicas as new nodes are added.

Changes with search replica:

  1. We will add new setting index.auto_expand_search_replicas
  2. Handling New Node Additions:
    • When a data node is added, a new regular replica will be added based on the index.auto_expand_replicas setting.
    • When a search node is added, a new search replica will also be added based on the index.auto_expand_search_replicas setting.

So essentially we will be using the same setting for both regular and search replicas.

  1. Handling Scale to Zero:
    • When scale-to-zero is enabled, the system should prevent the automatic expansion of regular replicas to avoid unnecessary resource allocation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request Search:Performance
Projects
Status: Todo
Status: 🆕 New
Development

No branches or pull requests

2 participants