-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
receive: Support backfilling data through remote write (in case of origin got disconnected) #2114
Comments
What do you mean exactly by:
Thanos receive is already able to upload old data so S3. Each instance of Thanos receive in the hashring should use a different replica label. Thanos querier will correctly deduplicate data from this when querying, even when using aggregations likse This sounds like we are trying to solve a symptom of the actual issue in 1624. I would prefer to focus on fixing that so that everyone can use block durations of 2hrs and avoid anything like what you are seeing. What do you think? |
Sorry, I've meant such errors after thanos-receive is down for some time and than back on:
|
aha, ok so you mean something like:
I still think that this is really addressing a symptom rather than the root of the issue. I am not against investigating this avenue but I think it will be more valuable and solve more people's issues if we go to the root and prevent receive from OOMing while replaying the WAL. This way you can have longer block durations and as a result see fewer out of bounds errors. |
I think there is space for something like this in some shape or form in the prometheus remote write protocol. Essentially the protocol itself should have the ability to even if the backend was down for >2h be able to backfill data that has been flushed to a block from the head block/WAL. I probed some other Prometheus team members and it did seem like there were other parties that would be interested in such a thing. |
There are some caveats:
|
Thank you for such an important information!
|
|
This issue/PR has been automatically marked as stale because it has not had recent activity. Please comment on status otherwise the issue will be closed in a week. Thank you for your contributions. |
Wish this wasn't stale - this is useful to have. Prometheus attempts to write them, Receive should accept them? |
Still valid, and a big chunk of work to make it happen. Some idea presented already in the past to Prometheus and Cortex teams: Start second, separate WAL just for older series. |
Hello 👋 Looks like there was no activity on this issue for the last two months. |
Love to see the stale tag removed <3 |
Still valid! |
Hello 👋 Looks like there was no activity on this issue for the last two months. |
Valid |
Hello 👋 Looks like there was no activity on this issue for the last two months. |
Seems there's work being done upstream on prometheus for support here: https://github.com/grafana/mimir-prometheus/compare/out-of-order |
Hello 👋 Looks like there was no activity on this issue for the last two months. |
prometheus/prometheus#11075 Finally this is merged into Prometheus so probably we could give it a try. |
Since the OOO feature has been merged into main, I will close this issue. Feel free to reopen if you think it is not addressed. |
Thanos, Prometheus and Golang version used:
v0.10.1
Object Storage Provider:
AWS S3
What happened:
We use thanos-receive to get data from multiple locations.
Due to #1624 we have to use short
tsdb.block-duration=15m
. So, in case any issue happens and thanos-receive is down for >15m remote prometheuses are accumulating data. When connectivity to thanos-receive reestablishes, prometheuses start to send delayed data - which is great. But thanos-receive won't accept that as timestamp is in the past chunk. So, we're getting holes on graphs.What you expected to happen:
Thanos-receive is able to upload old data to S3.
Note that we cannot do both - upload to S3 from remote locations and also send to remote-write. Because thanos-compact cannot deduplicate such blobs. Which leads to
sum() = x2
etc.These remote prometheuses are running inside k8s on
emptyDir
. Switching to just thanos-sidecar (s3 upload) model would lead again to holes on graphs when prometheus pod is restarted. Because sidecar only uploads completed chunk, and we loose WAL inemptyDir
on restart. Another option is to use pvc, but this would bind prometheus to some AZ, as EBS are per-AZ entity. And single AZ could be down.That's why remote-write model looks so competitive for us.
How to reproduce it (as minimally and precisely as possible):
Shutdown working thanos-receive for >2h, then turn it back on. See that prometheuses uploads stale data, but thanos-receive reject it.
The text was updated successfully, but these errors were encountered: