Skip to content

feat(cluster): implement leader-aware connect mechanism in Rust SDK#2359

Merged
mmodzelewski merged 6 commits intomasterfrom
cluster-metadata
Nov 19, 2025
Merged

feat(cluster): implement leader-aware connect mechanism in Rust SDK#2359
mmodzelewski merged 6 commits intomasterfrom
cluster-metadata

Conversation

@hubcio
Copy link
Contributor

@hubcio hubcio commented Nov 17, 2025

Implement automatic client redirection to cluster leader when
initially connected to follower nodes. Ensures write operations
always reach the leader while maintaining transparent SDK experience.

Rust SDK changes:

  • Add leader_aware reconnection logic to TCP, QUIC, and WS clients
  • Implement connection info tracking for monitoring client state
  • Auto-discovery and reconnection to leader from cluster metadata
  • Update client APIs with get_connection_info() method

Server changes:

  • Add --follower CLI flag to start node in follower-only mode
  • Enhance cluster configuration validation (node topology, transport)
  • Update TCP/QUIC/WebSocket impl with cluster-aware connection handling

Testing infrastructure:

  • BDD test suite (leader_redirection.feature)
  • Docker Compose cluster setup (leader + follower nodes)
  • Helper modules for cluster testing and node management

@hubcio hubcio force-pushed the cluster-metadata branch 5 times, most recently from c1e8200 to 9795b31 Compare November 18, 2025 09:34
Implement automatic client redirection to cluster leader when
initially connected to follower nodes. Ensures write operations
always reach the leader while maintaining transparent SDK experience.

Rust SDK changes:
- Add leader_aware reconnection logic to TCP, QUIC, and WS clients
- Implement connection info tracking for monitoring client state
- Auto-discovery and reconnection to leader from cluster metadata
- Update client APIs with get_connection_info() method

Server changes:
- Add --follower CLI flag to start node in follower-only mode
- Enhance cluster configuration validation (node topology, transport)
- Update TCP/QUIC/WebSocket impl with cluster-aware connection handling

Testing infrastructure:
- BDD test suite (leader_redirection.feature)
- Docker Compose cluster setup (leader + follower nodes)
- Helper modules for cluster testing and node management
@mmodzelewski mmodzelewski merged commit df5e126 into master Nov 19, 2025
49 checks passed
@mmodzelewski mmodzelewski deleted the cluster-metadata branch November 19, 2025 07:35
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