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

Add node and zonal antiaffinity to store gateway jsonnet #1730

Conversation

Bruno-DaSilva
Copy link
Contributor

@Bruno-DaSilva Bruno-DaSilva commented Apr 20, 2022

What this PR does

Currently the Store Gateway jsonnet does not specify any antiAffinity for the zonal or regular running modes. This means that multiple storegateways can be on the same node in regular mode, or the same zone in zonal replication mode. This is obviously not ideal in the event of a failure.

To match the antiAffinity logic of the Ingester service, this PR adds a storegateway_allow_multiple_replicas_on_same_node option to jsonnet. It has the following behaviour:

STOREGATEWAY, storegateway_allow_multiple_replicas_on_same_node=false:
regular: nodeAntiAffinity=true, zoneAntiAffinity=false
zonal: nodeAntiAffinity=false, zoneAntiAffinity=true

STOREGATEWAY, storegateway_allow_multiple_replicas_on_same_node=true:
regular: nodeAntiAffinity=false, zoneAntiAffinity=false
zonal: nodeAntiAffinity=false, zoneAntiAffinity=false

Notice with flag=true, existing behaviour is the same as prior to this change (no antiAffinity). With flag=false, it matches the Ingester's antiAffinity behaviour.

Which issue(s) this PR fixes or relates to

Fixes #1729

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@CLAassistant
Copy link

CLAassistant commented Apr 20, 2022

CLA assistant check
All committers have signed the CLA.

@Bruno-DaSilva Bruno-DaSilva force-pushed the bruno-dasilva/add-zonal-antiaffinity-to-store-gateway branch from bcfed38 to 9738a3d Compare April 20, 2022 14:21
@Bruno-DaSilva Bruno-DaSilva force-pushed the bruno-dasilva/add-zonal-antiaffinity-to-store-gateway branch from 8d2b224 to 9544368 Compare April 20, 2022 14:25
Copy link
Contributor

@56quarters 56quarters left a comment

Choose a reason for hiding this comment

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

A few small changes, otherwise this looks good. Thank you!

@Bruno-DaSilva
Copy link
Contributor Author

Do you guys prefer the changes squashed together or will you do that at merge?

@56quarters
Copy link
Contributor

Do you guys prefer the changes squashed together or will you do that at merge?

That'll happen at merge, it's fine to add multiple commits.

@56quarters 56quarters enabled auto-merge (squash) April 20, 2022 14:44
@56quarters 56quarters merged commit efff33b into grafana:main Apr 20, 2022
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.

Store gateway antiAffinity does not behave as expected
3 participants