Architecture Decision Record

ADR-0029: Cross-Zone Synchronization Uses BSFG Peer Protocol, Not Native Stream Mirroring

Status: Accepted · Date: 2026-03-06

Status: Accepted

Date: 2026-03-06

Context

Each zone owns its own JetStream domain and object store. Facts must still move across zones. NATS JetStream already provides native source and mirror replication, which asynchronously copies messages across streams and can recover after disconnects. Those agreements are configured on the receiving side, and mirrored messages retain origin sequence numbers and timestamps. :contentReference[oaicite:0]{index=0}

However, BSFG has already committed to an explicit boundary protocol:

AppendFact
FetchFacts
ConfirmReceipt
PutObject

The architecture therefore needs to decide whether cross-zone movement should be implemented primarily by native broker-to-broker mirroring, or by BSFG peers speaking the boundary protocol.

Options Considered

Option Description Benefits Drawbacks
Native JetStream source/mirror as the primary boundary mechanism Use JetStream stream replication directly across zones as the main transport primitive.

|

| | Shared broker federation across zones | Expose zones through a broader NATS topology such as leaf-node style transparent routing. |

|

| | BSFG peer protocol as the canonical cross-zone path (Selected) | Zones synchronize by having BSFG peers call each other through the explicit boundary RPC contract. |

|

| | Hybrid with broker mirroring hidden underneath | Expose BSFG RPC at the surface but secretly rely on native source/mirror for most cross-zone movement. |

|

|

Decision

Cross-zone synchronization uses the BSFG peer protocol as the canonical boundary mechanism. Native JetStream source and mirror are not the primary architectural primitive for zone crossing. :contentReference[oaicite:1]{index=1}

BSFG(zone A) --Connect RPC/mTLS--> BSFG(zone B)
     |                                   |
 JetStream A                         JetStream B

This means:

Native JetStream replication features remain useful implementation tools in other contexts, but they are not the canonical expression of the BSFG boundary architecture. Connect remains the chosen boundary RPC protocol and is explicitly designed to work over ordinary HTTP rather than a transport bound to one specific HTTP framing model. :contentReference[oaicite:2]{index=2}

Consequences

Benefits:

Tradeoffs: