-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Shards Series API. #3856
Shards Series API. #3856
Conversation
This PR introduces Series Queries Sharding. It does not check the boundaries of ingesters data since I'm assuming grafana#3852 will be merge first. Signed-off-by: Cyril Tovena <[email protected]>
Signed-off-by: Cyril Tovena <[email protected]>
requests := make([]queryrange.Request, 0, conf.RowShards) | ||
for i := 0; i < int(conf.RowShards); i++ { | ||
shardedRequest := *req | ||
shardedRequest.Shards = []string{astmapper.ShardAnnotation{ | ||
Shard: i, | ||
Of: int(conf.RowShards), | ||
}.String()} | ||
requests = append(requests, &shardedRequest) | ||
} | ||
requestResponses, err := queryrange.DoRequests(ctx, ss.next, requests, ss.limits) |
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 guess this is where some of the magic happens. Multiple requests are made. Are they going to the same endpoint? How are they load balanced? Also, how is the endpoint defined?
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.
These are dispatched from the query frontend to queriers according to the sharding factor. The queriers then will request from the store (and ingesters if necessary - determined by the time range of the request since ingesters hold recent data). Both the store and the ingesters now have the ability to discern and filter results down to a specified shard.
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.
Ok. How are the queries routed to the inhesters?
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.
frontend -> queriers -> ingester
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.
And if we have multiple queriers? Is the a load balancer?
This PR introduces Series Queries Sharding. It does not check the boundaries of ingesters data since I'm assuming
#3852 will be merge first.
Signed-off-by: Cyril Tovena [email protected]