Volume I · Part II · Chapter 12

Databases and Data-Bound Technologies

Timothy O’Brien 24 min read Free online

I once designed a transactional schema around the work I understood the application needed to do. Then people wanted reports. Of course they did. For a while the database did both jobs, and by the time it was spending 80 percent of its time updating an index, our downtime and project constraints made a change difficult. We started looking at faster storage.

I’d like to tell you I saw the problem right away. The eventual response included a separate reporting path. What stayed with me was how far the work had moved beyond the assumptions I’d designed for.1 A user-count forecast would have told us very little about that change. I’d have learned more by asking what they needed to know, and when the reports had to run alongside the transactions.

Data capacity is where the real fun begins for me. You could fill another book with what happens on these machines. Here I want the capacity team to follow a specialist’s explanation far enough to ask what work can share the machines and what we’d have to rebuild on a bad day. When the evidence is consequential or contested, we need a qualified person to check it. Volume II, Chapter 17 returns to that partnership.

How to read this chapter

Follow what happens when somebody asks to keep more history. In Cassandra it can make one customer’s partition difficult to move. In Kafka it can give a reader longer to come back. In PostgreSQL it can turn an ordinary search into a reason to change a large table. The work of keeping that history tells us more about the purchase than the number of stored bytes alone.

Plan the work as well as the space

Suppose someone asks for more storage. I want to know what data and copies the service has to keep, and what it does with them on an ordinary day. Then I want to know where the work can run when a node fails and how much time we have to recover. Ten free terabytes on a different node won’t help the busiest partition. They won’t speed up a transfer that is already waiting on the network either.

It is possible to oversize on the strength of those questions. Before paying for every operation to run at its maximum at once, ask which jobs can wait for each other. Then ask what could take away the option to wait.

The database a proof of concept outgrows

A familiar path starts with a proof of concept. Ten people use it, then 10,000, on Oracle or Postgres, and the database works fine. Then a million people arrive over a month or two. I’d look at what those people ask the database to do before deciding what has to change. A larger machine can buy time if the work fits on one server and that server is running out of room. It can also leave the team hunting for an unusually large VM every time it moves, replaces, or expands the system. Sharding can spread the work, if the team can split the data and serve most requests without reaching across the split.

Switching from a relational database to a NoSQL one takes weeks or months of engineering, and the migration runs old and new systems side by side, the double bubble whose economics Chapter 13 works through. The worst cases postpone that transition until the delay has cost millions of dollars in large SKUs.

So if you’re building a system that has to scale, my judgment is to start with something designed to scale out, such as Cosmos DB or Spanner. That isn’t a claim that relational databases can’t scale; Spanner is relational.2 Postgres is a respectable choice, and AlloyDB is a good one when the workload has to be transactional and relational.

At a large organization, ten or twelve databases can shape the capacity plan, with decisions about each worth tens or hundreds of millions of dollars. A service that started on MySQL may end up on Cassandra if the workload mostly reads or writes by key and the team can distribute those keys across machines. I’d want to see which requests can use that design and what happens to the rest before asking the team to run both databases through a migration.

Along the way the capacity team becomes a database expert, whether or not it meant to. For many engineers, databases are one of the weakest areas of knowledge: most of us learned schemas, keys and normalization in school, and much of that doesn’t hold at web scale. That is no criticism of whoever chose the proof of concept’s database, which worked when they chose it. But the capacity team is often asked to compensate, with hardware and headroom, for a selection that no longer fits, when the lasting answer is engineering work by the team that owns the system.

Petabytes that don’t belong in a database

For a database measured in petabytes, my first questions are about the data. How often is it queried? Do we need all of it at once? Are we indexing it? Could it live in object storage, such as Google Cloud Storage or Amazon S3, instead? The prices make those questions worth asking. On October 4, 2026, in Google Cloud’s Iowa region, Cloud Storage Standard listed at $0.02 per GiB-month and Spanner’s regional SSD storage at $0.30 per GiB-month, a price that covers Spanner’s three replicas.3 A pebibyte is 1,048,576 GiB, so it costs 1,048,576 × $0.02 ≈ $21,000 a month in object storage and 1,048,576 × $0.30 ≈ $315,000 a month in Spanner storage, fifteen times as much before Spanner’s compute. At up to 10 TiB of storage per node, a pebibyte needs at least 103 nodes, roughly another $68,000 a month at the Standard edition’s $0.90 per node-hour. Data that is rarely read can go colder still, with retrieval charges that the access pattern decides. Spanner’s price buys a transactional, replicated, queryable store; the question is whether every byte needs one.

