Design canvas — pick every knob

Every concept in the curriculum is a knob; a workload determines which positions of those knobs are correct, and bad combinations have predictable failure modes.

Previously

Every primitive is now on the table; the question is which positions of the knobs survive a real workload.

Scene 13

Design canvas: pick every knob

  1. Watch
  2. Try it
  3. Predict
  4. Capture
WORKLOADTIMESERIES1B events/day, 30-day reten…▸ activeMULTI-REGION KVlow-latency reads in two re…WRITE-HEAVY INGESTsustained write spikes, RF …KNOBSPARTITION KEYnatural·RF3·W (CL WRITE)ALL·R (CL READ)ONE·VNODES / NODE1·MULTI-DCsingle-dc·VERIFIER✗partition keyraw key → unbounded growth; >100 MB partitions, GC paus…✓RFRF=3 tolerates 1 failure at QUORUM; the default everywh…✗W (CL write)ALL stalls on any single replica blip; timeseries needs…✓R (CL read)Timeseries reads tolerate some staleness; ONE is fast.✗vnodes / node1 token / node: lopsided ring; bootstrap streams from O…✓multi-DCSingle-DC fits the workload; no cross-region complexity.Timeseries: 1B events/day, 30-day retention. Punishes wide partitions; rewards bucketed keys + TWCS.
natural key → wide partitions on hot users
CL_write=ALL kills availability →
1 vnode/node → lopsided ring
What to watch for

The defaults — raw partition key, CL_write=ALL, 1 vnode/node — are wrong on purpose for the timeseries brief. The verifier panel is glowing red on the knobs that will hurt first. Read it, then continue to start tuning.

Implementation

Highlighted lines are the ones running in the diagram right now.

Verifier.verify
grade each knob against the chosen workload
def verify(workload, choices):
return [
verify_partition_key(workload, choices),
verify_rf(workload, choices),
verify_cl_write(workload, choices),
verify_cl_read(workload, choices),
verify_vnodes(workload, choices),
verify_multi_dc(workload, choices),
]
Verifier.verify_cl_write
the same W is right or wrong depending on the brief
def verify_cl_write(workload, c):
if workload == 'timeseries':
if c.cl_write == 'ALL': return fail
if c.cl_write in {'QUORUM', 'LOCAL_QUORUM'}:
return ok
return warn # ONE: no read-your-writes
if workload == 'multi-region-kv':
if c.cl_write == 'LOCAL_QUORUM': return ok
if c.cl_write == 'ALL': return fail
return warn
# write-heavy-ingest
return ok if c.cl_write == 'ONE' else warn
Verifier.verify_partition_key
wide-partition guard — bucketed for timeseries, raw for KV
def verify_partition_key(workload, c):
if workload == 'timeseries':
if c.partition_key == 'time-bucketed':
return ok # bounded; TWCS-friendly
if c.partition_key == 'natural':
return fail # >100MB partitions
return warn
if workload == 'multi-region-kv':
if c.partition_key == 'natural': return ok
return warn # KV access by id
# write-heavy-ingest
return ok # composite or time bucketing

Where this sits in Build a wide-column store (Cassandra / DynamoDB family)

Scene 12 of 13, in the Design canvas act — Pick every knob against a workload and grade the result.. Given a real workload, pick partition key, RF, W/R, vnodes, and DC topology — and grade the result.

All 13 scenes in Build a wide-column store (Cassandra / DynamoDB family) · Every curriculum

Built with Arqly
Every scene in Build a wide-column store (Cassandra / DynamoDB family) builds on the one before it.All 13 Build a wide-column store (Cassandra / DynamoDB family) scenes