3 Topics
Chapter•90 Minutes

Advanced System Design: Cost, Governance, and Architecture Evolution

Make architecture decisions sustainable through cost modeling, data lifecycle planning, migration strategy, and design reviews.

Cost Modeling and FinOps for System Design

Estimate cost by major drivers: compute time, memory, database capacity, storage, requests, network egress, managed-service units, logs, and backups. A cheap request can become expensive at billions of requests, while a high-cost operation used rarely may not be the right optimization target.

Compare cost per useful outcome, such as cost per 1,000 successful checkouts or per hour of video delivered. Include operational labor and failure risk; a self-managed database may have a lower invoice but higher engineering and on-call cost.

Use budgets, tags, allocation by team or feature, and anomaly alerts. Optimize with evidence: right-size overprovisioned resources, improve cache hit rates, reduce wasteful queries, and apply storage lifecycle policies. Avoid reducing redundancy below the reliability target merely to lower the bill.

Key Takeaways
  • Model the full cost of delivering a useful outcome.
  • Include operational labor and reliability impact.
  • Optimize measured cost drivers rather than arbitrary resource counts.
Knowledge Check

What should a useful architecture decision record capture?

Architecture Decision Records and Safe Migrations

An Architecture Decision Record (ADR) captures context, decision, alternatives, consequences, and status. It prevents teams from repeatedly revisiting decisions without understanding why they were made. Keep ADRs concise and update their status when the design changes.

Migration plans should include compatibility, backfill, validation, cutover, rollback limits, and cleanup. For a large dataset, run idempotent batches with checkpoints and rate limits so migration work does not starve production traffic. Compare counts, checksums, and sampled records before switching reads.

Some migrations are not safely reversible after new writes or external side effects. Define a forward-fix plan and preserve enough audit data to recover. Feature flags and shadow reads can reduce risk when comparing old and new implementations.

Key Takeaways
  • Record decisions and rejected alternatives with reasons.
  • Migrations need checkpoints, validation, and production-load limits.
  • Know whether rollback is genuinely possible after data changes.

Final Architecture Review Checklist

Before shipping a design, review the complete lifecycle:

  • Requirements: measurable SLIs/SLOs, capacity assumptions, data retention, user journeys.
  • Interfaces: API contracts, schema evolution, timeouts, idempotency, authentication and authorization.
  • Data: source of truth, indexes, transactions, replication lag, partition keys, backup and deletion.
  • Failure: partial outages, retry storms, overload, dependency loss, recovery objectives, failback.
  • Operations: metrics, logs, traces, alerts, runbooks, deployment gates, incident ownership.
  • Security: trust boundaries, secrets, encryption, rate limits, audit trails, abuse cases.
  • Economics: cost per workload, capacity headroom, growth assumptions, ownership and on-call burden.

A design review should produce actionable risks, owners, and validation experiments—not just a diagram approval. Use load tests, chaos experiments, threat modeling, restore drills, and staged rollout evidence to verify assumptions.

Key Takeaways
  • Review the system's operational and data lifecycle, not only its happy path.
  • Convert risks into owners and testable actions.
  • A design is validated by evidence from realistic failure and load conditions.