Skip to main content

Decision Frameworks

Structured approaches for architecture decisions at principal level. Use these to make tradeoffs explicit, align stakeholders, and document rationale in ADRs.

Related: Architecture Decision Records, Glossary, CAP Theorem, PACELC

Architecture decision frameworks interview map

Figure A: Framework toolkit — CAP/PACELC, build vs buy, tech scorecard, consistency, replication, messaging, multi-region — all land in an ADR.


Interview walkthrough (how a strong student sounds)​

When an interviewer asks "How do you make architecture decisions?" or throws a fork (database, multi-region, build vs buy), don't name-drop frameworks. Pick the right lens, state the tradeoff, and commit to an ADR with revisit triggers.

Interview decision flow — pick the right framework

Figure B: Start from the decision type → apply the matching framework → write the ADR.

Opening (10 seconds)​

"I treat decisions as explicit tradeoffs under constraints—SLOs, team size, regulatory risk—not as picking a favorite technology. I match the decision type to a framework, score options with assumptions written down, POC the riskiest claim, and capture the result in an ADR with revisit triggers so we can change our minds with evidence."

Which framework when (say this table aloud)​

Interview promptFramework I reach for
"What if the network splits?"CAP — client-visible behavior under partition
"What about normal day-to-day?"PACELC — latency vs consistency when healthy
"Should we build our own X?"Build vs buy + 3-year TCO
"Postgres vs DynamoDB vs …?"Tech selection scorecard + time-boxed POC
"How consistent do reads need to be?"Consistency decision tree
"Single region or multi-region?"Replication + multi-region strategy tables
"Kafka delivery guarantees?"Messaging semantics (at-least-once + idempotency)

"Avoid framework theater: a one-page ADR beats a 40-slide review with no decision."


1. When to Use a Framework​

SituationFramework
Choosing consistency vs availabilityCAP / PACELC
Custom software vs vendorBuild vs buy
Picking databases, queues, cloudsTechnology selection
Any significant forkADR + weighted criteria matrix

2. CAP Theorem​

Student script — CAP​

"CAP is not 'pick two of three forever.' Gilbert & Lynch: if a partition occurs, you cannot be both fully available on both sides and linearizable. I'd never say 'we are CA'—partitions happen. I name client-visible behavior: reject writes (CP-leaning) or serve and reconcile later (AP-leaning). And CAP is per subsystem—ledger ≠ social feed."

CAP vs PACELC — what interviewers want

Figure C: CAP = partition fork (C vs A). PACELC adds the normal-operation fork (latency vs consistency).

2.1 Problem​

During a network partition, can the system remain available (respond to all requests) and linearizable (as defined in Gilbert & Lynch, 2002) for all operations?

2.2 Mechanism​

CAP is not "pick two of three forever." It states: if a partition occurs, you cannot have both strong consistency (linearizability in the CAP formalization) and full availability on both sides of the partition.

2.3 Decision criteria​

Choose CP-leaningChoose AP-leaning
Financial ledger, inventory reservationSocial feed, analytics, config cache
Cannot tolerate conflicting writesBusiness tolerates merge/conflict resolution
Clients accept unavailability during partitionClients must always get a response
Strong audit requirementsHigh write availability across regions

2.4 Common mistakes​

MistakeCorrection
"We are CA"Partitions happen; clarify behavior when they happen
CAP applies to whole systemDifferent subsystems make different choices
CAP replaces consistency model discussionName specific guarantee (linearizable, causal, eventual)

2.5 Interview relevance​

Principal candidates explain client-visible behavior during partition, not slogans. Link to Partial Failure.

References: Gilbert & Lynch (2002); Kleppmann critique of CAP simplification in DDIA.


3. PACELC Extension​

Daniel Abadi (2012): If Partition, choose Availability or Consistency; Else (normal operation), choose Latency or Consistency.

Student script — PACELC​

"Most hours are not partitioned—so PACELC matters. Under P I choose A or C; Else I choose Latency vs Consistency. Example: feature flags—edge serves last-known (AP/EL) for sub-ms page loads; control plane is strongly consistent (LC). I document per component, not one label for the whole platform."

3.1 Why PACELC matters​