The distance between the application and its database

I have seen many cases where the database stayed in a private data center, because that was thought to be cheaper, while the application moved to a public cloud. A couple of milliseconds between them looks harmless on a network diagram, but an application rarely makes one database call per user action. Take an illustrative page that makes 50 sequential queries: across a 2-millisecond round trip it waits 100 milliseconds, which nobody notices. An object-relational mapper that loads a 1,000-row list one row at a time makes 1,000 calls and waits 2 seconds; a report that does the same for 10,000 rows waits 20. At a quarter of a millisecond per round trip inside one data center, the list would have waited a quarter of a second. Before moving either half, count the round trips per user action, not just the latency of one.

A team can also underestimate the distance between the copies of a database. A write that needs confirmation from another region has to wait for at least one round trip before the application can say it succeeded. Light in optical fiber covers about 204 kilometers per millisecond, roughly two-thirds of its speed in a vacuum. Microsoft publishes a median round trip of 67 to 69 milliseconds between its East US and West US regions.4 Before we promise customers a response time, I want the specialist to show us which writes wait for a distant copy and which can finish locally.

Cassandra: the data model is part of the capacity plan

The Cassandra cluster in the Introduction had low average CPU use and free disk space. I can see why somebody would want to shrink it. Before I take away a machine, I want to see whether it can keep serving customers while it compacts files, repairs replicas or recovers from a failure. A large cluster can look idle to the team that runs the web fleet. I’d ask more questions before making 80 or 90 percent CPU their target for this database. You don’t run a large Cassandra cluster at 80 percent CPU.

Cassandra’s partition key determines how data is grouped into partitions. Rows sharing that key stay together on their replica nodes, so adding nodes does not subdivide the partition. The project’s modeling guidance starts with the queries the application needs to support.5 That makes the distribution of partition sizes and activity much more interesting to me than the result of dividing total bytes by node count.

Imagine a design that groups customer events by customer identifier. Most customers are small, but one begins sending many more events and retaining years of history. The cluster average can remain reassuring while the team has to decide whether to change partitioning, change the access pattern, or establish that the existing placement can carry that customer’s growth. Buying nodes may be part of the response, but nobody has yet explained what they would change for the difficult partition.

There is also work behind the foreground request. Cassandra writes immutable files called SSTables and compacts them into new files, during which the old inputs and the replacement output coexist on disk. A delete is itself a write, a marker called a tombstone, which compaction can drop only after the table’s gc_grace_seconds has passed (ten days by default) and only alongside every file holding the older data it shadows.6 A customer planning to delete records has therefore supplied useful demand intelligence, but the first effect on storage is more data, and the fall comes later and unevenly.

Repair ties that grace period to a schedule. It compares replicas and streams the differences, which can consume substantial disk and network I/O, and it has to keep pace with the grace period or a replica that missed a delete can bring the data back. With the ten-day default, the documentation suggests repairing every node at least once every seven days to leave slack.7 That is recurring work with a deadline, competing with customer traffic. Before somebody shortens gc_grace_seconds to recover space sooner, I want the specialist to explain what repair has completed, what remains, and whether deleted data could reappear.

Enough space to change the cluster

Take a deliberately simplified six-node cluster in which one copy of retained data occupies 24 TiB after encoding and compression, and three copies are required. The baseline is 24 × 3 = 72 TiB, excluding indexes, logs, snapshots, and temporary work. Starting from the retained physical representation matters here; multiplying application payload bytes by three would not necessarily describe the same quantity.

Now add 2 TiB of retained data per month before replication. Over two months, growth contributes 2 × 2 × 3 = 12 TiB, giving an 84 TiB baseline, or 84 ÷ 6 = 14 TiB per node if placement were perfectly even. We have assumed linear growth and unchanged retention, compression, and behavior, and still need to check how those bytes are actually placed. The existence of room somewhere in the cluster does not establish room on the node that needs it.

