Bộ mẫu system design
Phương pháp system design kèm mười thiết kế tham chiếu: chat, news feed, sổ cái thanh toán, rate limiter, tìm kiếm, thông báo, video, lập lịch, gọi xe, soạn thảo.
25 mẫu trong 2 bước, theo thứ tự sử dụng. Mở mẫu bất kỳ trong trình soạn thảo, điền nội dung rồi xuất ra PDF, DOCX hoặc HTML.
Phương pháp và mẫu
System Design Document Template
Đầy đủScale system design: requirements and below the line, estimates with consequences, API, access patterns, deep dives, failure modes, 10x/0.1x, trade-offs
RFC 9110; RFC 9457; RFC 9745 (Deprecation header)Database Design Document Template (ERD and Physical Model)
Đầy đủDatabase design: DBMS choice, conceptual, logical and physical models, indexes, partitioning, integrity, security, backup, capacity
Multi-Tenancy Design Template (SaaS)
Đầy đủSaaS tenancy model (silo, pool, bridge), tenant context, data isolation, noisy neighbours, lifecycle, residency, cost per tenant
SaaS practice; AWS Well-Architected SaaS Lens (control plane and application plane)Event Sourcing and CQRS Design Template
ChuẩnEvent-sourced service design: fit check, event catalogue, versioning and upcasting, store, projections, idempotency, crypto-shredding
Event Sourcing (Fowler 2005); CQRS Documents (Young 2010); GDPR Art. 17 examplesMicroservice Specification Template (Service Canvas)
ChuẩnService canvas: bounded context, owner, APIs and events, data owned, dependencies, SLOs, scaling, config, deploy, observability
Microservice Canvas (Richardson); OpenAPI 3.2.1; AsyncAPI 3.1.0; RFC 9745, RFC 8594Frontend Architecture Document Template
Đầy đủWeb frontend architecture: rendering per route, state, data caching, design system, Core Web Vitals budgets, a11y, i18n, CSP, RUM
Core Web Vitals (web.dev); WCAG 2.2 AAMobile App Architecture Template
Đầy đủMobile app architecture: native vs cross-platform, MVVM/Clean layers, offline sync, secure storage, auth, privacy, releases, testing
OWASP MASVS v2.1.0; RFC 8252 (BCP 212)Back-of-Envelope Estimation and Capacity Model Template
Đầy đủReference latency and unit tables, assumptions register, QPS, storage, bandwidth, cache, server and cost formulas, worked example, sensitivity, traceability
Jeff Dean latency numbers (LADIS 2009)Resilience and Load Shedding Design Template (Retries, Circuit Breakers)
Đầy đủFailure model, deadlines, retries with jitter and budgets, circuit breakers, bulkheads, backpressure, criticality-based shedding, degradation, fault tests
Google SRE book ch. 21-22; Amazon Builders' LibrarySystem Design Review Checklist and Scoring Rubric Template
Đầy đủDesign review checklist in 13 areas, evidence-based scoring rubric, weighted score, red flags, findings register, decision record, 45-minute interview rubric
Thiết kế tham chiếu
Chat System Design Template (Reference Design)
Đầy đủReal-time 1:1 and group chat: WebSocket gateways, per-conversation ordering, fan-out, receipts, offline sync, push, E2EE
IETF RFC 6455 (WebSocket); RFC 9420 (MLS)News Feed System Design Template (Reference Design)
Đầy đủSocial feed: hybrid fan-out on write and read, celebrity threshold, ranking pipeline, feed cache, snapshot pagination, media
Twitter 'Timelines at Scale' (QCon SF 2012), cited as a case studyPayment Ledger System Design Template (Reference Design)
Đầy đủPayments and double-entry ledger: idempotency keys, payment state machine, PSPs, outbox, reconciliation, audit, PCI DSS scope
PCI DSS v4.0.1 and SAQ A (Jan 2025) cited by requirement number only; ISO 4217; RFC 9457; draft-ietf-httpapi-idempotency-key-header-08 (I-D)Rate Limiter System Design Template (Reference Design)
Đầy đủDistributed rate limiter: token bucket vs window algorithms, atomic Redis scripts, multi-region shares, 429 headers, fail-open
RFC 6585; RFC 9110; draft-ietf-httpapi-ratelimit-headers-11 (I-D)Search Autocomplete System Design Template (Reference Design)
Đầy đủTypeahead: trie/FST/edge n-gram index, popularity and recency ranking, query-log pipeline, edge cache, latency budget, safety
RFC 9110; RFC 9111Notification Service System Design Template (Reference Design)
Đầy đủPush, email, SMS and in-app: templates, preferences and opt-out, priority queues, caps, provider failover, retries, dedup
RFC 8058; RFC 9989 (DMARC, May 2026); Netflix RENO case studyVideo Streaming System Design Template (Reference Design)
Đầy đủVideo upload and ABR streaming: chunked transcoding, renditions ladder, CMAF HLS/DASH, CDN, DRM note, view counts, storage tiers
ISO/IEC 23009-1:2026 (DASH); ISO/IEC 23000-19:2024 (CMAF); ISO/IEC 23001-7:2023 (CENC); RFC 8216 (HLS)Job Scheduler System Design Template (Reference Design)
Đầy đủDistributed scheduler: cron, delayed and one-off jobs, leases and visibility timeouts, fencing, idempotent handlers, retries, DLQ
Google SRE book ch. 24 (distributed cron); IETF Idempotency-Key draft-08Ride-Hailing Dispatch System Design Template (Reference Design)
Đầy đủRide matching: location ingestion, H3/geohash index, batched matching, ETA, trip state machine, single assignment, surge note
H3 grid (h3geo.org cell statistics)Collaborative Editing System Design Template (Reference Design)
Đầy đủReal-time co-editing: OT vs CRDT, sequence CRDT, state-vector sync, presence, offline merge, snapshots and compaction, access
CRDT research (Shapiro et al. 2011; YATA; Fugue); IETF RFC 6455URL Shortener System Design Template (Reference Design)
Đầy đủCapacity (KaTeX), API, base62 key generation and collisions, 301 vs 302, caching, click analytics, abuse protection, custom aliases, expiry, multi-region
RFC 9110 (redirect status codes); RFC 9457; NIST SP 800-38G (FF1)Distributed Key-Value Store System Design Template (Dynamo-Style)
Đầy đủConsistent hashing, vnodes, quorums (R+W>N), vector clocks vs LWW, hinted handoff, Merkle anti-entropy, gossip, LSM compaction, cache eviction, hot keys
Dynamo (DeCandia et al., SOSP 2007); DynamoDB (USENIX ATC 2022)Distributed Message Queue System Design Template (Kafka-Style Log)
Đầy đủPartitions, log segments, retention, acks and idempotence, consumer groups, offsets, delivery semantics, ordering, ISR replication, backpressure, DLQ, schemas
Apache Kafka 4.4 documentation; Kafka paper (NetDB 2011)Ticket and Hotel Booking System Design Template (Reference Design)
Đầy đủSeat and room inventory, holds with TTL, overbooking math, conditional writes, idempotency, payment saga, waiting room, search vs booking paths
RFC 9457; draft-ietf-httpapi-idempotency-key-header-08 (I-D)LLM Inference Serving and Vector Search Platform Design Template
Đầy đủGateway, router, continuous batching, paged KV cache, GPU memory and throughput math, TTFT/TPOT SLOs, autoscaling, quantization, HNSW/IVF, cost per token
PagedAttention (Kwon et al., SOSP 2023)