Most production hours are not under partition. Teams still choose between:

  • Low latency, possibly stale reads (Dynamo-style tunable reads)
  • Higher coordination cost for fresher reads (Spanner-style commits)

3.2 Decision matrix​

WorkloadP: partitionEL: normal operation
Metadata / coordination (etcd)CPLC (consistency over latency)
Product catalog cacheAPEL (low latency, eventual)
User session storeCP or AP depending on stickinessOften EL with TTL
Cross-region bank transferCPLC

3.3 Walkthrough example​

Feature flag service evaluated on every page load:

  1. Partition: Serve last-known flags from edge cache (AP) vs fail closed (CP). Product choice: AP with version numbers; risky flags fail closed via policy.
  2. Else: Edge cache (EL) for sub-ms latency; control plane strongly consistent (LC).

Document per-component PACELC in ADR, not one label for entire platform.


4. Build vs Buy​

Student script — build vs buy​

"I ask: is this a differentiator or undifferentiated heavy lifting? Then I score TCO over 3 years—headcount, on-call, licenses, opportunity cost—not just license fee. Default: buy the base, build the wedge—managed Kafka + our stream logic; managed Postgres + our schema. Build when no vendor meets latency/compliance/scale, and we have a sustained platform team. Buy for email, IdP, payments rails, and coordination primitives where subtle bugs are expensive."

4.1 Problem​

Should the organization implement a capability in-house or adopt managed/open-source/vendor solution?

4.2 Decision criteria matrix​

CriterionWeight (example)Build signalBuy signal
Strategic differentiationHighCore competitive advantageCommodity capability
Time to marketHighTeam ready; small scopeUrgent delivery
Total cost of ownershipHigh3-year TCO lower incl. on-callVendor scale economies
Operational burdenHighDedicated platform teamSmall team; limited SRE
Risk & complianceMediumUnique requirementsVendor certifications (SOC2, HIPAA)
Exit / portabilityMediumAccept lock-in for speedNeed multi-cloud abstraction
Team expertiseMediumDeep domain skillsSkill gap in protocol/ops

4.3 TCO components (do not ignore)​

  • Engineering headcount (build + maintain)
  • On-call and incident cost
  • Infrastructure and license fees
  • Migration and training
  • Opportunity cost (what else team cannot build)

4.4 When build is justified​

  • Capability is differentiator (e.g., proprietary ranking, custom hardware path)
  • No vendor meets latency, compliance, or scale constraints
  • Organization has sustained platform team with Jepsen-level verification for coordination systems

4.5 When buy is justified​

  • Undifferentiated heavy lifting (email delivery, payments rail, identity broker)
  • Coordination primitives (etcd, Consul, ZooKeeper)—subtle bugs are expensive
  • Team must ship product in < 6 months without platform staffing

4.6 Hybrid pattern​

Buy the base, build the wedge: managed Kafka + custom stream processing; managed Postgres + domain schema and migration tooling.

4.7 ADR template snippet​

Decision: Adopt managed DynamoDB for session store
Alternatives: Self-hosted Cassandra, Redis Cluster
Criteria scores: [table]
Risks accepted: vendor lock-in, per-request cost at scale
Revisit trigger: monthly cost > $X or p99 > Y ms for 2 quarters

Link: Architecture Decision Records.


5. Technology Selection Framework​

Student script — tech selection​

"Requirements → filter infeasible → shortlist 2–3 → POC the riskiest assumption (partition, hot key, poison messages)—not the happy path → weighted scorecard with assumptions → ADR + pilot → production with exit criteria. I call out anti-patterns: resume-driven tech, vendor benchmarks only, analysis paralysis."

5.1 Process​

5.2 Requirement categories​

CategoryExample questions
FunctionalQuery patterns, throughput, data model
Non-functionalp99 latency, RPO/RTO, multi-region
ConsistencyLinearizable? Causal? Eventual?
OperationalManaged vs self-hosted, upgrade path
SecurityEncryption, IAM, audit, data residency
CostUnit economics at projected scale
EcosystemClient libraries, hiring pool, K8s operators
MigrationDual-write period, rollback

5.3 Weighted scorecard (example)​

DimensionWeightOption AOption BOption C
Meets consistency need25%534
Operability20%354
Performance at scale20%443
Cost at 3-year projection15%345
Team familiarity10%523
Vendor risk / portability10%244

