Part 10 · System Design · 10.3a
Part 10 thực hành / Deep dive

System Design: timed execution labs

Mỗi bài tạo một evidence pack gồm requirements, estimates, diagram, sequences, failure matrix, decisions và constraint change.

Lab A · Banking transfer trong 60 phút

  1. 0–10 phút: clarify internal/external transfer, money invariant, volume, p99, availability, RPO/RTO, audit/compliance.
  2. 10–20: estimate peak QPS, concurrency, yearly ledger size, DB connections và burst.
  3. 20–35: API/idempotency, double-entry schema, write/read flows và source of truth.
  4. 35–50: timeout unknown outcome, duplicate, locking, reconciliation, AZ failure và overload.
  5. 50–60: security, observability, cost, largest risk và evolution trigger.

Required artifacts

requirements.md
capacity.md
architecture.drawio/svg
transfer-sequence.md
failure-matrix.md
ADRs/001-ledger-boundary.md
Gate: mọi component có capacity limit/failure signal; không claim exactly-once hoặc “multi-AZ là đủ”.

Lab B · Constraint injection

Phút 35 bốc một constraint: traffic 10×, one AZ lost, RDS max 500 connections, hot tenant 40%, payment outcome unknown, data residency hoặc budget giảm 50%.

  1. Không vẽ lại từ đầu; xác định assumption nào vỡ.
  2. Tìm bottleneck đầu tiên bằng numbers.
  3. Đề xuất migration nhỏ nhất, trade-off và metric xác nhận.
  4. Nêu rollback/forward path.

Lab C · Design comparison

  1. Thiết kế Order–Inventory dạng modular monolith.
  2. Thiết kế lại thành microservices.
  3. So transaction, deploy, testing, on-call, scale và team ownership.
  4. Viết ADR chọn một và trigger đổi quyết định.

Lab D · Verbal defense

  1. Record 10-minute English walkthrough.
  2. Reviewer hỏi 10 follow-ups về failure/security/capacity.
  3. Đánh dấu unsupported claim và filler.
  4. Chấm 0–2 cho 10 rubric dimensions; target ≥15/20, reliability/security không bằng 0.

Deliverables