Golden Rules in a System Design interview Tips

日月星辰 发布在Programming
  1. For a Read-Heavy System - Consider using a Cache.
  2. For a Write-Heavy System - Use Message Queues for async processing
  3. For a Low Latency Requirement - Consider using a Cache and CDN.
  4. Need ACID(𝐀tomicity, 𝐂onsistency, 𝐈solation, 𝐃urability) Compliant DB - Go for RDBMS/SQL Database.
  5. Have unstructured data and don't require ACID - Go for NoSQL Database.
  6. Have Complex Data (Videos, Images, Files) - Go for Blob/Object storage.
  7. Complex Pre-computation(news feed) - Use Message Queue & Cache.
  8. High-Volume Data Search - Consider search index, tries or search engine(ElasticSearch).
  9. Scaling SQL Database - Implement Database Sharding.
  10. High Availability, Performance, & Throughput - Use a Load Balancer.
  11. Global Data Delivery - Consider using a CDN.
  12. Graph Data (data with nodes, edges, and relationships) - Utilize Graph Database.
  13. Scaling Various Components - Implement Horizontal Scaling.
  14. High-Performing Database Queries - Use Database Indexes.
  15. Bulk Job Processing - Consider Batch Processing & Message Queues.
  16. Server Load Management & Preventing DOS Attacks- Use a Rate Limiter.
  17. Microservices Architecture - Use an API Gateway(Authentication, SSL Termination, Routing etc).
  18. For Single Point of Failure - Implement Redundancy.
  19. For Fault-Tolerance and Durability - Implement Data Replication.
  20. For User-to-User fast communication - Use Websockets.
  21. Failure Detection in Distributed Systems - Implement a Heartbeat.
  22. Data Integrity - Use Checksum Algorithm.
  23. Efficient Server Scaling - Implement Consistent Hashing.
  24. Decentralized Data Transfer - Consider Gossip Protocol.
  25. Location-Based Functionality - Use Quadtree, Geohash, etc.
  26. Avoid Specific Technology Names - Use generic terms, like Kafka->Message Queues, S3->Object Storage etc.
  27. High Availability and Consistency Trade-Off - Eventual Consistency.
  28. For IP resolution & Domain Name Query - Mention DNS.
  29. Handling Large Data in Network Requests - Implement Pagination.
  30. Cache Eviction Policy - Preferred is LRU (Least Recently Used) Cache.
  31. To handle traffic spikes: Implement Autoscaling to manage resources dynamically
  32. Need analytics and audit trails - Consider using data lakes or append-only databases
  33. Handling Large-Scale Simultaneous Connections - Use Connection Pooling and consider using Protobuf to minimize data payload
  34. To prevent overloading systems: Use Token Bucket and Leaky Bucket algorithms
  35. Minimize deployment downtime: Implementing Blue-Green deployment to minimize downtime and reduce risks.