Oxia Federation #942
mattisonchao
started this conversation in
Proposal
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Motivation
In systems like Apache Pulsar, the architecture is split into a control plane (managing topic metadata, policies, tenant configs) and a data plane (serving actual message traffic). The data plane needs fast, local access to control plane metadata — but it should not be writing to it.
Today, Oxia replication is confined to a single cluster. If the data plane wants to read control plane metadata, it must make remote calls to the control plane Oxia cluster, adding latency and creating a hard dependency. If the control plane is temporarily unavailable, the data plane loses access to its configuration.
The Core Use Case
We want control plane → data plane data syncing, where:
This is different from geo-DR or active-passive failover. The data plane clusters are intentionally read-only mirrors — they are caches, not standby replicas waiting for promotion.
Core Idea
We already have the observer follower concept in the replication protocol (
AddFollowerRequest.observer = true, replication.proto#L129), originally designed for shard splitting. An observer:FollowerCursorThe proposal: generalize this mechanism so that nodes in a remote Oxia cluster (a different namespace/coordinator domain) can subscribe as observers to a source cluster's shard leaders, creating Oxia Cluster Federation.
Architecture
Replication Flow
Leader Failover Handling
A key property: during control plane failover, the data plane continues serving reads from its local cache. The data may be briefly stale, but availability is preserved.
Design Details
1. Federation Controller
A new component that runs in the data plane cluster (or as a sidecar):
PushShardAssignments)FollowerCursorfrom the control plane leader to a designated data plane node2. Observer Follower — What We Already Have
AddFollowerRequest.observerFollowerCursorsnapshot transferFollowerCursorWAL tailingAppendentries continuouslyQuorumAckTracker3. QuorumAckTracker Changes
Currently,
NewCursorAckerenforcescursorIdxGenerator < replicationFactor - 1. Observer cursors must be tracked separately so they:requiredAcks4. Cache Serving Status on Data Plane
The data plane observer shards serve read-only traffic with eventual consistency:
ServingStatus_OBSERVER— a new status indicating the shard can serve reads but not writes5. Cache Invalidation and Freshness
Since the data plane is a cache, we need to consider:
oxia_federation_lag_offsetandoxia_federation_lag_secondsmetricsModificationOffsetis available to clients, so they can detect stalenessWhat Needs to Be Built
Phase 1: Core Federation (MVP)
FederationControllercomponent that watches source cluster shard assignmentsObserverCursorAckerinQuorumAckTracker(non-voting)oxia_federation_lag_offset,oxia_federation_lag_seconds)Phase 2: Cache Serving
ServingStatus_OBSERVERstatusPhase 3: Operational Tooling
oxia admin federation add/remove/status)Key Advantages
observerflag andFollowerCursormachinery already exist. We're extending, not rewriting.Open Questions
Related
All reactions