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

[enhancement] querier : Add "query_memory_only" to make loki have option to rely only on memory availability like google monarch. #5093

Merged
merged 3 commits into from
Jan 20, 2022

Conversation

liguozhong
Copy link
Contributor

@liguozhong liguozhong commented Jan 11, 2022

What this PR does / why we need it:
Add "query_memory_only" to make loki have option to rely only on memory availability like google monarch.

1: momery + store mode
image
2: momery mode
image
Which issue(s) this PR fixes:
Fixes nil
Special notes for your reviewer:
image
<Monarch: Google’s Planet-Scale In-Memory
Time Series Database>
https://www.vldb.org/pvldb/vol13/p3181-adams.pdf
Why is important
Last week, due to the 1.5-hour unavailability of the s3 service in our area, the loki cluster operator by me was also completely unavailable for 1.5 hours, which had a very negative impact on my work。
In order to solve this problem, I checked After some information on how other companies solve this problem, I found that google's monarch has an in-memory mode that allows monitoring to be available when storage is unavailable. So I think this mode can help loki operators like me.

ref unavailable loki snapshot:
image

image

image

image

image

If there are similar option, when s3 is unavailable, I can adjust the querier to memory mode to downgrade the service of loki, wait for s3 to become available, and then restore to a fully available loki, so that the failure will not be too serious.
Hope similar failures don't happen to other loki operators like me.

…ion to rely only on memory availability like google monarch.
@liguozhong liguozhong requested a review from a team as a code owner January 11, 2022 05:49
@liguozhong
Copy link
Contributor Author

@dannykopping review pr please .
The availability of loki is my most important job, as operators, we really need this option.

@liguozhong
Copy link
Contributor Author

liguozhong commented Jan 13, 2022

Today s3 is unavailable again for 4 hours。

image
my colleague ping me
image

Copy link
Contributor

@sandeepsukhani sandeepsukhani left a comment

Choose a reason for hiding this comment

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

I like the idea. Just a minor suggestion on naming but other than that it LGTM.

pkg/querier/querier.go Outdated Show resolved Hide resolved
liguozhong and others added 2 commits January 14, 2022 17:34
Co-authored-by: Sandeep Sukhani <sandeep.d.sukhani@gmail.com>
…ion to rely only on memory availability like google monarch. grafana#5093
@liguozhong
Copy link
Contributor Author

I like the idea. Just a minor suggestion on naming but other than that it LGTM.

done,thanks

@liguozhong
Copy link
Contributor Author

@owen-d review pr please .
The availability of loki is my most important job, as operators, we really need this option.

Copy link
Contributor

@sandeepsukhani sandeepsukhani left a comment

Choose a reason for hiding this comment

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

LGTM

@sandeepsukhani sandeepsukhani merged commit 7fca88d into grafana:main Jan 20, 2022
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.

2 participants