Skip to content

Add cluster support #228

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Add cluster support #228

wants to merge 7 commits into from

Conversation

farost
Copy link
Member

@farost farost commented Jun 17, 2025

Release notes: usage and product changes

Introduce cluster support for TypeDB 3.x, featuring server replicas and the new version message.

Implementation

Remove database replicas. Instead, add server replicas (by extending the usual Server message) with a similar set of fields.

Instead of adding a is_primary flag, introduce an extensible enum ReplicaType for more granular split between primary and supporting nodes.

To reduce the network overhead, this new information is provided in the initial server's connection response.

string distribution = 1;
string version = 2;
}
}
}

message Server {
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think we need a separate ServerReplica message

string address = 1;
}

message Version {
Copy link
Member Author

Choose a reason for hiding this comment

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

Generally, it should be same for every server in the cluster, but its domain is closer to Server

@farost farost marked this pull request as ready for review June 18, 2025 08:58
@farost farost requested a review from haikalpribadi as a code owner June 18, 2025 08:58
@farost farost requested a review from lolski June 18, 2025 08:58
Authentication.Token.Create.Req authentication = 4;
}

message Res {
uint64 server_duration_millis = 1;
ConnectionID connection_id = 2;

// pre-send all databases and replica info
DatabaseManager.All.Res databases_all = 3;
Copy link
Member Author

Choose a reason for hiding this comment

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

We removed an excessive cache, plus it's unclear which replica to trust in the first place, so we removed the databases from this initial response. The process of getting the databases will run through the regular APIs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant