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

Don't query all ingesters #1447

Closed
rfratto opened this issue Dec 20, 2019 · 0 comments · Fixed by #1473
Closed

Don't query all ingesters #1447

rfratto opened this issue Dec 20, 2019 · 0 comments · Fixed by #1473
Labels
component/loki keepalive An issue or PR that will be kept alive and never marked as stale. type/enhancement Something existing could be improved

Comments

@rfratto
Copy link
Member

rfratto commented Dec 20, 2019

The Cortex querier, when querying ingesters, only waits for a response from #ingesters - (replicationFactor / 2) ingesters. Loki is currently waiting for a response from all ingesters.

Assuming a replication factor of 3 with 10 ingesters, we only need to wait for a response from 9 ingesters. This optimization can make some queries perform better: occasionally, a single ingester can take significantly longer to return a response.

This should be an easy thing to implement, see Cortex's pkg/ring.ReplicationSet.Do method, which provides the functionality mentioned above.

@rfratto rfratto added component/loki type/enhancement Something existing could be improved labels Dec 20, 2019
@cyriltovena cyriltovena added the keepalive An issue or PR that will be kept alive and never marked as stale. label Dec 21, 2019
rfratto added a commit to rfratto/loki that referenced this issue Jan 6, 2020
This commit uses replicationSet.Do for communicating with the ingesters
from the queriers. This mimicks the behavior of Cortex. An
extra_query_delay flag has been added to match the flag present in
Cortex's querier config.

Fixes grafana#1447.
rfratto added a commit that referenced this issue Jan 6, 2020
This commit uses ReplicationSet.Do for communicating with the ingesters
from the queriers. This mimics the behavior of Cortex. An
extra_query_delay flag has been added to match the flag present in
Cortex's querier config.

Fixes #1447.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/loki keepalive An issue or PR that will be kept alive and never marked as stale. type/enhancement Something existing could be improved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants