Skip to content
About
Main content
Trade-off

Mutability vs. immutability

In-place update vs. append-only + GC; buys reproducibility and cheap concurrency, pays in space and janitorial work.

Where you meet it: copy-on-write, event sourcing, table snapshots, time travel, crypto-shredding vs. hard delete.

What it is

A queue versus a log is two classic trade-offs at once: ordering versus parallelism, and mutability versus immutability. The log is the immutable choice: it only appends, and a cleanup process (retention) removes old data. It collects the benefits you would expect from immutability (reproducibility, many cheap concurrent readers) and pays the expected costs (space, and janitorial work: retention policy, compaction, offset management, and tiered storage, which moves old data to cheaper storage).

From Data Movement › Queue versus log

Encoding fuses values into blocks, so the layout decision made for read efficiency has produced a new granularity mismatch on the write side. This is the mismatch rule again, caused by your own optimization. This is why columnar systems do not update in place. It is not a preference. The cost structure forbids it, and these systems hand the problem to merge-on-read, delete vectors and copy-on-write (all explained in Mutation strategies: what happens when a value changes). Columnar layout does not merely coexist with immutability. It forces it. That is the handover to Mutation strategies: what happens when a value changes.

From Storage: Physical Organization › Row, column and PAX

Where it appears

In 14 mechanisms. Each says what the mechanism is about, then how this trade-off shows up there, in its own words.

Made on the same pages most often.