Configuration reference¶
fdyno reads environment variables at startup. Keep policy and worker settings consistent across processes sharing a database. Set listener addresses and FoundationDB locality for each process's own placement.
Durations use Go syntax: 500ms, 30s, 5m, 1h.
fdyno captures the environment at startup. A change takes effect at the next restart. fdyno reloads the contents of the credentials and TLS files that the variables name; see their rows.
Importing the Go package reads no environment or credentials file. Service construction initializes the shared process credential fallback once. A broken fallback file leaves an empty credential set; the server's explicit credential configuration still refuses startup on error. Credential reload keeps the previous set when validation fails.
Invalid values log a warning and use the default in development. With the production profile they stop startup. "Production:" in a row gives the profile's extra rule.
Process and listeners¶
| Variable | Default | Effect |
|---|---|---|
DYNODB_ |
unset | 1 or true turns on the production profile. Other values except 0 and false stop startup. |
DYNODB_ |
:8000 |
Data listener address. Production: a private or loopback literal IP and port. |
DYNODB_ |
local |
The Region in every ARN and in a stream record's awsRegion. Another value must be an AWS Region name, such as us-west-2; its partition follows, such as aws-cn for cn-north-1. A bad value stops startup. |
DYNODB_ |
000000000000 |
The account in every ARN: 12 digits. A bad value stops startup. |
DYNODB_ |
unset | Private operations listener: probes, metrics, /version and /fdb/ diagnostics. No authentication. Production: required, private or loopback. |
DYNODB_ |
0 |
1 counts native write mutation arguments by keyspace. The private operations listener serves the results. |
DYNODB_ |
unset | Starts an unauthenticated pprof listener. Production: loopback only. |
DYNODB_ |
unset | Production: must be 1, to state that the network is trusted. Not checked. |
DYNODB_ |
30s |
One request's budget, retries included; at most 5m. Create, Restore and Restore always get 5m, each transaction still this limit. |
DYNODB_ |
2s |
On shutdown, how long /readyz returns 503 before the listener closes. See shutdown. |
DYNODB_ |
0 (none) |
Concurrent API requests per process; excess get 400 Throttling. Production: required. |
The production profile uses fixed connection caps.
Metrics use only DYNODB_OPS_ADDR when set; otherwise they use the data port.
Unset the retired DYNODB_METRICS_ON_DATA_LISTENER. Startup accepts old 0
and false only with an operations listener, and 1 and true only without
one. To keep metrics off the data port, set a private operations listener
before unsetting the old disable value.
When a configuration change takes effect¶
| Source | When it takes effect |
|---|---|
| Startup environment | Read once into the shared configuration that the listeners, the service and the workers use. Restart to change it. |
| Credentials and TLS file contents | Reload by their own rules. |
The server configures logging, inspects the cluster file and checks the production profile before it opens FoundationDB or starts serving. TLS and FoundationDB client settings can fail startup even in development; not every bad setting has a fallback. The production check validates fdyno's settings, not whether an external TLS proxy, network policy or backup works. See the startup order and production startup tests.
A file reload does not choose a new file or change other environment
settings. To change an address, limit or worker budget, restart with the new
environment. A per-process limit, such as DYNODB_MAX_INFLIGHT, changes with
each replacement. A leased worker takes its settings from the current
holder; mixed worker settings can change behavior at takeover.
Retired fixed defaults¶
Remove these variables from deployments and launch scripts. A blank value or the listed former default still starts. Other values stop startup before FoundationDB or the listeners open.
DYNODB_READ_HEADER_TIMEOUT:10s(data listener headers and TLS handshake).DYNODB_READ_TIMEOUT:60s(1mor1m0salso accepted).DYNODB_FDB_CONNECT_TIMEOUT:10sper startup check. Failure still exits 1; a protocol mismatch still names the two versions when observed.DYNODB_HOTKEY_SERIALIZE:on(1,true, oryesalso accepted). Eligible same-item writes queue within a process; writes that need no old item still bypass the queue.DYNODB_STREAM_AUTO_SPLIT_INTERVAL:30s.DYNODB_STREAM_AUTO_SPLIT_MAX_SHARDS:64.DYNODB_INDEX_BACKFILL_INTERVAL:5s.DYNODB_HOTKEY_BATCH:off(0,false, ornoalso accepted). Queued same-item writes each run in their own transaction.DYNODB_HTTP_ENGINE:fast. The data listener always uses fdyno's HTTP/1.1 loop;nethttp(Gonet/http) is removed.DYNODB_FDB_CLIENT_THREADS:1(0, and any number equal to 0 or 1 such as01,+1or-0, also accepted). fdyno opens one FoundationDB database handle per process; run more processes to scale.verifyandbackuprefuse other values too.DYNODB_FDB_CLIENT_LIBRARYandDYNODB_FDB_CLIENT_CALLBACKSare ignored. A second client library still comes fromFDB_NETWORK_OPTION_EXTERNAL_CLIENT_LIBRARY.DYNODB_EVENTUAL_READS:grv. Every API read uses a fresh read version (read modes).DYNODB_UPGRADE_FINALIZE:auto. fdyno supports one store format and has no finalize (first start).- The
DYNODB_OPERATION_RECEIPT_*settings below are retired (fdyno's own retries). Their former defaults still start:DYNODB_OPERATION_RECEIPT_GC_INTERVAL:1m(60sor1m0salso accepted);DYNODB_OPERATION_RECEIPT_GC_MAX_SCAN:1000;DYNODB_OPERATION_RECEIPT_GC_MAX_DELETES_PER_TICK:600000;DYNODB_OPERATION_RECEIPT_MIN_RETENTION:1h(60mor1h0m0salso accepted);DYNODB_RECEIPT_GC_DRAIN_TELEMETRY:0;DYNODB_MUTATION_COUNTERS_RECEIPT_GC:0. DYNODB_DEV_WORKER_PAGE_LIMIT: no value is accepted. TTL sweep, CDC trim and token cleanup use their fixed page limits in every profile.
HTTP¶
Defaults come from startup configuration. The HTTP server and request reader enforce the wire bounds.
| Variable | Default | Effect |
|---|---|---|
DYNODB_ |
120s |
Keep-alive timeout. Keep it above every client and load-balancer idle timeout (AWS SDK for Go v2: 90 s). |
The data listener allows 10 s for headers and the TLS handshake, and 60 s
for the request. A late body returns 408 RequestTimeoutException; no part
of the incomplete body runs. Standard and adaptive SDK retry modes treat
this as retryable (botocore legacy mode does not; other SDKs vary).
The response write timeout is the greater of 120 s and
DYNODB_OPERATION_TIMEOUT plus 60 s. CreateBackup,
RestoreTableFromBackup, and RestoreTableToPointInTime keep their 5-minute
operation budget and get the same response margin beyond it. Unset the
retired DYNODB_WRITE_TIMEOUT; a legacy duration equal to the derived timeout
still starts, and a different value stops startup.
Compiled-in limits: 16 KiB for the request line and for the headers, and
16 MiB for the body, raw and decompressed. A request head above 68 KiB gets
431 and the connection closes. The fast engine notices a client
disconnect once the request has run for 5 ms.
TLS¶
See the TLS settings and reload code.
| Variable | Default | Effect |
|---|---|---|
DYNODB_, DYNODB_ |
unset | PEM certificate chain and key for TLS on the data listener. Set both, or startup fails. |
DYNODB_ |
unset | PEM CA bundle. Clients must then present a certificate from it (mutual TLS). |
DYNODB_ |
1.2 |
1.2 or 1.3. |
DYNODB_ |
0 |
1 serves the operations listener over TLS with the same certificate. |
DYNODB_ |
unset | Production: 1 states that a proxy terminates TLS. Required without in-process TLS. Not checked. |
Credentials¶
See credential file validation and the production startup checks.
| Variable | Default | Effect |
|---|---|---|
DYNODB_ |
unset | Absolute path to a credentials file, mode 0600 or 0400. Reloaded on SIGHUP. Wins over DYNODB_. |
DYNODB_ |
None: development accepts any access key and does not check signatures | Comma-separated key:secret pairs, read once. Production: custom keys, secrets of 32 bytes or more. See credential checks. |
FoundationDB client¶
| Variable | Default | Effect |
|---|---|---|
FDB_ |
client default | The cluster file. fdyno must be able to replace it; see the cluster file. Production: an absolute path. |
DYNODB_ |
unset | Production: 1 allows an unreplaceable cluster file, so a restart after a coordinator change can fail. |
DYNODB_ |
unset | Data-center ID of this process. The client prefers storage replicas there. |
DYNODB_ |
unset | Zone ID of this process. The client prefers same-zone replicas first. |
DYNODB_FDB_PRESSURE_THROTTLE and DYNODB_FDB_OUTAGE_FAST_FAIL are retired.
fdyno never cancels a read-version request it already sent: the request waits
until its time budget or the client's cancellation. If either variable is set
to a nonblank value other than 0, startup exits 1 before it opens FoundationDB, and the
error names the variable. Unset it.
DYNODB_FDB_GRV_SHADOW is retired too. It only counted what an
arrival-time admission policy would reject, and no such policy exists. If it is
set to a nonblank value other than 0, startup exits 1 in the same way.
Locality IDs are a read preference; they do not change consistency. The
FoundationDB client also reads its own FDB_NETWORK_OPTION_* variables.
Unless FLOW_PROFILER_ENABLED is set, fdyno sets the client knob
run_loop_profiling_interval=0. The 7.3.51 client source shows that this skips two pthread_sigmask calls per network-thread loop.
No syscall trace was taken. A knob that fdyno sets replaces the same knob
in FDB_NETWORK_OPTION_KNOB.
Reads and writes¶
The performance page explains when the experimental settings help.
DYNODB_READ_COALESCE is retired, with DYNODB_READ_COALESCE_INFLIGHT. Each
GetItem, Query page and Scan page is read in its own transaction.
DYNODB_READ_COALESCE may be unset, blank or set to 0, off, false or no. Any
other value makes startup exit 1 before it opens FoundationDB, and the error
names the variable. Unset it. DYNODB_READ_COALESCE_INFLIGHT is ignored.
DYNODB_WRITE_COALESCE is retired, with DYNODB_WRITE_COALESCE_MAX_OPS,
DYNODB_WRITE_COALESCE_MAX_BYTES and DYNODB_WRITE_COALESCE_INFLIGHT. Each
write to a different item commits in its own transaction.
DYNODB_WRITE_COALESCE may be unset, blank or set to 0, off, false or no. Any
other value makes startup exit 1 before it opens FoundationDB, and the error
names the variable. Unset it. The three size settings are ignored.
Streams¶
| Variable | Default | Effect |
|---|---|---|
DYNODB_ |
1 |
Shard count of a newly enabled stream, 1 to 100. See shards. |
DYNODB_ |
15m |
Shard iterator lifetime. Production: must be 15m. |
DYNODB_ |
1048576 |
Per-shard record bytes/s above which a stream's shards double; 0 or off disables. |
DYNODB_STREAMS_GETRECORDS_WAIT_MS is retired. An empty GetRecords
returns at once, as in DynamoDB (empty reads). 0
still starts; any other nonblank value stops startup, and the error names
the variable.
Background workers¶
See the startup defaults and the worker budgets and cadences.
Every process runs the workers; a lease makes one process the owner of each. The first pass runs one interval after startup, and a pass works for at most half its interval.
| Variable | Default | Effect |
|---|---|---|
DYNODB_ |
1m |
Deletes expired items. off turns it off; production refuses that. |
DYNODB_ |
1m |
An item expires when the local clock passes its TTL plus this margin, so a clock up to the margin ahead never expires it early. Must cover the clock difference; production requires at least 1m. |
DYNODB_ |
5m |
Trims old stream records. Use 1 to 5 minutes. off turns it off; production refuses that. |
DYNODB_ |
24h |
Stream record age before trimming. Production: at least 24h. |
DYNODB_ |
5m |
Extra retention for clock differences. Production: at least 1m. |
DYNODB_ |
10m |
Deletes expired Client records. off turns it off; production refuses that. |
DYNODB_ |
15s |
Advances restore jobs and table exports. |
DYNODB_ |
10m |
Deletes abandoned backup staging data. Each pass checks up to 100 backup directories. |
DYNODB_ |
unset (no exports or imports) | Where Export may write and Import may read, comma-separated: <bucket>=, <bucket>= or s3://. Other buckets fail; a process runs only jobs for buckets it lists. Production: an invalid value stops startup. See export to S3 and import from S3. |
DYNODB_ |
unset (AWS) | Endpoint of an S3-compatible store, with path-style requests. |
DYNODB_ |
unset (system temp) | Absolute writable directory for verified file:// import snapshots. Use a disk-backed volume with room for one whole source object; /tmp may be RAM-backed. S3 imports stream without this copy. Scratch creation/write failures end the import with a clear Import. A relative setting stops production startup. |
DYNODB_ |
us-east-1 |
Signing region for S3 destinations and sources. Credentials come from the process's AWS credential chain. |
DYNODB_REGION, DYNODB_GLOBAL_TABLE_REPLICAS and
DYNODB_GLOBAL_TABLE_WITNESS are retired with
global tables: any nonblank value stops startup in every
profile.
DYNODB_OPERATION_RECEIPT_LAYOUT is retired. fdyno no longer writes the
extra record for every write request that this setting arranged. It may be
unset, blank or separate. Any other value makes startup exit 1
before it opens FoundationDB, and the error names the variable. Unset it
before you deploy this binary.
DYNODB_BACKUP_CONSISTENCY is retired. Every backup first reads at one
read version and changes to fresh read versions only if that version ages
out. Such a backup is reported as ROLLING
(backup consistency). snapshot still starts; any other
nonblank value stops startup, and the error names the variable.
Logs and diagnostics¶
| Variable | Default | Effect |
|---|---|---|
DYNODB_ |
info |
debug, info, warn or error. |
DYNODB_ |
unset | Any value writes one access record per request. |
DYNODB_ |
unset (off) | Reads FoundationDB status at this interval for the cluster health gauges; enable on a few processes, for example 15s. |
DYNODB_ |
0 (off) |
Records slow requests over this many ms, with phase timings. Requests keep their paths: it adds only timing. |
Go runtime¶
| Variable | Default | Effect |
|---|---|---|
GOGC, GOMEMLIMIT |
Go defaults | Go collector settings. Measure p99 latency before you change them. |