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 distributor ring page #4938

Merged
merged 8 commits into from
Jan 3, 2022
Merged

Conversation

DylanGuedes
Copy link
Contributor

@DylanGuedes DylanGuedes commented Dec 15, 2021

What this PR does / why we need it:

  • Inside the distributor implementation, rename distributorsRing to distributorsLifecycler to avoid mislead
  • Add a ring instance to the distributor
  • Implement a /distributor/ring page, served by the new ring instance

Which issue(s) this PR fixes:
Fixes #4937

Special notes for your reviewer:

Checklist

  • Documentation added
  • Tests updated
  • Add an entry in the CHANGELOG.md about the changes.

@DylanGuedes DylanGuedes marked this pull request as ready for review December 15, 2021 22:17
<p>Not running with Global Rating Limit - ring not being used by the Distributor.</p>
</body>
</html>`
cortex_util.WriteHTMLResponse(w, noRingPage)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@DylanGuedes Can you please copy the WriteHTMLResponse to our loki's util package and use that instead?
Rationale is to avoid introducing anymore dependency from Cortex. Also we are trying to remove existing dependencies incrementally.

Particularly this PR tries to remove cortex/util package dependency completely.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, good catch! I just pushed a new commit fixing that, lmk what you think.

@cyriltovena
Copy link
Contributor

Need a lint on the new util.

docs/sources/api/_index.md Show resolved Hide resolved
- This new IngestionRateStrat is used internally to represent the chosen
  ingestion rate strategy, to avoid using plain strings.
As of now, the distributor only has a pointer to its lifecycler. Since
the ring HTTP handler isn't implemented for the lifecycler but it is
for the ruler, this extends the distributor by also holding a ring
instance.
@owen-d owen-d enabled auto-merge (squash) January 3, 2022 18:22
@owen-d owen-d merged commit 98ecfef into grafana:main Jan 3, 2022
DylanGuedes added a commit that referenced this pull request Jul 11, 2022
Removes the ring client from the distributor.
- It was originally added on PR #4938 because it was the only ring implementation with HTTPHandler support (used for the ring page). Now that DSKit has support for the other ring implementations (including the lifecycler) this isn't necessary anymore.
- It had an IgnoreUnhealthyInstancesReplicationStrategy attached to it, added by mistake
lxwzy pushed a commit to lxwzy/loki that referenced this pull request Nov 7, 2022
Removes the ring client from the distributor.
- It was originally added on PR grafana#4938 because it was the only ring implementation with HTTPHandler support (used for the ring page). Now that DSKit has support for the other ring implementations (including the lifecycler) this isn't necessary anymore.
- It had an IgnoreUnhealthyInstancesReplicationStrategy attached to it, added by mistake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a new ring status page for the distributor
5 participants