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.
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
- Watch
- Try it
- Predict
- Capture
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.
Highlighted lines are the ones running in the diagram right now.
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),]
def verify_cl_write(workload, c):if workload == 'timeseries':if c.cl_write == 'ALL': return failif c.cl_write in {'QUORUM', 'LOCAL_QUORUM'}:return okreturn warn # ONE: no read-your-writesif workload == 'multi-region-kv':if c.cl_write == 'LOCAL_QUORUM': return okif c.cl_write == 'ALL': return failreturn warn# write-heavy-ingestreturn ok if c.cl_write == 'ONE' else warn
def verify_partition_key(workload, c):if workload == 'timeseries':if c.partition_key == 'time-bucketed':return ok # bounded; TWCS-friendlyif c.partition_key == 'natural':return fail # >100MB partitionsreturn warnif workload == 'multi-region-kv':if c.partition_key == 'natural': return okreturn warn # KV access by id# write-heavy-ingestreturn 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