Expanding the cluster also requires resources. A joining Cassandra node takes responsibility for token ranges and streams their data from current replicas.8 If a seventh node joins at that point, an even share is 84 ÷ 7 = 12 TiB. At an illustrative sustained effective rate of 200 MiB/s, transfer alone takes:

12×1,048,576 MiB200 MiB/s×3,600 s/hour≈17.5 hours. \frac{12\times1{,}048{,}576\text{ MiB}}{200\text{ MiB/s}\times3{,}600\text{ s/hour}}\approx17.5\text{ hours}.

A four-hour window would take about 874 MiB/s: 12 × 1,048,576 ÷ (4 × 3,600). Both rates in this example are hypothetical. Allow time for preparation, interruptions and validation in either case. What I would ask the specialist to measure is how fast we can move data while serving customers, because a link’s rated speed won’t tell us when the job finishes.

Nor does the join free space by itself. Cassandra leaves the transferred data on the original nodes, still counted against their load, until nodetool cleanup runs on each of them, and cleanup is another compaction.9 Each original node drops from about 14 TiB to 12 TiB only when that work finishes.

The busiest existing nodes have to do some of the work of adding a node. Pick a start date while they still have room to do it. If the customer’s history grows faster or the measured transfer rate comes in lower, that date can move forward while an aggregate disk gauge still looks comfortable.

Turn the growth estimate into an experiment

Cassandra’s native table metrics separate live SSTable disk use from total use, which includes obsolete files awaiting removal, and report pending compactions and local latency.10 The gap between live and total is space compaction has not yet returned, although a count of pending compactions still needs interpretation before it becomes a completion-time estimate.

For the growing customer, replay the skew in the data as well as the new request rate. Keep the schema, replication and consistency settings and the state of maintenance with the result. I want to see what the busiest replicas did while data was moving or compaction was running, because their customers have to live through that part of the change too.

The project’s cassandra-stress tool runs user-defined profiles against a team’s own tables and queries, although its current documentation marks it deprecated and recommends NoSQLBench instead.11 Either gives the team a way to represent the difficult partition instead of congratulating itself on a default workload that avoids it.

If finishing the expansion in time requires slowing a customer’s work, the customer’s agreement belongs in the plan. Knowing how to carry out the technical procedure does not give us permission to change the service along the way.

Kafka: retention is a promise to a future reader

A Kafka consumer tracks its position in a partition’s log and can return to earlier positions to read retained records again. Consuming a record does not instruct Kafka to delete it. Under the delete policy, retention limits govern deletion, while log compaction preserves the latest value for a key rather than a complete event history.12 Before estimating storage, I want to know which of those things the customer expects to have available when they return.

Kafka’s configuration reference describes retention.ms as “an SLA on how soon consumers must read their data.” The settings that keep that promise deserve as much scrutiny as the stated intention: time and size limits can each trigger deletion, retention.bytes applies per partition, and cleanup removes whole log segments rather than each record exactly on its birthday.13 A request for a number of days of history therefore needs to be checked against the actual settings and workload before we turn it into an assured replay window.

For a delete-policy example without tiered storage, assume an aggregate append rate of 10 MiB/s measured in its stored representation, seven days of retention, and three replicas. The simplified retained-log estimate is:

10 MiB/s×(7×86,400 s)×3=18,144,000 MiB≈17.3 TiB. 10\text{ MiB/s}\times(7\times86{,}400\text{ s})\times3 =18{,}144{,}000\text{ MiB}\approx17.3\text{ TiB}.

We divide by 1,048,576 to convert to TiB. The estimate assumes stable traffic and no earlier size-based deletion; it leaves out indexes, segment cleanup delay, operational logs, movement, and reserve. It is a baseline for investigating a disk allocation, not the allocation.

In that same model, retaining fourteen days instead of seven doubles the baseline to about 34.6 TiB once the additional history accumulates. A seemingly modest request to give the team another week to recover has changed capacity without changing the live event rate at all.

Catching up is a different workload

Retention lets a future reader return, but reading the accumulated work still takes time. Consider a separate replay example with 2 TiB left to process. New work arrives at 20 MiB/s, and representative testing establishes effective processing of 60 MiB/s in the same input-byte units. The net catch-up rate is 60 − 20 = 40 MiB/s, giving:

2×1,048,57640×3,600≈14.6 hours. \frac{2\times1{,}048{,}576}{40\times3{,}600}\approx14.6\text{ hours}.

Using 60 MiB/s as the denominator would make the answer more appealing by forgetting the work that arrives during recovery. If processing falls to the arrival rate, the constant-rate model never clears the backlog; below that rate, the backlog grows. We also need the age of the oldest required record and its remaining retention, because comparing recovery time with a nominal retention duration ignores how much of that duration has already passed.

Adding consumers is not an answer we can assume will work. In a traditional consumer group, each partition has exactly one reader at a time, so extra consumers sit idle and a hot partition stays with one reader. Share groups, production-ready since Kafka 4.2, let several consumers take records from the same partition, but the proposal that introduced them says records can then arrive out of order.14 That suits independent tasks and not a consumer rebuilding a database from a change log, so the team needs to know which model it is using before claiming any concurrency.

If the consumer is rebuilding a database, our catch-up rate matters only if that database can accept the work while carrying its existing customers. I would want an end-to-end rate, an agreed impact on live service, and a deadline, with someone able to slow competing work if the plan requires it.

Observe the whole delivery path

Kafka’s monitoring reference separates broker measurements, such as the count of under-replicated partitions and request-handler idle time, from client measurements such as records-lag-max, which the consumer publishes rather than the broker.15 Those distinctions help us follow the work: a producer acknowledgment, a consumer position, and a completed operation in the destination describe different stages. Blending them into one throughput number makes a slow destination look like successful delivery.

A load test for that slow destination needs the real distribution of keys and record sizes, the same acknowledgment and replication setup, and a destination that behaves like the one we plan to use. OpenMessaging Benchmark can set message size, partitions, producer rate and a consumer backlog in gigabytes.16 That gives the specialist a way to recreate the replay example above and see where delivery waits.

Placement raises the Cassandra question again. Cruise Control models Kafka resources and rebalance goals, including capacity and replica placement,17 and I would ask the specialist to explain the movement required to reach its proposed arrangement as well as the arrangement itself; the move may be exactly what an already constrained cluster cannot accommodate.

In our portfolio, the web workers’ headroom cannot be spent on the brokers or the destination database, so a staged product launch may need its own schedule for replay or migration.

Azure Event Hubs shows how a managed service changes that boundary. It offers a Kafka-protocol endpoint on its Standard, Premium and Dedicated tiers while Microsoft operates the brokers, so the tier’s limits replace the three-replica disk estimate.18 Standard keeps events for at most seven days, which rules it out for the fourteen-day request, and on any tier the catch-up rate, like each Kafka feature the application uses, has to be checked against the tier’s limits or tested.

PostgreSQL: understand the query and the unfinished work

PostgreSQL’s query plans let us examine scans, joins, sorts, and other operations. EXPLAIN ANALYZE runs the statement and reports what actually happened, and in PostgreSQL 18 it includes buffer activity by default; planner costs are arbitrary units, conventionally scaled so that one sequential page fetch costs 1.0, not dollars or promised elapsed time.19 For a consequential query, I would much rather start there than infer its behavior from a machine’s average CPU use.

Suppose an application adds a search across years of customer history. A growing share of requests like that could eat up the web service’s margin from Chapter 5. Try the search with a small customer’s history and then with the largest customer’s, using realistic parameters and data distributions. The plan can tell us whether the second query does more of the same work or whether PostgreSQL chooses a different way to get the answer.

Getting the feature ready is work too. A search across years of history is likely to need a new index on a large table. An ordinary CREATE INDEX blocks inserts, updates and deletes until it finishes, which on a very large table can take many hours; CREATE INDEX CONCURRENTLY lets writes continue but scans the table twice, waits for existing transactions, and adds CPU and I/O load while it runs.20 Afterward the index must be maintained under the live workload, which is where my own schema story went wrong. Chapter 5 asked who holds a lock before anyone buys another core; here, the holder may be our own migration.

Find the expensive work before inventing a remedy

Where pg_stat_statements is already configured, it exposes execution counts, aggregate execution time, block activity, and WAL generation grouped by statement identity.21 This read-only starting query is written for PostgreSQL 18 (stats_since needs 17 or later), assumes the extension is already loaded, and needs pg_read_all_stats or equivalent rights to show other users’ statements. It does not install or configure anything.

