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

Implement distributed execution #139

Merged
merged 10 commits into from
Jan 11, 2023
Merged

Conversation

fpetkovski
Copy link
Collaborator

@fpetkovski fpetkovski commented Jan 3, 2023

This PR allows creating an instance of the engine capable of distributed execution.

The detailed proposal can be found here: thanos-io/thanos#6012.
Deduplication will be added as a follow up.

remote(http_requests_total),
remote(http_requests_total)
)
)`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering for this query, do we want to do distributed execution or not? To me this seems better to just execute locally without querying remote engines. Since we are querying raw series, remote engines are just stores in this case

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also thought about this, and the reason I thought it's beneficial to distribute the query is because PromQL is done over a limited number of steps. So by distributing the query we would "downsample" on the fly. When querying longer ranges, the number of samples going to the central querier will be much smaller than if we directly fetch chunks from storage.

For example, the resolution for a 30d query is 10368s. So we will remove a significant amount of samples because remote engines will sample the data.

Copy link
Contributor

@yeya24 yeya24 Jan 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But for remote engines, all the raw samples are queried into memory, right? The query time downsampling is only beneficial to the central querier. One step further I am wondering if it is better to just do this when retrieving series from stores. Like thanos-io/thanos#4857

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way it is currently implemented we would get the benefit of downsampling even if there is no function involved so it should be much better.

Copy link
Collaborator Author

@fpetkovski fpetkovski Jan 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But for remote engines, all the raw samples are queried into memory, right?

Yes, this is correct. However solving that at the storage level seems a bit more complicated and maybe something to tackle independently in the future. Maybe we could embed a VectorSelector operator in store components and use the same building blocks everywhere.

@fpetkovski
Copy link
Collaborator Author

Should we merge this and continue iterating on main? The newly added code should be unused, so it won't affect anyone using the engine.

Copy link
Member

@GiedriusS GiedriusS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@fpetkovski fpetkovski merged commit c293f65 into thanos-io:main Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants