Skip to content

Global tables

fdyno does not support global tables in this version. The development prototype of global tables with multi-Region strong consistency (MRSC) is deferred to a later version, and its code is removed. A later version brings its own design and model checks.

Request or setting Result
UpdateTable with ReplicaUpdates, GlobalTableWitnessUpdates or MultiRegionConsistency UnsupportedOperationException: Global tables (replicas, witnesses and multi-Region consistency) are not supported by this version of fdyno
CreateTable with those members, GlobalTableSourceArn or GlobalTableSettingsReplicationMode The same error
DYNODB_REGION, DYNODB_GLOBAL_TABLE_REPLICAS, DYNODB_GLOBAL_TABLE_WITNESS Retired: any value stops startup
Legacy global tables (version 2017.11.29) See the compatibility table

A table that an earlier development build converted, or created with DYNODB_REGION set, keeps its data and metadata. This version does not serve it: the API returns ResourceNotFoundException for its name, and ListTables omits it. Background workers still maintain it. Its name stays in use, so CreateTable with that name fails. To keep the data, export it with the earlier build, or restore one of its backups: a restored table is a single-Region table.

One FoundationDB cluster can still span Regions without global tables. The rest of this page describes that layout and what fdyno does during a FoundationDB Region failover.

Step-through: replica Regions A and B with full copies, witness Region C with satellite logs ca and cb; a write in A waits for ca; Region A lost, B waits for cb; witness lost, commits and strong reads may block; and one recorded prototype spike, which had ca only. Not for production.

Set up

fdyno does not configure or certify the FoundationDB layout. A layout that keeps acknowledged writes through the loss of one Region needs these preconditions:

Precondition Required layout
Data Two full-copy data Regions with usable_regions=2; remote full copies receive asynchronous log-router traffic. The third Region holds only satellite transaction logs as witness.
Symmetric durability Each data Region, when active, waits for synchronous logs in another AWS Region. Distinct satellite process sets ca and cb in witness C can serve A and B, respectively, each with one_satellite_double. A-only satellites are insufficient after B takes over. Another AZ in B's AWS Region does not protect against Region loss.
Verify Check locality, log recruitment and policy after every promotion. Check logs recruited in the current recovery, not old logs. The region configuration can list satellites that are not recruited (see recovery modes). Do not downgrade durability to recover availability.
Coordinators Place them in all three Regions so a majority survives any one Region's loss.
Processes Run fdyno in A and B. Set each process's DYNODB_FDB_DATACENTER_ID to its data center so the FDB client prefers nearby storage. This is not a promise that every read stays local.

Failure behavior

A commit in this layout needs a healthy, correctly configured satellite for the corresponding synchronous-log wait. Read versions go to the active Region's proxies.

On FoundationDB 7.3.51, a full read version also waits until the active Region's current logs, including its satellite logs in the witness Region, confirm that the recovery epoch is still live (GRV proxy, epoch check, satellite logs are local). Reads and writes use a full read version. The proxy confirms the epoch once for each batch of read-version requests (batching). So each batch, in either replica Region, waits for a round trip from the active Region to the witness. Commits separately wait for the active Region and required synchronous log sets. Commit latency is not bounded by one cross-Region round trip.

Losing the witness may block commits and strong reads, not silently fall back to primary-only durability. The prototype spike sampled writes, not strong reads, during witness isolation, and it did not qualify witness loss. Availability and RPO depend on the actual policy and operator recovery changes. A rebuild that changes recovery mode can remove effective satellite protection; measure and state that interval.

What fdyno does during a failover

fdyno has no failover setting or command. FoundationDB's recovery picks the Region that accepts commits. fdyno processes in both Regions keep running and react to what their FoundationDB client sees.

In this example, Region A is cut off and Region B survives. The fdyno processes in A keep running but cannot reach FoundationDB in B or the witness. If only A's FoundationDB processes are lost and the network stays up, the fdyno processes in A reach the new proxies after the recovery. They then behave like those in B.

Moment A endpoint B endpoint Worker lease Why
Cut accepted requests that need FoundationDB fail at their deadline; a submitted commit can be left unknown; /readyz 503 when its 2-second probe fails requests retry inside their budget the holder in A stops renewing Pictured: Region A is cut off and Region B survives. A request retries FoundationDB's retryable errors until its budget ends (DYNODB_OPERATION_TIMEOUT, 30 s by default).
FoundationDB recovers in B, B accepts commits serves FoundationDB's recovery picks the Region that accepts commits; fdyno has no failover setting or command.
The lease expires a peer in B may now take it In this example the lease held in A is not renewed and expires.
A B peer takes the lease a B peer acquires it on a later check and writes a new epoch From then on, the lease fence refuses late writes from the old holder.
Part What happens Source
A request in either Region The retry loop retries FoundationDB's retryable errors until the request budget ends (DYNODB_OPERATION_TIMEOUT, 30 s by default). If a commit's reply was lost, fdyno retries only a tokened transaction, which reads its token record and replays a committed result; any other write, or one still unknown at the deadline, gets HTTP 500 The write may or may not have been applied. A write that reaches the deadline without an unknown outcome did not commit (responses at the deadline). transaction_runner.go
/readyz Asks for a full read version with a 2-second timeout. Read versions come from the active Region's proxies, so the probe returns 503 not ready: foundationdb unreachable in either Region while no read version arrives within 2 seconds. checkBackend, service.go:316; writeReadiness, ops_listener.go:76
/livez Does not touch FoundationDB, so a recovery does not make a liveness probe restart the process. writeLiveness, ops_listener.go:66
Worker leases A lease held by a process in A is not renewed. A peer in B can take it only after it expires by the peer's clock, as after a crash. The one exception is a lease written by a clock far ahead: a peer can take it at its first check at least one lease lifetime after it first saw the unchanged value, if the value is still far ahead then (a clock far ahead). Expiry alone does not move the lease or refuse writes: a peer that is not fenced takes it at a later successful check and writes a new epoch, and from then on the lease fence refuses late writes from the old holder. TTL range leases and job leases expire and move the same way (range and job leases). lease.go, lease_fence.go
Table visibility Does not change. Every table is visible at every endpoint, except a table an earlier build made regional (see the top of this page), which no endpoint serves. regionVisible, global_tables.go
Client locality DYNODB_FDB_DATACENTER_ID is set once at startup as a database option. It names the data center whose storage the client prefers; it does not follow a promotion. apply, fdb_locality.go:54

