Synthesis and Self-Test

Synthesis

The parts of this guide aren't independent facts — each one's guarantee is paid for, or constrained by, a cost that shows up in a different part.

1. Storage Engine and Replication's leader-based replication is why The Consistency Model's strong-consistency story is cheap — and why What Is DynamoDB and Partitioning and Request Routing's restricted query model exists at all. Because every partition has exactly one authoritative leader, a strongly consistent read never needs to compare replicas or trigger repair (unlike Cassandra's quorum-and-reconcile approach). But that same leader-per-partition design is precisely what makes cross-partition coordination (joins, scatter-gather queries) expensive and latency-variable to offer — coordinating multiple leaders for one logical query would reintroduce the tail-latency unpredictability the whole leader-based design exists to avoid. The restricted query model of the What Is DynamoDB part is not a separate product decision from the replication model of the Storage Engine and Replication part — it's the same decision, viewed from two angles.

2. Adaptive Capacity and Hot Partitions's hard per-partition ceiling (3,000 RCU/1,000 WCU) is the reason Single-table design obsesses over key cardinality. The adjacency-list pattern's core move — grouping related items under one partition key for one-round-trip reads — is in direct tension with the fact that a partition key is atomic and cannot be split (Partitioning and Request Routing's "split for heat" only helps when heat spreads across a key range, not when it concentrates on one key value). A single-table design that groups too much under one key (a huge org, a viral item, a global leaderboard) walks straight into the ceiling Adaptive Capacity and Hot Partitions describes, and no amount of adaptive capacity or provisioned throughput at the table level buys a way out.

3. DynamoDB Streams's per-item ordering and exactly-once delivery is the literal transport layer underneath Global Tables. MREC replication isn't a separate replication protocol — it's DynamoDB Streams, consumed by a managed replication engine, applying changes to other regions via last-writer-wins conditional writes. This means DynamoDB Streams's failure modes (a wedged shard, the 24-hour retention window) are directly inheritable by Global Tables: a stuck or backlogged stream consumer isn't just a CDC-pipeline problem, it's a cross-region replication problem, silently.

4. The Consistency Model's GSI consistency gap resurfaces as Single-table design's core cost. The very technique that lets single-table design serve many access patterns from one table (spreading them across the base table and several GSIs) is the same technique that guarantees those access patterns don't all carry the same consistency guarantee. You cannot get the "many access patterns from one table" payoff of the Single-table design part without also inheriting the "not all of them are strongly consistent" cost of the Consistency Model part — they are the same mechanism.

5. Global Tables's MRSC witness-replica design is Storage Engine and Replication's Multi-Paxos quorum idea, scaled from intra-region to inter-region. A log replica (see Storage Engine and Replication) lets a replication group maintain quorum durability cheaply, without every member storing the full dataset. MRSC's witness replica does the identical thing across a Global Table's three regions — a vote-carrying, data-holding-but-non-read-serving participant that completes a 2-of-3 quorum without the cost of a third full replica. Understanding the log-replica mechanic in the Storage Engine and Replication part is what makes MRSC's topology requirement ("exactly 3 regions, or 2 + a witness") legible instead of an arbitrary product constraint.

Self-Test

1. A team's DynamoDB table shows ConsumedWriteCapacityUnits at 4% of its 500,000 WCU provisioned capacity, yet users report intermittent ProvisionedThroughputExceededException errors during traffic spikes. The on-call engineer insists "we have tons of headroom, this can't be a capacity problem." Using Partitioning and Request Routing and Adaptive Capacity and Hot Partitions, explain precisely why both statements can be true simultaneously, and name the specific metric that would have caught this before users did.

2. A Global Table (MREC, default mode) spans us-east-1 and eu-west-1. A TransactWriteItems call updates an order's status to PAID in us-east-1. 200ms later, before replication completes, a separate process in eu-west-1 updates the same item's status to CANCELLED. Using Global Tables, describe exactly what each region sees immediately after each write, what the two regions eventually converge to, and whether the transactional atomicity from us-east-1's write is preserved globally. Then explain what changes if the table uses MRSC instead.

3. Explain, using Partitioning and Request Routing through The Consistency Model, why a Global Secondary Index cannot support a strongly consistent read in principle — not as a missing feature, but as a structural consequence of how GSIs are built. Contrast with why a Local Secondary Index can.

4. A team launches a single-table-designed application. Eight months later, product asks for a new report: "list all orders for a given shipping carrier, across all customers." Using Single-table design, explain concretely why this is a nontrivial, potentially expensive change in DynamoDB, in a way it would not be in Postgres — and name the two realistic remediation paths.

5. Using Storage Engine and Replication and The Consistency Model, explain mechanically why DynamoDB's eventually consistent read has a bounded staleness window (typically single-digit milliseconds), while Cassandra's eventual consistency, absent a triggered read-repair, can in principle remain stale indefinitely. What structural property of DynamoDB's replication model creates that bound?

6. A Lambda function consuming a DynamoDB Streams shard throws an unhandled exception processing record #500 in a batch, and no dead-letter queue is configured. Using DynamoDB Streams, describe precisely what is and isn't guaranteed about records #1–499 and about record #501 onward over the next 24 hours, and explain why this failure mode is strictly worse here than in a system with multi-day retention.

Answers

1. ConsumedWriteCapacityUnits at the table level is a sum across every partition (see Adaptive Capacity and Hot Partitions) — a single partition throttling at its hard 1,000 WCU ceiling is invisible in that aggregate if the table has many other, healthy partitions diluting the average. This happens when one partition key (or a narrow, poorly-shard range of keys) absorbs disproportionate traffic — e.g., a hot customer, a coarse status field, a time-bucketed "today" key. Both statements are true: the table has 96% headroom, and the one partition serving the hot key is fully saturated at its immovable ceiling, which no amount of table-level provisioned capacity can raise (Adaptive Capacity and Hot Partitions's "the ceiling never moved"). The metric that would have caught it: WriteThrottleEvents (and ReadThrottleEvents), which fire on a per-request throttle regardless of aggregate table utilization — unlike ConsumedWriteCapacityUnits, they don't average away the problem.

2. Immediately after each write: us-east-1 locally sees status = PAID (its own region's write commits synchronously, per the Storage Engine and Replication part and The Consistency Model's intra-region strong consistency). eu-west-1 locally sees status = CANCELLED for the same reason. Neither region has yet seen the other's write — this is the MREC async replication window (typically sub-second, not bounded). Both writes propagate via Streams (see DynamoDB Streams) to the replication engine, which applies last-writer-wins by comparing aws:rep:updatetime. Whichever write has the later timestamp wins globally — both regions eventually converge to either PAID or CANCELLED, whichever timestamp was higher, with no merge and no notification to the "losing" writer that its change was discarded. Crucially: TransactWriteItems' atomicity guarantee was real and honored within us-east-1 at the moment it committed (any other items in that same transaction committed together, atomically, in that region) — but that guarantee says nothing about what happens to the resulting item state once it's replicated and potentially overwritten by a concurrent write elsewhere; transactional atomicity does not extend across Global Table regions (Global Tables's stated invariant). Under MRSC instead: the us-east-1 write would not have been acknowledged to the client until it was synchronously durable in a quorum across regions, and the eu-west-1 process's concurrent write would be ordered relative to it by the same synchronous quorum mechanism rather than racing timestamps — eliminating the silent-overwrite risk, at the cost of us-east-1's write now paying a cross-region round-trip latency it didn't pay under MREC.

3. A GSI is not part of the base table's replication group — it is entirely separate partition infrastructure (see The Consistency Model), updated only after the base table's write commits, via asynchronous propagation. Strong consistency (see Storage Engine and Replication and The Consistency Model) works by routing a read directly to the single Multi-Paxos-elected leader of the partition holding the authoritative, most-recently-acknowledged state. A GSI's partitions have no such leader relationship to the base table's partitions — there is no "leader" to ask that is guaranteed to reflect the base table's latest write, because the GSI's own replicas only know what's been asynchronously propagated to them so far. There is structurally nothing to route a "strong" read to. An LSI, by contrast, shares the base table item's own partition and replication group (same partition key), so an LSI read can be routed to that same leader and get the same freshness guarantee as a base-table strong read — the LSI is a different sort-key view onto data that lives in the same leader-controlled replica set, not a separately replicated copy.

4. In Postgres, "orders by shipping carrier across all customers" is SELECT * FROM orders WHERE carrier = ? — trivially served by adding a standard index on carrier if one doesn't exist, because the query planner and secondary-index mechanism are general-purpose and were never restricted to patterns anticipated at schema-design time (see What Is DynamoDB). In the single-table DynamoDB design, "carrier" was never modeled as a queryable dimension because it wasn't one of the access patterns enumerated at design time (see Single-table design) — there's no general secondary-index mechanism that lets you query by an arbitrary new attribute after the fact without deliberately adding infrastructure for it. The two realistic remediation paths: (a) add a new GSI keyed on carrier (accepting an asynchronous backfill that burns real WCU across the whole table and only serves future queries, plus the new GSI inherits the eventual-consistency-only limitation of the Consistency Model part), or (b) stream the change data out via DynamoDB Streams (see DynamoDB Streams) into a genuinely analytical store (Redshift, Athena-over-S3-export, OpenSearch) and serve this and future ad-hoc reporting needs from there instead of forcing it back into the operational table.

5. DynamoDB's eventually consistent read can hit any replica in a partition's replication group, but every replica in that group is receiving the same leader-originated, Multi-Paxos-ordered write stream (see Storage Engine and Replication) — a follower's staleness is bounded purely by how far behind it is in applying that one ordered log, which under normal operation is milliseconds. Cassandra's eventual consistency has no equivalent forcing function: a replica that a coordinator wrote to asynchronously (below the write's consistency level, or simply a replica outside the write's quorum) has no guaranteed mechanism pulling it up to date except read-repair (triggered probabilistically, only when that specific replica happens to be queried and compared against others) or a scheduled anti-entropy repair (which may run on a multi-day cadence). Absent one of those triggers actually touching that replica, its staleness has no enforced upper bound — it can sit stale indefinitely. DynamoDB's bound exists because there is one linear, leader-ordered log every replica is continuously draining (see Storage Engine and Replication); Cassandra's lack of a bound exists because there is no single ordered log — only independent per-replica write histories that converge only when something explicitly reconciles them.

6. Records #1–499 in that batch are unaffected — Lambda's DynamoDB Streams integration processes and commits progress per batch/checkpoint, and DynamoDB Streams's per-item, per-shard ordering guarantee means those records' relative order and delivery are preserved regardless of what happens to record #500. Record #500 itself: without a dead-letter queue or a bounded retry/bisect configuration, the default behavior retries the failing record indefinitely, and because ordering within a shard is strict (see DynamoDB Streams), no record after #500 in that shard is processed until #500 is resolved — the shard is effectively wedged. If this persists, the 24-hour retention window keeps ticking regardless of consumption progress; any record — #500 itself, or #501 onward stuck behind it — that ages past 24 hours is permanently and silently deleted, not merely delayed. This is strictly worse than a system with multi-day or configurable retention (e.g., plain Kinesis, or Kafka with typical multi-day/week retention) because there operators have a wider window to notice the stuck consumer and intervene before data is unrecoverably gone; DynamoDB Streams' fixed 24-hour ceiling gives meaningfully less slack for the same class of failure.