-
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: fanoutForward leads to holes on graphs #2841
Comments
@sepich Thanks for reporting this. It looks interesting. Normally when receivers reached the quorum with a replication factor of 3, that means at least 2 of the writes succeeded (which seems working when I have checked the table you have shared). Queriers should about the query to retrieve the data from all receivers simultaneously, so even if a single receiver has the result you should see something on the graphs. Could you please share your configuration for receivers and queries? |
Thanks for this. This is overall expected to see for a single receive instance. The key part is to have Querier connected with deduplication enabled for all available receive pods (: Can you double-check that this is the case? @sepich |
receivers: args:
- receive
- |
--objstore.config=type: GCS
config:
bucket: bucket
- --tsdb.path=/data
- --tsdb.retention=1d
- --tsdb.min-block-duration=30m # have to be >2x(prometheus side 15m), https://github.com/thanos-io/thanos/issues/2114
- --tsdb.max-block-duration=30m
- --label=replica="$(NAME)"
- --receive.local-endpoint=$(NAME).thanos-receive.monitoring.svc.cluster.local:10901
- --receive.hashrings-file=/cfg/hashrings.json
- --receive.replication-factor=3 hashrings.json [
{
"hashring": "soft-tenants",
"endpoints": [
"thanos-receive-0.thanos-receive.monitoring.svc.cluster.local:10901",
"thanos-receive-1.thanos-receive.monitoring.svc.cluster.local:10901",
"thanos-receive-2.thanos-receive.monitoring.svc.cluster.local:10901"
]
}
] query: args:
- query
- --query.auto-downsampling
- --query.partial-response
- --query.replica-label=replica
- --query.replica-label=tenant_id
- --store=dns+prometheus:10901
- --store=dns+thanos-store:10901
- --store=dns+thanos-receive:10901
- --store=dns+thanos-rule:10901 Name thanos-receive is ClusterIP=None type k8s service, so expands to 3 IPs of receive pods.
|
I've created docker-compose small setup so that you hopefully could reproduce the issue:
3x
If you pc is too powerfull, please add more Then login to Now you can change Yes the issue looks pretty minor here, but here is graph from Production, which has more load. At 22:45 i've changed |
@sepich I'm glad that it helped. Also awesome explanation with the detailed graphs, I really appreciated it. |
Thanos, Prometheus and Golang version used:
thanos, version 0.14.0-rc.0 (branch: HEAD, revision: 00e3c32)
build user: circleci@7a93ec389107
build date: 20200702-19:09:41
go version: go1.14.2
Object Storage Provider:
GCP
What happened:
We're using thanos
receive
in 2 tier mode. (1st tier receiving requests and forwards to 2nd tier, which actually store data)2nd tier are 3 replicas with
--receive.replication-factor=3
When switching
query
,store
andreceive
from v0.12.2 to v0.14.0-rc.0 we start to get holes on graphsScrape interval is 15s, holes start to appear on any
rate(metric[30s])
data. This only affects recent (1h) data. Ascompactor
merges block from 3receive
replicas - holes disappear (so -2h-1h data is fine on the same zoom).I believe #2621 is to blame.
The idea is great! But realisation seems to have an issue.
I'm talking about normal work mode, when all 3 replicas are available. I do see that
thanos_receive_forward_requests_total{result="error"}
is about 1/3 of all requests, and if i enable debug logs - i see eventsrequest failed, but not needed to achieve quorum
. And setting--receive-forward-timeout=60s
change nothing.Obviously
fanoutForward
current implementation leads to random holes in data on each pod:And then holes on graphs appear. Compactor is able to handle this, but it seems querier - does not.
What you expected to happen:
I very like the idea "try to write data to all replicas till timeout happen" as it could help in such issue:
context canceled
level=error ts=2020-07-03T20:53:53.881199029Z caller=handler.go:414 component=receive component=receive-handler msg="forwarding request" err="rpc error: code = Canceled desc = context canceled" endpoint=thanos-receive-0.thanos-receive.monitoring.svc.cluster.local:10901
no such host
error much faster and starts to process dataThe text was updated successfully, but these errors were encountered: