System design interview steps & template
Last updated
Last updated
Trade-offs:
CAP trade-off, availability vs consistency, Strong vs eventual consistency
Distributed database design, key-value design
Latency vs Throughput
ACID vs based database properties
Read-through and write-through case
Discovery service with gossip or centeraized metadata (bookkeeper)
Dive deep areas:
Potential bottlenecks of the system, like hot partition, scale
Potential failure cases: single node failure, network partition, split brain
Critical algorithms: consistent hashing, erasure coding, bloom filtering, geohashing, timeserial database
Common components for distributed basic services, like distributed key-value, database, message queue, streaming:
Load Balancer
API services / Control-plane: API service + authentication + authorization + metering + coordination with metadata service and placement service
Metadata service: metadata management, leader election, metadata caching
Placement service: decide the partition and entity placement logic
Workload management service: traffic movement, re-sharding, drain, block
Data-plane: cluster and nodes management, storage nodes + data caching, data migration, failure handling, data integrity,
Common components for distributed micro application service systems, like facebook, youtube, twiter, ticket systems
Load balancer
API services / Control-plane
Message Queue / Kafka Streaming
Distributed caching / local caching
Index builder to support better searching
Data Aggregator
CDN
Low level storage systems, like rocksDB, BDB, kafka file log:
https://artem.krylysov.com/blog/2023/04/19/how-rocksdb-works/