Skip to content

feat: Add distributed integration tests for horizontal scaling (Raft, Cluster, Replication)#25

Merged
ruvnet merged 2 commits intomainfrom
feat/horizontal-scaling-raft
Nov 28, 2025
Merged

feat: Add distributed integration tests for horizontal scaling (Raft, Cluster, Replication)#25
ruvnet merged 2 commits intomainfrom
feat/horizontal-scaling-raft

Conversation

@ruvnet
Copy link
Copy Markdown
Owner

@ruvnet ruvnet commented Nov 27, 2025

Summary

  • Add Docker Compose infrastructure for 5-node distributed cluster testing
  • Comprehensive integration tests for horizontal scaling components
  • All 69 unit tests verified (23 raft + 20 cluster + 26 replication)

Features Tested

Raft Consensus (ruvector-raft)

  • Leader election with configurable timeouts (150-300ms)
  • Log replication with commit index tracking
  • Term management and state persistence
  • Snapshot creation and recovery

Cluster Management (ruvector-cluster)

  • Consistent hash ring with 150 virtual nodes per real node
  • Jump consistent hash for minimal key migration
  • Load balancer for shard distribution
  • Gossip-based node discovery

Multi-Master Replication (ruvector-replication)

  • Sync, Async, and SemiSync replication modes
  • Vector clock conflict resolution
  • Automatic failover with health checks
  • Change data capture streaming

Test Infrastructure

  • Docker Compose 5-node cluster (172.28.0.10-14)
  • Dedicated test runner container
  • Health checks with netcat
  • Configurable ports for Raft (7000), Cluster (8000), Replication (9000)

Test plan

  • Run cargo test -p ruvector-raft - 23 tests passed
  • Run cargo test -p ruvector-cluster - 20 tests passed
  • Run cargo test -p ruvector-replication - 26 tests passed
  • Docker cluster builds successfully
  • All tests pass in Docker environment

Closes #24

🤖 Generated with Claude Code

ruvnet and others added 2 commits November 27, 2025 22:49
…re for horizontal scaling

- Add Docker Compose 5-node cluster for Raft consensus testing
- Add comprehensive integration tests for ruvector-raft, ruvector-cluster, ruvector-replication
- Add performance benchmark tests with latency measurements
- Verify all 69 unit tests pass (23 raft + 20 cluster + 26 replication)

Tests cover:
- Raft consensus: leader election, log replication, term management
- Cluster management: node discovery, shard assignment, consistent hashing
- Replication: sync modes, conflict resolution, failover management

Closes #24

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add Rust code examples showing how to use:
- ruvector-raft: 5-node Raft cluster configuration
- ruvector-cluster: Consistent hash ring with auto-sharding
- ruvector-replication: SemiSync multi-master replication

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ruvnet ruvnet merged commit 8f45a54 into main Nov 28, 2025
7 checks passed
ruvnet added a commit that referenced this pull request Feb 20, 2026
feat: Add distributed integration tests for horizontal scaling (Raft, Cluster, Replication)
ruvnet added a commit that referenced this pull request Apr 23, 2026
…ceiling

Module count is a real axis. At fixed N=512, sweeping num_modules ∈
{20, 25, 30, 35, 40, 45, 50} finds new peak full_ARI = 0.599 at
num_modules=20, γ=4.0 — 9 % higher than item-24's 0.549 at 35 modules.

Per-config peaks:
  (20, 0.599) (25, 0.505) (30, 0.528) (35, 0.507)
  (40, 0.559) (45, 0.566) (50, 0.517)

A second local maximum at num_modules ∈ [40, 45] suggests the quality
ridge is multi-modal, not unimodal.

New CPM ceiling: 0.599 at (N=512, 20 modules, γ=4.0). Gap to 0.75
AC-3a SOTA target narrows from 1.37× (item 24) to 1.25×.

- tests/leiden_cpm.rs: new leiden_cpm_module_count_sweep_at_n512
- ADR-154 §17 item 26 + heading Twenty-five → Twenty-six
- Row ordering fixed (#25/#26 were transposed)

Co-Authored-By: claude-flow <ruv@ruv.net>
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.

feat: Horizontal Scaling - Raft Consensus, Multi-Master Replication, Auto-Sharding

1 participant