feat(cluster): HA cluster with Raft consensus and TCP replication (v2.5.0)#218
Merged
caikpigosso merged 6 commits intomainfrom Mar 21, 2026
Merged
feat(cluster): HA cluster with Raft consensus and TCP replication (v2.5.0)#218caikpigosso merged 6 commits intomainfrom
caikpigosso merged 6 commits intomainfrom
Conversation
…cation (v2.5.0) Production-grade high availability for Kubernetes and Docker deployments. Raft Consensus (openraft 0.10): - RaftManager with StateMachine, LogStore, and gRPC-backed Network - ClusterCommand for metadata consensus (collections, shards, membership) - Leader election with configurable timeout (1-3s) - Raft RPCs in proto/cluster.proto (Vote, AppendEntries, Snapshot) TCP Replication: - Master-replica streaming with full/partial sync and auto-reconnect - DurableReplicationLog with WAL-backed persistence - WriteConcern (WAIT command) for synchronous replication - Replica ACK processing with offset tracking - Replication config parsed from YAML with DNS hostname resolution HA Lifecycle: - HaManager handles Leader/Follower transitions dynamically - LeaderRouter tracks current leader for request routing - Write-redirect middleware: followers return HTTP 307 to leader - Reads served locally on any node Cluster Resilience: - Epoch-based conflict resolution for shard assignments - ShardMigrator for data transfer during rebalance - CollectionSynchronizer with quorum-based creation and background repair - DNS discovery for Kubernetes headless services Dashboard: - New ClusterPage with nodes table, leader info, replication status - Auto-refresh every 5 seconds with sidebar navigation Infrastructure: - docker-compose.ha.yml for 3-node HA cluster - Helm headless service template for K8s - Test scripts for cluster simulation and failover Documentation: - Updated README with HA features - Updated CLUSTER.md with HA configuration guide - Kubernetes deployment instructions Version: 2.4.2 -> 2.5.0 Tests: 1066 passed, 0 failed Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- docker-compose.ha.yml: use ${VECTORIZER_ADMIN_PASSWORD} and ${VECTORIZER_JWT_SECRET} from .env
- CLUSTER.md: remove hardcoded passwords, show .env setup instructions
- CLUSTER.md: single connection URL instead of per-node ports
- .gitignore: exclude cluster config files and .env (may contain secrets)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Production-grade High Availability cluster implementation for Vectorizer v2.5.0.
docker-compose.ha.yml)Architecture
What's new
Test plan
🤖 Generated with Claude Code