Skip to content

Multi region replication - #101

Merged
JamesEjembi merged 2 commits into
VeriNode-Labs:mainfrom
gloskull:Multi-Region-Replication
Jul 28, 2026
Merged

Multi region replication#101
JamesEjembi merged 2 commits into
VeriNode-Labs:mainfrom
gloskull:Multi-Region-Replication

Conversation

@gloskull

Copy link
Copy Markdown
Contributor

Motivation

  • Provide a dependency-free, deterministic representation of multi-region topology, failover planning, canary release gates, and DR test reporting to standardize DR decisions across services (issue Multi-Region Replication and Disaster Recovery Testing #91).
  • Expose stable, off-chain-friendly types so monitoring and deployment tooling can evaluate the same gates without adding runtime dependencies.

Description

  • Add a new replication module (src/replication/mod.rs) implementing RegionStatus, ReplicationTopology, deterministic failover selection (failover_plan()), CanaryAnalysis release gates, DisasterRecoveryTestReport, and ReplicationMetrics with SLO constants.
  • Register the module from the crate root by adding pub mod replication; to src/lib.rs so consumers and tests can use it.
  • Add integration tests (tests/replication_dr_test.rs) covering failover selection, stale/slow-region DR blocking, canary gates (security, success rate, latency), and combined RTO/RPO pass criteria.
  • Add an operator-facing runbook (docs/runbooks/multi-region-dr.md) describing architecture, SLOs, blue-green/canary promotion flow, DR exercise steps, and monitoring/alert guidance.

Testing

  • Ran cargo test --test replication_dr_test and the new replication tests passed (4 passed; 0 failed).
  • Ran the full test suite with cargo test; the replication tests passed, but the overall run produced unrelated failures in existing pool_manager unit tests (17 failures) due to Soroban storage access from tests that require env.as_contract(); those failures are pre-existing and not caused by the replication module.

Closes #91

@JamesEjembi
JamesEjembi merged commit b5af838 into VeriNode-Labs:main Jul 28, 2026
1 check failed
@JamesEjembi

Copy link
Copy Markdown
Contributor

Merged directly into main with conflict resolution

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.

Multi-Region Replication and Disaster Recovery Testing

2 participants