Q4 · How do you avoid accidental complexity when scaling a system?

Back to 24 Architecture Questions.

The question is not “write simple code”. The axis it turns on: which complexity is essential to the requirement, and which was introduced by the last fix. Essential complexity is the problem’s own: consistency, scale targets, availability. Accidental complexity is what the system accumulated while chasing incidents. Scaling rarely adds essential complexity after the requirements settle; it mostly adds accidental complexity, one point fix at a time.

The accidental complexity ratchet A symptom triggers a point fix, the fix adds a new mechanism, the new mechanism interacts with every previously accumulated mechanism, and those interactions produce the next symptom. The loop only turns one way. FIGURE 4 THE ACCIDENTAL COMPLEXITY RATCHET Symptom prod hurts Point Fix fastest local change New Mechanism flag, special case Old Mechanisms the fixes so far new symptom interacts with every old one the ratchet: fix N must understand N-1 mechanisms before it, and nothing turns the loop back

What the answer should contain

Name the essential set first. List what the requirements genuinely demand: the scale target, the consistency level, the availability number. Every mechanism beyond that list is accidental by definition. You cannot refuse accidental complexity you have not separated from the essential kind.

Fix the class, not the instance. A point fix patches one occurrence and leaves the class armed for the next incident. The question for every hotfix review: does this remove the failure mode, or only this sighting of it?

Judge a fix by what it adds. A fix that deletes code, a branch, or a failure mode is paying rent. A fix that adds a special case, a flag, or a second code path is taking on a mechanism with interaction costs. The cost is not its fifty lines; it is that fix N must understand N-1 mechanisms before it.

Delete more than you add. When a fix obsoletes an older mechanism, delete the older one in the same quarter. A mechanism nobody is paid to remove never leaves on its own; that is the ratchet in one sentence.

Prefer boring, standard mechanisms. Cache, queue, read replica, known library. Their interaction behavior is documented and predictable. Bespoke mechanisms carry undocumented interactions, which is exactly what the loop feeds on.

Measure accidental complexity directly. Feature flags older than a quarter with no owner, branches in hot paths, config knobs nobody can explain. If it is not measured, the ratchet is invisible until the onboarding doc gives up.

Ideas worth mentioning out loud

Follow-ups to expect

Red flags in an answer

Sources