-
Notifications
You must be signed in to change notification settings - Fork 832
Added proposal for ingester+querier migration from chunks to blocks and back. #2717
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
Added proposal for ingester+querier migration from chunks to blocks and back. #2717
Conversation
Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM. I left few nits.
Co-authored-by: Marco Pracucci <[email protected]> Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds super risky tbh, but I can't come up with better ideas.
- Ingesters using WAL don’t flush in-memory chunks to storage on shutdown. | ||
- Rollout should be as automated as possible. | ||
|
||
How do we handle ingesters with WAL? There are several possibilities, but the simplest option seems to be adding a new flag to ingesters to flush chunks on shutdown. This is trivial change to ingester, and allows us to do automated migration by: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or something simpler, just don't send any data for 30mins (idle-timeout) before shutting down :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wait, both the ingester deployments will share the same ring? That makes sense. Can we call out that we will be using the same statefulset and not going to create a new one for blocks?
We also have a shutdown endpoint on the chunks ingester which just flushes and shuts down.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also have a shutdown endpoint on the chunks ingester which just flushes and shuts down.
Yes we do, but I don't quite see how to use it for automation. On calling /shutdown, ingester flushes everything and stops. Kubernetes will just restart it. But we need restart with new configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it idles out, and doesn't stop iirc. @codesome ? But yes, I agree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gouthamve you are right. Kubernetes won't restart it. /shutdown endpoint will flush all the chunks and remove itself from the ring and stay idle.
So somethings that are missing here but would provide more context would be:
These are some concerns I see and we can iterate on the proposal again once these are addressed? |
I think it will look similar to migration from deployments to WAL. |
Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
I think it's actually bit easier, since we cannot transfer data from chunks ingesters to blocks ingesters, so they don't need to be scaled up and down in lock-step. But chunks ingesters must be reconfigured to avoid transfers. |
Signed-off-by: Peter Štibraný <[email protected]>
Schemas are low-level thing for configuring chunks store. We will not use schema for anything in this proposal. Querier needs single timestamp to decide whether to query chunks store or not. Blocks store can always be queried, because querier knows whether to hit any block based on block metadata. See my PR #2747 which implements this already. I've updated "Querying" section of the document to better explain this. |
Signed-off-by: Peter Štibraný <[email protected]>
@gouthamve I've updated the document with your feedback. Please take a look again when you have time. |
Let's merge! |
Signed-off-by: Marco Pracucci <[email protected]>
What this PR does: This is a proposal for adding some options for making switch of ingesters and querier between chunks and blocks possible.