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

Improve shard allocation awareness documentation - part 2 #8339

Conversation

patelsmit32123
Copy link
Contributor

Description

Shard allocation awareness attributes documentation was lacking information regarding how the allocation actually functions and in what conditions the shard can remain unallocated.

Issues Resolved

Closes #[insert issue number]

Version

List the OpenSearch version to which this PR applies, e.g. 2.14, 2.12--2.14, or all.

Frontend features

If you're submitting documentation for an OpenSearch Dashboards feature, add a video that shows how a user will interact with the UI step by step. A voiceover is optional.

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged.

Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer.

When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). The doc reviewer will arrange for an editorial review.

@patelsmit32123
Copy link
Contributor Author

patelsmit32123 commented Sep 19, 2024

@Naarcha-AWS I wanted to suggest some more changes w.r.t to the last PR. Please take a look.

@patelsmit32123 patelsmit32123 force-pushed the improve-shard-allocation-awareness-docs-2 branch from 4f0b132 to 55495b0 Compare September 19, 2024 04:39
@patelsmit32123 patelsmit32123 force-pushed the improve-shard-allocation-awareness-docs-2 branch from 55495b0 to 74b2682 Compare September 19, 2024 04:45
@Naarcha-AWS Naarcha-AWS merged commit edc45b7 into opensearch-project:main Sep 19, 2024
6 checks passed
Copy link
Collaborator

@natebower natebower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Naarcha-AWS A few changes, please. Thanks!


Shard allocation awareness attempts to separate primary and replica shards across multiple zones because 2 shard copies cannot be placed on the same node. When only 1 zone is available, such as after a zone failure, OpenSearch allocates replica shards to the only remaining zone. For example, if your index has a total of 5 shard copies (1 primary and 4 replicas) and nodes in 3 distinct zones, then OpenSearch will perform the following to allocate all 5 shard copies:
OpenSearch, by default, allocates shard copies of a single shard across different nodes. When only 1 zone is available, such as after a zone failure, OpenSearch allocates replica shards to the only remaining zone i.e. it considers only available zones (attribute values) for calculating maximum allowed shard copies per zone.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
OpenSearch, by default, allocates shard copies of a single shard across different nodes. When only 1 zone is available, such as after a zone failure, OpenSearch allocates replica shards to the only remaining zone i.e. it considers only available zones (attribute values) for calculating maximum allowed shard copies per zone.
OpenSearch, by default, allocates shard copies of a single shard across different nodes. When only 1 zone is available, such as after a zone failure, OpenSearch allocates replica shards to the only remaining zone---it considers only available zones (attribute values) when calculating the maximum number of allowed shard copies per zone.


- Allocate fewer than 2 shards per zone, which will require at least 2 nodes in 2 zones.
- Allocate not more than 2 shards per zone, which will require at least 2 nodes in 2 zones.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Allocate not more than 2 shards per zone, which will require at least 2 nodes in 2 zones.
- Allocate no more than 2 shards per zone, which will require at least 2 nodes in 2 zones.

noahstaveley pushed a commit to noahstaveley/documentation-website that referenced this pull request Sep 23, 2024
…-project#8339)

* Improve shard allocation awareness documentation - part 2

Signed-off-by: Smit Patel <[email protected]>

* Apply suggestions from code review

Signed-off-by: Naarcha-AWS <[email protected]>

---------

Signed-off-by: Smit Patel <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: Smit Patel <[email protected]>
Co-authored-by: Naarcha-AWS <[email protected]>
Signed-off-by: Noah Staveley <[email protected]>
noahstaveley pushed a commit to noahstaveley/documentation-website that referenced this pull request Sep 23, 2024
…-project#8339)

* Improve shard allocation awareness documentation - part 2

Signed-off-by: Smit Patel <[email protected]>

* Apply suggestions from code review

Signed-off-by: Naarcha-AWS <[email protected]>

---------

Signed-off-by: Smit Patel <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Co-authored-by: Smit Patel <[email protected]>
Co-authored-by: Naarcha-AWS <[email protected]>
Signed-off-by: Noah Staveley <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants