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

Server to Server Replication #53

Merged
merged 5 commits into from
Dec 19, 2024
Merged

Server to Server Replication #53

merged 5 commits into from
Dec 19, 2024

Conversation

santanusinha
Copy link
Contributor

@santanusinha santanusinha commented Dec 17, 2024

Problem
Right now, if two ranger servers point to each other as upstream, they each receive all nodes from each other leading to a circular infinite loop.

Solution
We identify HTTP sources from which we are replicating and provide a flag in the /nodes and /services APIs to skip sending out data from hubs identified as replication sources.

Effect

  • A client calling the apis without the skipReplicatedData (basically all normal ranger clients) will get data from everywhere as it does currently.
  • If HttpClientConfig for a HTTP based client has the replicationSource set to true then the query skipReplicatedData parameter is set to true so that the upstream sends it only the data it has from it's non-replication upstreams (zk, drove, other lower level http servers etc).

Addresses #52

@santanusinha santanusinha marked this pull request as draft December 17, 2024 07:36
@santanusinha santanusinha marked this pull request as ready for review December 18, 2024 05:24
@koushikr
Copy link
Collaborator

This may not work if the other side is a semi composite. Imagine if there are two sites S1 and S2 with the hubs H1 and H2 respectively. The hub H1 uses H2, along with all the possible local backends in S1 and H2 uses H1, along with all the possible local backends in H2. In this case, we can't ignore the source H2 on H1 and vice-versa for H1 on H2 - since both of them are composite backends.

Should we instead move it to set? so the duplicates are arrested and composite backends can be supported?

@koushikr koushikr merged commit ad0ab7d into main Dec 19, 2024
1 check passed
@koushikr koushikr deleted the s2s_replication branch December 19, 2024 06:19
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.

2 participants