Build a wide-column store (Cassandra / DynamoDB family) (13 scenes)
Scene 12 · Design canvas — pick every knob
Given a real workload, pick partition key, RF, W/R, vnodes, and DC topology — and grade the result.
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
Diagram
A workload tile on the left selects the brief. The center column is six knobs the prior scenes taught — partition-key strategy, RF, W (CL_write), R (CL_read), vnodes-per-node, multi-DC topology. The right column is a per-knob verifier that grades each choice against the chosen workload, with a one-line reason.
natural key → wide partitions on hot users
CL_write=ALL kills availability →
1 vnode/node → lopsided ring
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
Verifier.verify
grade each knob against the chosen workload
1def verify(workload, choices):2 return [3 verify_partition_key(workload, choices),4 verify_rf(workload, choices),5 verify_cl_write(workload, choices),6 verify_cl_read(workload, choices),7 verify_vnodes(workload, choices),8 verify_multi_dc(workload, choices),9 ]
Verifier.verify_cl_write
the same W is right or wrong depending on the brief
1def verify_cl_write(workload, c):2 if workload == 'timeseries':3 if c.cl_write == 'ALL': return fail4 if c.cl_write in {'QUORUM', 'LOCAL_QUORUM'}:5 return ok6 return warn # ONE: no read-your-writes7 if workload == 'multi-region-kv':8 if c.cl_write == 'LOCAL_QUORUM': return ok9 if c.cl_write == 'ALL': return fail10 return warn11 # write-heavy-ingest12 return ok if c.cl_write == 'ONE' else warn
Verifier.verify_partition_key
wide-partition guard — bucketed for timeseries, raw for KV
1def verify_partition_key(workload, c):2 if workload == 'timeseries':3 if c.partition_key == 'time-bucketed':4 return ok # bounded; TWCS-friendly5 if c.partition_key == 'natural':6 return fail # >100MB partitions7 return warn8 if workload == 'multi-region-kv':9 if c.partition_key == 'natural': return ok10 return warn # KV access by id11 # write-heavy-ingest12 return ok # composite or time bucketing