So /readyz and successful API probes show that a Region serves again. They do not show which Region is active or that new writes have cross-Region durability; check those separately, as below.

What to verify after promotion

Check separately Evidence
Serving again The new active Region and successful API probes. A coordinator majority or a successful probe does not prove cross-Region durability.
Protecting new acknowledgements across Regions Required logs in the current accepting recovery epoch, including that active Region's surviving satellite quorum. Logs from a previous epoch can still exist without protecting new writes.
Ready for another Region-loss test Full remote storage copy, healthy replica trackers, quiet data movement and an audit of acknowledgements through repair. Recruitments alone do not prove a complete remote copy.

Record those points separately in a failover drill. Use native commit-version witnesses to assign native acknowledgements to recovery epochs. Audit API acknowledgements separately: the API does not expose commit versions. Check strong reads against the acknowledged history, not just probe success. A test whose client stops at the first error does not establish behavior for the rest of the fault window. The Region-rebuild runbook shows how the accepting-epoch, remote-copy and audit boundaries differ.

What a topology check reads from status json

The repository's topology checks read these fields of FoundationDB's status json (tools/campaignio/regions.go, used by cmd/campaign-topology-smoke). The thresholds are those of the tested layout: triple logs, and two one_satellite_double satellite logs for each data DC. Use the values of your own layout.

Check Fields and rule
Serving in the expected Region client.database_status.available is true, cluster.active_primary_dc is the expected data DC, and cluster.configuration.usable_regions is 2.
Policy cluster.configuration.regions has two entries. Each has one data DC and its own satellite DC, with satellite_redundancy_mode one_satellite_double and satellite_logs 2. No DC is both a data DC and a satellite. For physical placement the check uses the operator's own inventory, which maps each process address to a host, a zone and an AWS Region. The two data DCs must be in two AWS Regions, and every satellite set on two hosts and two zones in a third.
New writes protected Only log sets with current true count. Each has log_replication_factor at least 3, log_write_anti_quorum 0, satellite_log_replication_factor at least 2 and satellite_log_write_anti_quorum 0. Their healthy log_interfaces whose addresses are in the inventory cover at least 3 hosts in the active DC, and at least 2 hosts in 2 zones of its satellite DC. The smoke also checks that a copy of a passing status, with current set to false on every log set, fails.
Ready for another fault cluster.full_replication and cluster.data.state.healthy are true. cluster.data.moving_data.in_flight_bytes and in_queue_bytes are 0. cluster.data.team_trackers has at least usable_regions entries, each with state.healthy true and unhealthy_servers 0. The protection check passes on the same sample. Two such samples in a row, 10 s apart, are required. A missing field is unknown, not zero.

The smoke uses a private local FoundationDB 7.3.51 cluster and creates no AWS resources. It checks recruitment and the repair sequence, not WAN latency or multi-Region qualification. During the degraded 2 -> 1 -> 2 repair, it uses a separate check for the usable_regions 1 epoch (Region rebuild):

  • each current log set keeps log_replication_factor at least 3 and log_write_anti_quorum 0;
  • every current log member must be an inventory process in the active DC, so no satellite log is allowed;
  • healthy members must cover at least 3 hosts.

Not guaranteed

The topology is not qualified. FoundationDB 7.3.51 omits satellites at usable_regions=1; that recovery mode does not retain the required cross-Region synchronous policy. A 2→1→2 rebuild is not continuous cross-Region protection.

Unsafe Region rebuild on FoundationDB 7.3.51 and 7.3.77

Do not use repopulate_anti_quorum to rebuild a lost Region on this pin. It lacks the remote log-prefix barrier fix: old transaction-log generations can be discarded before the rebuilt Region's logs have copied them. This warning comes from code analysis, not an observed loss.

See the Region policy and recovery limits.

Primary-Region loss, witness loss and remote-Region isolation checks require zero lost acknowledged writes and no stale strong reads in their tested histories. Finite passing histories do not prove zero data loss or qualify production.

One small-fleet EC2 spike ran on the asymmetric layout (satellite logs for the first primary only). It recorded 1,000 east-write, west-strong-read pairs with 0 stale reads. It also recorded a primary-Region loss with a 13.61 s failover. It lost 0 of 3,808 API and 0 of 8,176 native acknowledged writes. After promotion, the new primary had no satellite policy. The run did not qualify the topology (spike record).

How we know: open qualification gaps.