SELECT dbid, userid, queryid, toplevel, calls,
       total_exec_time, mean_exec_time,
       rows, wal_bytes, stats_since,
       left(query, 60) AS query_start
FROM pg_stat_statements
ORDER BY total_exec_time DESC
LIMIT 10;

The result identifies statements with the most accumulated execution time, which is a different question from which customer experienced the worst delay. If nested statements are tracked, a function call and the statements inside it both appear, distinguished by toplevel; adding their times together counts the same work twice. A cheap statement executed constantly and an expensive one executed rarely can both deserve attention. I would keep the statistics interval and reset history with the result, then investigate representative parameters with the application owner; the reported mean cannot supply a tail-latency percentile.22

EXPLAIN (ANALYZE, BUFFERS) can then help explain actual behavior for small and large customer histories (the explicit BUFFERS matters only before PostgreSQL 18), but ANALYZE executes the statement, so costly or modifying work belongs in an appropriate controlled environment.23 The reassuring word explain is not a reason to run something casually against production.

pgbench supports custom transaction scripts and rate-controlled workloads; under rate control, its measurements account for scheduled-start delay and can identify skipped late transactions.24 Those capabilities let a specialist investigate the application’s mix and arrival model rather than rely on a default benchmark whose principal virtue is being easy to repeat.

Once the team finds an expensive query, ask them to show what makes it expensive and what their proposed change would disturb. If the fix gives reporting a faster search but makes transactional writes wait, the decision belongs to the people who can weigh those two obligations.

On Azure Database for PostgreSQL flexible server, Query Store can keep query runtime history and, with wait sampling switched on separately, sampled waits. It is opt-in, Microsoft advises against it on the Burstable tier because of its performance impact, and it keeps seven days by default.25 For the history-search launch, it can show which statements changed and what they waited for, if collection starts early enough that the baseline has not aged out.

A deletion does not settle the storage question

PostgreSQL updates and deletes leave old row versions for later reclamation. Routine vacuuming makes that space reusable, and it also freezes old transaction IDs; if freezing falls far enough behind, PostgreSQL stops assigning new ones and accepts only read-only transactions until vacuum catches up. Ordinary VACUUM generally does not return space to the operating system. VACUUM FULL rewrites the table, so it needs room for a complete new copy and an exclusive lock that blocks all other use of the table until it finishes.26

Those mechanisms matter when somebody sets a storage saving against a deletion campaign. Routine vacuuming aims at a steady state rather than a minimum size, and reusable room inside the existing allocation may be exactly what we need if it postpones the next increase. A smaller bill is a different promise. Azure Database for PostgreSQL flexible server can grow provisioned storage but not shrink it; a smaller allocation means a new server and a dump and restore.27 The team can remove obsolete records successfully and keep paying for the same disk.

An inventory can show a detached EBS volume that still costs money. AWS bills provisioned storage even while the volume is unattached.28 Before putting that charge in a savings estimate, find the person who can say whether the data is still needed for recovery or subject to a retention obligation or hold. Agree on which copy stays and who can authorize the deletion. Then look for the change on the bill.

If vacuum or any other maintenance is falling behind, find out what it can finish while the expected customer traffic is running. Knowing that the provider or engine schedules it automatically only tells you where to look.

Replication can turn an outage into a space problem

Replication slots keep PostgreSQL’s write-ahead log, or WAL, until their consumers have received it, and the documentation warns that they can retain enough to fill the space allocated for it. Capping retention with max_slot_wal_keep_size, or with PostgreSQL 18’s idle_replication_slot_timeout, protects the primary’s disk at the cost of any consumer that still needed the removed WAL. The consumer need not be a standby: a logical slot feeding change data capture, perhaps into the Kafka cluster above, holds WAL the same way and also keeps vacuum from removing old system-catalog rows, which in the extreme case leads to the wraparound protection described above.29

Take a constructed scenario generating 40 MiB/s of WAL while a slot makes no progress for six hours. Potential additional retention is 40 × (6 × 3,600) = 864,000 MiB, or about 844 GiB, before pre-existing retained WAL and other files. The rate here is measured WAL generation; application payload and net table growth would be different inputs.

Now the capacity decision needs the owner of the lagging consumer. Can it resume, how quickly can it catch up, and what does the tested rebuild path require if the history it needs is gone?

