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

Add initial support for delta xDS #882

Merged
merged 21 commits into from
Dec 14, 2023
Merged

Add initial support for delta xDS #882

merged 21 commits into from
Dec 14, 2023

Conversation

Jake-Shadle
Copy link
Collaborator

This adds initial support for delta xDS to the proxy, relay, and agent. Both the client and server side keep track of the resource versions (only for the clustermap, the listener/filter chain doesn't do anything different from the state of the world xDS streams since there's only ever 1 and is small) that it currently has, so that reconnections to a new server on the client side can send what clustermap versions it currently has to avoid getting duplicate data sent on initial connection, and update to the clustermap on the server side will only ever send the localities the client side doesn't have up to date versions of, instead of all of them.

The version info is currently tracked in two ways, 1 is a simple incrementing integer in each locality that is only used by Watch to detect if changes occur, but the other one is a full 64-bit hash of every endpoint address and the quilkin.dev/token set in the locality. This is currently done with seahash, though I haven't done a benchmark of it against other potential hash implementations, but that can be revisited later. This hash calculation is done only in agents, and that hash is used as the xDS resource version, so both management and proxy servers just parse and use the hash as is, without recalculating it. Since the hash is calculated with constant seeds this means the hash is stable across different machines for the same input so that resources can be limited to the ones that the client side actually doesn't have.

The current code will attempt to connect to the delta stream first, and fallback to the old state of the world streams if the remote end doesn't support it, the way tonic streams work makes this a bit ugly, but hopefully this can be removed in a future version in favor of only using delta streams.

Resolves: #792

Copy link

github-actions bot commented Dec 8, 2023

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

github-actions bot commented Dec 8, 2023

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@Jake-Shadle Jake-Shadle mentioned this pull request Dec 8, 2023
Copy link

github-actions bot commented Dec 8, 2023

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

2 similar comments
Copy link

github-actions bot commented Dec 8, 2023

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

github-actions bot commented Dec 8, 2023

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

1 similar comment
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@quilkin-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: 0a06e60e-2d80-4779-a139-21cdddacba6e

The following development images have been built, and will exist for the next 30 days:

To build this version:

git fetch git@github.com:googleforgames/quilkin.git pull/882/head:pr_882 && git checkout pr_882
cargo build

@XAMPPRocky XAMPPRocky merged commit d563692 into main Dec 14, 2023
5 checks passed
@Jake-Shadle Jake-Shadle deleted the incremental-xds branch December 14, 2023 14:08
@markmandel markmandel added kind/feature New feature or request area/operations Installation, updating, metrics etc labels Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/operations Installation, updating, metrics etc kind/feature New feature or request size/xl
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Delta xDS
4 participants