Score 1–5 per cell; multiply by weight; document assumptions behind each score.

5.4 Proof-of-concept scope​

POC must test riskiest assumption, not happy path:

  • Consensus: partition behavior, failover time, write latency at target fsync
  • Database: hot key, cross-shard transaction need, replication lag under load
  • Queue: consumer lag recovery, reordering, poison messages

5.5 Anti-patterns​

Anti-patternWhy it fails
Resume-driven developmentPicks tech for career, not fit
Benchmark marketing onlyVendor numbers without your workload
Single-vendor defaultMisses multi-cloud or open requirements
Analysis paralysisNo time-boxed POC
No sunset criteriaStuck on wrong choice

6. Consistency Model Selection​

Student script​

"I ask four questions: Need real-time order on one object for all clients? → linearizability. Own-writes / monotonic reads? → session guarantees. Causal chains? → causal. Can merge async? → eventual + CRDTs/version vectors. Then I name the model in the ADR—not just 'strong' or 'eventual.'"

Quick decision tree (complements PACELC):

  1. Must all clients see writes in real-time order on one object? → Linearizability (cost: coordination).
  2. Must users see own writes and monotonic reads? → Session guarantees on eventually consistent store.
  3. Must causal chains (comments on post) be ordered? → Causal consistency.
  4. Can merge conflicts asynchronously? → Eventual + CRDT/version vectors.

Link: Consistency.


7. Replication Topology Selection​

PatternWhenRisk
Single-leader syncLow RPO, acceptable write latencyLeader failure, failover
Single-leader asyncRead scale, tolerate lagStale reads, data loss on crash
Multi-leaderMulti-region write latencyConflict resolution required
Leaderless quorumHigh write availabilityComplex read repair, SLAs

Interview tip: Tie topology to RPO honesty—async single-leader means lag-at-crash can lose acknowledged writes unless the product accepts that.


8. Messaging Semantics Selection​

NeedPattern
Fire-and-forget metricsAt-most-once
Default event processingAt-least-once + idempotent consumer
Financial side effectsOutbox + idempotent sink; avoid claiming true exactly-once
Ordering per entityPartition key = entity id

Link: Message Delivery Semantics.

Interview tip: "Exactly-once" without naming the sink is a red flag—I'd say at-least-once + idempotency / outbox unless the sink joins a transactional epoch.


9. Multi-Region Strategy​

StrategyRPOComplexityUse when
Active-passiveLow with syncLowerStrict consistency, DR focus
Active-active eventualNon-zeroHighGlobal latency, conflict tolerance
Cell-based architecturePer-cellMediumBlast radius containment at scale

Link: Multi-Region Architecture.

Interview tip: Don't jump to active-active for payments—conflict protocol + single-writer story first; warm/hot standby often fits RTO/RPO with less split-brain risk.


10. Documenting Decisions​

Every framework output should land in an ADR with:

  1. Context — constraints, stakeholders, SLOs
  2. Decision — one clear choice
  3. Consequences — positive, negative, risks accepted
  4. Alternatives considered — why rejected
  5. Revisit triggers — metrics or dates

Closing line (interview)​

"So: I match the decision type to a framework, make the tradeoff and client-visible behavior explicit, POC the riskiest assumption, and write an ADR with revisit triggers. Principal judgment is decision quality and reversibility—not being right forever."

Scoring signals​

StrongWeak / red flag
Picks framework by decision typeDumps CAP/PACELC slogans
Client-visible partition behavior"We are CA"
Per-component PACELCOne label for whole platform
TCO + hybrid build/buyLicense fee only / "always build"
Weighted scorecard + risky POCResume-driven / vendor bench only
ADR with revisit triggersSlide deck, no decision

References​

  • Seth Gilbert & Nancy Lynch, CAP (2002) — references/papers.yaml#gilbert-lynch-2002-cap
  • Daniel Abadi, PACELC (2012) — references/papers.yaml#abadi-2012-pacelc
  • Martin Kleppmann, Designing Data-Intensive Applications (2017)
  • Michael Nygard, Release It! — stability patterns
  • Mark Richards & Neal Ford, Fundamentals of Software Architecture — architecture characteristics

See Reading List.