Using CheatSheets To Apply Best Practices

CheatSheet: Feature Design For Job Interview

CheatSheet: Feature Design For Job Interview

1.1 Key Blocks For Feature/System Design

Num Name Summary
1 Caching Stores data so that future requests of data retrieval can be faster
2 Message Queue Provides an asynchronous communications protocol,
3 Data Partition & Sharding Break up a big data volume into many smaller parts
4 Pull vs Push model  
5 Networking: HTTP  
6 Load balancer  
7 Concurrency & Communication  
8 DB replication  
9 CAP: Consistency/Availability/Partition  
10 Consistent Hash  
11 Two-phase commit/Three-phase commit  
12 API: gRPC vs REST  
13 Scale up vs Scale out Vertical scaling and Horizontal scaling
14 Pessimistic And Optimistic Locking  
15 Session management  
16 Networking: TCP vs UDP  
17 API Design  
18 Consistency patterns Weak consistency, Eventual consistency, Strong consistency
19 Availability patterns Fail-over vs Replication
20 Self Protection API Rate limit, Circuit breaker, bulkhead
21 Data Replication  
22 Conflict resolution Quorum, vector lock, reconcile on read/write
23 CDN – Content Delivery Network  
24 Monitoring  
25 Distributed Systems  
26 Garbage Collection  
27 Memory Management  
28 Concurrency  
29 Networking: SDN  
30 Security  
31 Networking: DNS  

1.2 Design Technical Modules

Num Name Summary
1 Design a distributed counter link
2 Design a distributed UUID generator  
3 Implement a timer  
4 Design An API Rate Limiter link, link
5 Design online/offline status system  
6 Top URL hits  
7 Unique url hits  
8 Delayed task scheduling  
9 Design a thread-safe Hashmap link
10 Design a distributed Hashmap  
11 Design a distributed transactions  
12 Design a load balancer  
13 Design a client-server API to build a rich document editor  
14 Design a circuit breaker  
15 Design a secrets management system  
16 Design data sync for a distributed system  
17 Design: A Parking Lot Service link
18 Design: A URL Redirecting Feature  

1.3 Additional Blocks For Feature/System Design

Num Name Summary
1 Heartbeats  
2 Gossip  
3 Paxos and raft protocol  
4 CRDTs (Consistent Replicated Data Types)  
5 Vector Clocks/Version Vectors  
6 Split brain  
7 Merkle Tree  
8 Sloppy Quorum and hinted handoff  
9 LSM (Log Structured Merge Trees)  

CheatSheet: Feature Design For Job Interview

1.4 Explain workflow: What happens when XXX?

Num Name Summary
1 When happens when I search in google?  
2 How loadbalancer works  
3 Explain three phase commit model  
4 Explain HTTP return code 301 vs 302, 401 vs 403, 503 vs 504, etc
5 Explain Mysql DB replication model  
6 Explain gossip protocol  
7 Explain CAP  
8 Explain Hadoop file system  

1.5 Explain tools: how XXX supports XXX?

Num Name Summary
1 How JDK implement hashmap?  
2 Explain java garbage collection model  
3 Explain raft/etcd  
4 How OS supports XXX?  

1.6 Cloud Design Principles

Num Name Summary
1 Fail fast  
2 Design for failure  
3 Immutable infrastructure  
4 Cats vs Cattle Avoid snowflake servers
5 Auto healing  
6 Async programming  
7 GitOps operational model  

1.7 Cloud Design Patterns

Num Name Summary
1 Ambassador pattern Create helper service to send network requests, besides the main sevice
2 Cache-Aside pattern Load data on demand into a cache from a data store
3 Circuit Breaker pattern If a request takes too many reousrce, abort it
4 Bulkhead pattern Isolate elements into pools, so that one fire won’t burn all
5 Gateway Aggregation pattern Aggregate multiple individual requests into a single request
6 Priority Queue pattern Support different SLAs for different individual clients
7 Strangler pattern Incrementally migrate a legacy system piece by piece

1.8 Misc

Num Name Summary
1 How to store 2TB data into 3 disks of 1TB. And be tolerant for one disk failure A, B, C. And C = A XOR B
2 Find out the difference between two files. Majority of these two are the same #lcs – Longest Common Subsequence
3 How to support feature of “diff 1.txt 2. txt”  

Leave a Reply

Your email address will not be published. Required fields are marked *