Skip to content

Guarantees

fdyno runs each request in one or more FoundationDB transactions, which are atomic, strictly serializable and durable. Each guarantee has a boundary:

Summary

Guarantee Holds for Does not cover
A write is all or nothing Single-item writes, TransactWriteItems, PartiQL transactions BatchWriteItem, which can commit in parts
Reads are current One transaction with a fresh read version, the default A traversal across pages; operator-selected read modes that can return stale results
A success means durable Every acknowledged write Failures beyond your FoundationDB redundancy
LSIs never lag; GSIs catch up Every write to a table with indexes GSI reads, which are eventually consistent as in DynamoDB; old items while a new GSI is CREATING
Stream records commit with the item Every change on a stream-enabled table Consumer-side exactly-once processing
Retries apply at most once Every write (fdyno does not retry an unknown commit; it returns 500); tokened client retries that follow the client procedure Client retries without a live token; clocks outside the clock bound
Any process can fail All fdyno processes The FoundationDB cluster

Atomic writes

A single-item write checks its condition in the same transaction that commits the item, affected LSI entries, GSI change records and stream record. TransactWriteItems commits every action across tables, with its token record if a token was sent. A reader sees all or none; a crash cannot make a commit partial. BatchWriteItem is not atomic: a large batch commits in parts. See API transaction boundaries.

Strict serializability

A request in one transaction takes effect at one instant between request and response. If A returns before B starts, B sees A, even without ConsistentRead. Concurrent conditional creates have one winner; increments all apply. No transaction sees a partial write, lost update or phantom. Each Query or Scan page is one snapshot, not the whole traversal. Keep an invariant in one transaction.

Durability

Success follows FoundationDB commit. There is no write-behind queue or local log. A GSI change record commits in FoundationDB with the item; only its application to the GSI comes later (indexes). Survival depends on FoundationDB redundancy, storage engine and failure domains. A single-process development cluster is a data-loss risk regardless of the number of fdyno processes.

A lost response can mean a committed write. When fdyno knows the outcome is unknown, it says The write may or may not have been applied. Retry safely.

Indexes

An LSI changes in the write's transaction: a successful write is in the LSI, and a deletion leaves no LSI entry.

A GSI is eventually consistent, as in DynamoDB. The write commits a GSI change record with the item, in one transaction; a background worker then applies the record to the GSI. So a GSI read can miss a recent write or return an older version of an item. When writes stop, each GSI catches up: it holds the projection of every item that has the index key, and no entry for a deleted item (how we know).

If a table's GSIs fall more than 5 seconds behind, a write that changes a GSI of that table fails with ThrottlingException (a global secondary index is behind on replicating writes, with a throttlingReasons entry IndexWriteAccountLimitExceeded naming each changed index's ARN) before it commits. Nothing is written; retry with backoff. Every fdyno process reads the backlog age from the change log in FoundationDB (at most every 250 ms per table), so every process throttles the same table. In a TransactWriteItems, BatchWriteItem or ExecuteTransaction, every item is validated first: a ValidationException wins over the throttle. In a BatchWriteItem that commits in parts, a throttled part comes back in UnprocessedItems, and the earlier parts stay committed.

Queries and scans on a new GSI fail while old items backfill in CREATING; wait for ACTIVE. A table made by restore, point-in-time restore or import stays CREATING until its GSIs are built.

Streams

On a stream-enabled table, a change and its record commit together: no change lacks a record, and no record lacks a committed change. Order is by commit within a shard. One partition key maps to one shard per epoch; read a closed parent to its end before reading its children. There is no general cross-shard order.

Consumers checkpoint and apply records idempotently: delivery is at least once. Reading a trimmed record returns TrimmedDataAccessException, never a silent gap. See streams.

Retries

When FoundationDB cannot confirm a commit, fdyno retries only a tokened transaction. Any other write returns InternalServerError with The write may or may not have been applied: it applied once or not at all, and fdyno does not apply it again (fdyno's own retries).

A valid, identical TransactWriteItems retry with a ClientRequestToken can replay on any process if its token is still live at the server's check.

The serving process and cleanup worker compare their clocks with the stored timestamp. If either clock is ahead of the writer's, the window is shorter by the difference. Under the one-minute clock bound, allow fdyno to check the token within 9 minutes of the first send. The client procedure gives the latest time fdyno can start the retry. A token written by a clock more than 10 minutes behind the serving process's clock counts as expired there, so a retry can apply again. Other client retries are new requests; an increment can apply twice.

Moment Request A Writer B Why
A commits UpdateItem ADD n :one commits; the commit reply is lost Pictured: inside request A, not an SDK resend.
B writes changes the item
A answers does not retry; returns InternalServerError, outcome unknown A applied once. It does not overwrite B or emit another stream record.

A applied once, and fdyno does not overwrite B or emit another stream record. An SDK resend of A is a new request and adds again. The ambiguity contract matrix injects a lost commit reply into every write API and checks the reply and the durable state.

Process failure

All durable state lives in FoundationDB, including backups, jobs, tokens and worker leases. A replacement with the required configuration and format support reads committed state from FoundationDB; it needs no local replay. Configuration, connections, in-flight requests and metrics are process-local. A leased worker checks its fence in the effect transaction, so a takeover prevents effects from the old lease from committing.

Failure Effect on data What to do
fdyno stops before a commit Nothing commits. Retry on another process.
fdyno stops during or after a commit The write may have committed; never partly. Retry safely or check the item.
One fdyno process fails Other processes see all committed state. Replace it.
FoundationDB is unreachable or cannot supply a required read version or commit Affected requests fail or time out. By default, fdyno does not fall back to stale reads. /readyz fails if its read-version check fails; it does not test commit. See when FoundationDB stalls. In a Region failover, see what fdyno does. Check and restore FoundationDB. Use readiness to distinguish an outage from a drain or fence; restarting fdyno does not repair FoundationDB.
FoundationDB loses data beyond its redundancy fdyno has no other copy. Restore a FoundationDB-native backup.

Not guaranteed

Indexes and stream images add write latency and size; the transaction must fit 10 MB. When FoundationDB cannot commit, fdyno never queues writes, and serves no stale reads unless the operator enabled cached reads.

Data does not replicate between separate clusters, and fdyno has no global tables. fdyno publishes no availability target, recovery-point or recovery-time objective. Your FoundationDB design and restore drills determine these.

How we know: tests and their limits, including the retry, stream and worker-lease models.