Overload¶
This page tells you what a client sees when the load is more than the cluster can take. It also tells you how this differs from DynamoDB, and how to pace a bulk load. Every number names its run. [UNMEASURED] marks each part that no run has measured.
DynamoDB: over a limit ──> fast 400 throttle (milliseconds) ──> the SDK backs off and retries
fdyno: over capacity ──> FoundationDB Ratekeeper slows read versions
──> requests wait (latency grows, up to DYNODB_OPERATION_TIMEOUT, 30 s)
──> then 400 ThrottlingException (definitely not committed),
or the client's own timeout ends first (outcome unknown to the client)
- fdyno pushes back with latency first, not with fast errors. Ratekeeper limits the transaction rate, and requests wait for a read version until their time budget ends.
- Fast 400 errors come only from the same-item queue,
from the GSI backlog throttle, and from
DYNODB_MAX_INFLIGHT(off by default). - What happens when the budget ends is in Writes.
What a client sees, by cause¶
| Cause | What the client sees | Error | Run |
|---|---|---|---|
Storage or log disks are full of work: Ratekeeper limits on storage_, storage_ or log_ |
Latency grows to seconds | When the budget ends with no commit sent: 400 Throttling, Foundation (Account) |
fdhl4 (12 storage hosts, build 9ab63244, an unpaced bulk load): Ratekeeper cut the transaction limit to ~200/s, then to ~40/s after the load stopped. Data-plane error counts were not kept. [UNMEASURED] |
| Storage CPU is full (one storage process at 100%) | Latency grows to seconds. SDK retries hide most throttles. | Mostly the client's own timeout, and a few final 400 Throttling |
w1 A1 (one host, build bd93524f, 4,000 G1 writes/s): 3,812 answered/s; 16 final Throttling; 287 client timeouts with an unknown outcome |
| The GSI apply is behind (its backlog age passes the throttle age, often because storage is overloaded) | Writes that change a GSI entry are refused. Other writes go on. | 400 Throttling with one Index reason per index, as DynamoDB's GSI back-pressure |
fdhl5 (12 storage hosts, build 9ab63244, one storage host lost at 8,000 writes/s): 3.2% of writes failed after the SDK's retries; no check failed |
| One hot item | Fast refusal when the projected wait passes the deadline | 400 Provisioned, Table |
Hot items. The rate at which refusals start: [UNMEASURED] |
DYNODB_ is set and full |
Fast refusal | 400 Throttling |
Off by default. Its effect on a fleet: [UNMEASURED] |
| A commit outcome is unknown | One request fails | 500 Internal, The write may or may not have been applied |
See unknown write outcomes |
| Control-plane calls during data-plane overload | List and Describe time out. Background workers fall behind. |
Today: 500 Internal, The request timed out before its write was sent. This is not DynamoDB's error for this case. A fix is not released yet. |
fdhl4: 3 List errors; 1,028 worker failures |
What is slowed first:
- Every read and write needs a read version, so Ratekeeper slows them all. Eventually consistent reads are slowed too.
- Background work (GSI apply, TTL, PITR trim, stream splits) runs at batch priority, so it is slowed first. After a delay, it moves to default priority and competes with client requests. See when cleanup moves to default priority.
- Control-plane calls share the default queue with client requests.
How this differs from DynamoDB¶
| DynamoDB | fdyno | |
|---|---|---|
| Per-partition limit | 1,000 WCU and 3,000 RCU per partition (AWS docs) | No per-partition cap. FoundationDB splits hot ranges. One item is bound by the same-item queue. |
| Table limit | Provisioned capacity or the on-demand maximum. A probe in us-west-2 with an On maximum of 1 got 400 Throttling with Table. |
No per-table limit. The limit is the cluster: storage disk IOPS and storage CPU (Capacity planning). |
| Warm-up | New tables and peaks follow previous-peak rules and warm throughput (AWS docs) | No warm-up. Capacity is what the cluster has. Adding storage hosts moves data. |
| Over the limit | Fast 400, in milliseconds | Latency first (up to 30 s), then a 400 |
| Control plane | An account-wide rate. A probe at ~2,100 calls/s got 400 Throttling The rate of control plane requests made by this account is too high. |
No control-plane rate limit. It shares FoundationDB with the data plane and can time out under data-plane overload (above). |
| Unknown outcome | 500, applied or not | 500, applied once or not at all |
What to set in the client¶
- Keep SDK retries on (standard or adaptive mode). fdyno never commits a
request that it answers with
ThrottlingExceptionorProvisionedThroughputExceededException. - Set the client's per-attempt timeout above fdyno's budget: above
DYNODB_OPERATION_TIMEOUT(30 s), plus a few seconds. If the client times out first, a write in flight can still commit. A retry can then apply a non-idempotent update twice. The other option is to lowerDYNODB_OPERATION_TIMEOUTbelow the client timeout, so throttles come sooner. - For counters (
ADD,list_append), a retry after a 500 or a client timeout can apply twice, as in DynamoDB. Use a condition on a version attribute, orTransactWriteItemswithClientRequestToken. See which writes are safe to repeat. - To get fast throttles instead of waiting, set
DYNODB_MAX_INFLIGHTper process. A good value and its effect on throughput: [UNMEASURED].
Pace a bulk load¶
Do not load without a pace limit. In fdhl4, an unpaced load of
40,000-byte items on 12 storage hosts had these effects:
- Ratekeeper cut the transaction limit to ~200/s;
- storage fell behind, and kept falling behind for 3 minutes after the load stopped;
- the control plane and the background workers starved.
Run (12 i4i.xlarge storage hosts, build 9ab63244) |
User item bytes per storage host | Result |
|---|---|---|
fdhl5, paced, 40,000-byte items, 1,004 s |
~10 MB/s | Clean: Ratekeeper reported workload in every sample, and storage did not fall behind |
fdhl4, unpaced |
19–23 MB/s stored (an upper bound: the cluster was overloaded) | Overloaded (above) |
- Load at 10 MB/s or less of item bytes per storage host.
- Do not go near 20 MB/s per storage host.
- The exact limit between the two: [UNMEASURED].
- Slow or stop the loader when
fdyno_fdb_status_ratekeeper_limited_byis notworkloadfor 30 s, or whenfdyno_fdb_status_storage_data_lag_secondsis above 10 s.
The signals to watch are in the runbook: the cluster is overloaded.