Recovery is work that has not happened yet

A restore is easy to leave out of a plan for a cluster that has gone a long time without one. Before taking machines away, I’d follow a restore from the backup we could actually use to the first validated request after recovery. The transfer and any replay have to fit alongside whatever work customers are still doing. A restore into an empty test system buys us some evidence, but I’d want to see what happens when the shared resources are busy.

A managed service can do much of that work. I want the provider to do what we bought from it and the application team to know what it has to do afterward. Rebuilding a self-managed operations team to prove we take recovery seriously would be an expensive way to miss the handoff.

For example, Azure Database for PostgreSQL flexible server automates backups and supports point-in-time recovery within a retention period of seven to thirty-five days. The restore creates a new server with the source’s compute and storage configuration rather than overwriting the original, and Microsoft’s post-restore tasks include redirecting clients, re-creating server parameters and firewall and network rules that are not carried over, and configuring high availability, which the restored server lacks.30 The service performs substantial recovery work, while the application team still needs a tested route back to useful service: validation, connection changes and the period of paying for two servers belong in the recovery plan.

That handoff can arise even without a failed database. AWS instructs clients that connect directly to Amazon RDS and verify its database certificate to update their trust stores before changing the database’s certificate authority. AWS also documents automatic rotation of server certificates on supported engines.31 Set the client rollout date before the authority expires and have the application owner test fresh connections on either side of the change. Include the job that connects only once a week. It can be the first to discover the database is healthy but out of reach.

Start from when customers need to be back in service and work backward to when the capacity must be ready. That same reasoning puts a date on the Cassandra expansion, the Kafka replay and the rebuild of the stalled replication consumer. Growth, the measured transfer rate and the deadline can each move it.

Build a data-capacity decision record

A forecast reviewer doesn’t need to know as much about compaction as the Cassandra specialist. They do need to know whether repair and expansion can both finish while the customer keeps using the service. I use a record like this to carry that part of the explanation into the spending decision.

Record What the decision needs
Business obligation Customer, useful outcome, retention purpose, latency requirement, recovery deadline, and who may change each commitment
Data footprint Logical versus physical measurements, indexes and logs included, replica scope, growth and deletion assumptions, and placement distribution
Work and limits Foreground demand, tested bottleneck, maintenance backlog and its deadline, effective transfer or replay rate, and competing work
Operating scenarios Normal service, maintenance, expansion, a specified failure, recovery, and migration overlap; identify which coincide
Evidence boundary Engine version, configuration, schema/query assumptions, measurement window, test conditions, and unresolved questions
Decision Action, cost, resource location, lead time, accountable owner, review trigger, and the consequence if the assumption is wrong

Each specialist brings the measure that fits the work: repair time for Cassandra, replay progress for Kafka, obsolete rows awaiting vacuum for PostgreSQL. The common part is what that evidence lets the business promise.

Filled in for the growing Cassandra customer, the record asks for more than a storage ticket would. The obligation is that customer’s history and latency, and the account team’s view of whether the growth continues. The footprint is 84 TiB replicated in two months, with the busiest replicas measured. The work is a seventh node’s 12 TiB join at a measured rate, then cleanup on six nodes, both kept clear of the weekly repairs. The failure to plan for is a replica unavailable during the join, which fails a consistent bootstrap unless the team accepts the documented risk of overriding it. The decision names a start date, the cost of carrying a seventh node from then on, an owner, and the triggers that would move the date: faster growth, a slower transfer, or repairs that stop finishing inside the grace period.

The storage, transfer, replay and WAL arithmetic in the Cassandra, Kafka and PostgreSQL sections is reproducible with python3 examples/data_capacity_math.py; the script does not inspect a cluster or recommend production settings. The portfolio companion likewise leaves its stateful-data-services pool unresolved until service, maintenance and recovery evidence arrives. Adapting either requires measured inputs and dated demand intelligence.

Back at the Cassandra cluster that looked quiet, I would fund a focused investigation before removing nodes. We might learn that we can take them out safely, or that taking them out would leave us needing to buy capacity again in a hurry the first time a replica has to be rebuilt. What would it be worth to avoid that purchase, and what would it cost to find out? Chapter 13 takes up the economics of making a change while keeping the service viable.


