Docs
  • 0.49.1latest
  • 0.48.0
  • 0.47.0
  • 0.46.0
  • 0.45.0
  • 0.44.0
  • 0.43.0
  • 0.42.0
  • 0.41.0
  • 0.40.0
  • 0.39.6
  • 0.39.5
  • 0.39.3
  • 0.39.2
  • 0.39.1
  • 0.39.0
  • 0.38.4
  • 0.38.2
  • 0.38.1
  • 0.37.1
  • 0.37.0
  • 0.36.2
  • 0.36.1
  • 0.36.0
  • 0.35.3
  • 0.35.2
  • 0.35.1
  • 0.35.0
  • 0.34.4
  • 0.34.3-beta
  • 0.34.2-beta
  • 0.34.1-beta
  • 0.34.0-beta
  • 0.33.4-beta
  • 0.33.3-beta
  • 0.33.2-beta
  • 0.33.1-beta
  • 0.33.0-beta
  • 0.32.0-beta

Between clusters

A replication link ships one database's log to another cluster: declared on each side, read-only by declaration, and identity stays home.

What replicates where is replication within one cluster: a namespace asks for copies, and the cluster's own peers collect them. This page is the neighbouring mechanism, and it answers a different question — how one database reaches a different cluster, with its own catalog, its own users and its own sign-in.

The two are not two spellings of one thing. A peer row names a machine of this cluster and is applied by this cluster's log; a replication link names an outside party, and neither side's catalog reaches the other.

The unit is one database, and each side declares its own row

-- on the cluster that holds the data:
DEFINE REPLICATION east TO 'cluster-b:9080' FOR DATABASE prod.shop AS 'warehouse';

-- on the cluster that receives the copy:
DEFINE REPLICATION west FROM 'cluster-a:9080' FOR DATABASE prod.shop;

The database is always namespace.database. A replication is a statement about the cluster, not about whatever the session happened to select, so the bare name is refused where the span is. AS 'warehouse' is the database's name on the receiving cluster — left out, the copy carries the name it has at home.

The link is declared on each side, and the row is this cluster's topology. It reaches every node here through the ordinary catalog apply, and it never rides the data channel to the other cluster — a row the remote could not vouch for would be a link nobody trusted.

What crosses the seam is the database's log

The channel is the database's filtered log, not the change feed: the feed omits the catalog on purpose, and schema changes must cross or the copy silently diverges. Every record carries where it came from — the origin cluster and its position — and delivery is at-least-once: the receiving cluster applies by record identity and version, so a record delivered twice lands once, and the position is acknowledged only after the apply is durable.

A copy therefore converges, and a busy link does not lose writes to a dropped connection — it resumes from the last acknowledged position.

The copy is read-only, by declaration

A database bound by an inbound link refuses writes that did not arrive through it, under its own refusal name — not the one that means "not the leader", because the copy may have a leader and still must not take a local write. The refusal lives inside the commit itself, so rehearsing a migration with VERIFY rehearses this gate too.

Identity stays home

What crosses is the database's data and schema definitions. Users, their credential hashes and their grants do not — sign-in on the receiving cluster is that cluster's own, which is also why the copy of a database is not a way around anyone's authority.

INFO FOR REPLICATION east;
INFO FOR REPLICATIONS;
ALTER REPLICATION east PAUSED;
ALTER REPLICATION east AT 'cluster-c:9080';
CREATE LINK TOKEN FOR REPLICATION east EXPIRES 10m;
DROP REPLICATION east;

PAUSED and RESUMED are the operability surface: a stopped stream is a statement, not a process to hunt down. The token binds the two sides — it is shown once, answered once, and the row keeps only its digest and expiry, so no catalog, backup or node ever holds something that binds a link by itself.

INFO FOR REPLICATION answers the declaration — the endpoint, the database in the spelling FOR DATABASE takes, the remote name, whether the stream is paused, and the token's remaining life — and it is refused rather than filtered for a caller who may not see the whole, for the reason INFO FOR NODE is.