Notes and sources

  1. Timothy O’Brien, “Fail First: The Only Way I Actually Learn New Tech,” Medium, September 29, 2025, republished as “If You’ve Never Broken It, You Don’t Really Know It”, O’Reilly Radar, December 17, 2025. The author’s recollection, retold without identifying details; not evidence that all relational systems face the same limit.↩︎

  2. Google Cloud, “Spanner overview” and “AlloyDB overview” (last updated September 30, 2026); Microsoft Learn, “Partitioning and horizontal scaling in Azure Cosmos DB”. Checked October 4, 2026. Vendor descriptions: Spanner as a relational, multi-model database; Cosmos DB scaling a container across physical partitions by partition key; AlloyDB as PostgreSQL-compatible, with one read-write primary instance and read pools. Not a performance comparison; the preference among them is the author’s judgment.↩︎

  3. Google Cloud, “Cloud Storage pricing” and “Spanner pricing”, checked October 4, 2026, us-central1 (Iowa) list prices: Cloud Storage Standard $0.02, Nearline $0.01, Coldline $0.004 and Archive $0.0012 per GiB-month; Spanner regional SSD storage $0.30 per GiB-month including replication, and Standard-edition compute $0.90 per node-hour. Google Cloud, “Quotas and limits” for Spanner, last updated October 2, 2026, for 10 TiB of storage per node. List prices before discounts and free tiers, excluding operations, network, retrieval and backup charges; other regions and editions differ. The arithmetic is the author’s.↩︎

  4. Corning Incorporated, “Corning SMF-28 Ultra Optical Fiber”, product information sheet PI-1424-AEN, which gives an effective group index of refraction of 1.4676 at 1310 nm and 1.4682 at 1550 nm; National Institute of Standards and Technology, “CODATA Value: Speed of Light in Vacuum”, 299,792,458 m/s. Together these give about 204,000 km per second, or 4.9 microseconds per kilometer one way. Microsoft, “Azure Network Round-Trip Latency Statistics”, Microsoft Learn, median round trips for the 30 days ending July 30, 2026. All checked October 4, 2026.↩︎

  5. Apache Cassandra documentation, “RDBMS design” and “Data Definition”, checked October 3, 2026. Query-first modeling and partitions as undivided units of storage; the customer example is hypothetical.↩︎

  6. Apache Cassandra 5.0 documentation, “Compaction overview”, checked October 3, 2026. SSTables, tombstones, the 864,000-second default gc_grace_seconds, and when compaction may drop a tombstone.↩︎

  7. Apache Cassandra 5.0 documentation, “Repair”, checked October 3, 2026. Resource cost, the reappearance risk, and the seven-day suggestion; follow the deployed version’s guidance.↩︎

  8. Apache Cassandra documentation, “Adding, replacing, moving and removing nodes”, checked October 3, 2026. Range streaming, consistent-bootstrap failure when a replica is unavailable, and moved data counting against the old nodes until cleanup, a compaction type in “Compaction overview.” The node count, sizes and rates here are invented.↩︎

  9. Apache Cassandra documentation, “Adding, replacing, moving and removing nodes”, checked October 3, 2026. Range streaming, consistent-bootstrap failure when a replica is unavailable, and moved data counting against the old nodes until cleanup, a compaction type in “Compaction overview.” The node count, sizes and rates here are invented.↩︎

  10. Apache Cassandra documentation, “Monitoring”, checked October 3, 2026. Live versus total SSTable disk use, pending compactions and latency; use the deployed version’s definitions.↩︎

  11. Apache Cassandra documentation, “Cassandra Stress”, checked October 3, 2026: deprecated in favor of NoSQLBench, with user-mode profiles for custom schemas. No benchmark was run.↩︎

  12. Apache Kafka 4.3 documentation, “Design”, checked October 3, 2026; the downloads page still listed 4.3.1 (June 25, 2026) as the newest release when rechecked October 4, 2026. Replay of retained records; consumption versus deletion and key compaction.↩︎

  13. Apache Kafka 4.3 documentation, “Topic Configs”, checked October 3, 2026. The quoted retention.ms description, per-partition retention.bytes, and segment-based deletion; tiered storage is not modeled, and the figures are not sizing recommendations.↩︎

  14. Apache Kafka 4.3 documentation, “Design”; “Apache Kafka 4.2.0 Release Announcement”, February 17, 2026 (share groups production-ready); KIP-932, “Queues for Kafka”, “Ordering”; all checked October 3, 2026.↩︎

  15. Apache Kafka 4.3 documentation, “Monitoring”, checked October 3, 2026. UnderReplicatedPartitions, RequestHandlerAvgIdlePercent, and the consumer-published records-lag-max.↩︎

  16. OpenMessaging, “The OpenMessaging Benchmark Framework”, checked October 3, 2026. Workload parameters, including consumer backlog size; validate the release and driver. No comparative performance claim is made.↩︎

  17. Cruise Control for Apache Kafka, checked October 3, 2026. Resource modeling and rebalance goals; not connected to a cluster for this chapter.↩︎

  18. Microsoft, “What is Azure Event Hubs for Apache Kafka?” and “Compare Azure Event Hubs tiers”, checked October 3, 2026. Kafka support by tier, retention limits and per-tier throughput limits.↩︎

  19. PostgreSQL 18 documentation, “Using EXPLAIN”, checked October 3, 2026. Arbitrary cost units, ANALYZE executing the statement, and ANALYZE implicitly enabling BUFFERS.↩︎

  20. PostgreSQL 18 documentation, “CREATE INDEX” and “Explicit Locking”, checked October 3, 2026. Write blocking, many-hour builds on very large tables, and the concurrent build’s extra scan, waits and load; the capacity interpretation is the author’s.↩︎

  21. PostgreSQL 18 documentation, “pg_stat_statements”, checked October 3, 2026. Setup, visibility, toplevel, timing and WAL fields; stats_since arrived in 17. The query, minus that column, ran on a disposable PostgreSQL 14 instance, not on 18 or production.↩︎

  22. PostgreSQL 18 documentation, “pg_stat_statements”, checked October 3, 2026. Setup, visibility, toplevel, timing and WAL fields; stats_since arrived in 17. The query, minus that column, ran on a disposable PostgreSQL 14 instance, not on 18 or production.↩︎

  23. PostgreSQL 18 documentation, “Using EXPLAIN”, checked October 3, 2026. Arbitrary cost units, ANALYZE executing the statement, and ANALYZE implicitly enabling BUFFERS.↩︎

  24. PostgreSQL 18 documentation, “pgbench”, checked October 3, 2026. Custom scripts, target-rate scheduling, latency and skipped transactions.↩︎

  25. Microsoft, “Query Store in Azure Database for PostgreSQL flexible server”, checked October 3, 2026. Opt-in capture, separate wait sampling, seven-day default retention and the Burstable-tier warning; no live measurement is claimed.↩︎

  26. PostgreSQL 18 documentation, “Routine Vacuuming”, checked October 3, 2026. Reuse versus release, the steady-state goal, VACUUM FULL’s copy and ACCESS EXCLUSIVE lock, and read-only operation near wraparound.↩︎

  27. Microsoft, “Limits in Azure Database for PostgreSQL flexible server”, checked October 3, 2026. Storage cannot be reduced without a dump and restore to a new server.↩︎

  28. AWS Prescriptive Guidance, “Delete unattached Amazon EBS volumes”, checked November 28, 2026. Provisioned storage charges continue for detached volumes. AWS advises checking dependencies, backups and retention requirements before deleting.↩︎

  29. PostgreSQL 18 documentation, “Log-Shipping Standby Servers”, “Replication” and “Logical Decoding Concepts”, checked October 3, 2026. Slots filling pg_wal, max_slot_wal_keep_size (unlimited by default), idle_replication_slot_timeout (new in 18, off by default), and slots retaining WAL and catalog rows.↩︎

  30. Microsoft, “Backup and restore in Azure Database for PostgreSQL flexible server” and “Limits in Azure Database for PostgreSQL flexible server”, checked October 3, 2026. 7–35-day retention, restore to a new server of the same size, and settings to re-create; recovery time needs an application-specific test.↩︎

  31. Amazon RDS User Guide, “Rotating your SSL/TLS certificate”, checked November 28, 2026. Client trust-store updates precede the database CA change. Server certificate rotation depends on engine support. RDS Proxy uses a different certificate arrangement.↩︎