ABCD of System Design
- A - Always ask good questions
- B - Buzz Words NO NO NO (Don't use words without proper knowledge or which you found out by quick researching for 10 minutes the previous day)
- C - Clear and Organized Thinking
- D - Drive Discussions (80 myself - 20 interviewr should speak Rule)
Things to consider
- Features
- API
- Availability
- Latency
- Scalability
- Durability
- Class Diagram
- Security and Privacy
- Cost-effective
Must know concepts for System Design Questions
- CAP Theory -> Consistency - Availability - Partition Tolerance
- Difference between SQL and NoSQL Databases (Which Database chooses what? over the above 3 (CAP))?
- Vertical Scaling (Increasing System Resources like Memory RAM, etc) or Horizontal Scaling (Increasing Number of Hosts - Making Distributed System)
- acid vs base database
- Partitioning or Sharding of Data (What is Consistent Hashing)
- Optimisstic Vs Pessimistic Locking in databases
- Strong vs Eventual Consistency
- Relational DB (follows ACID) vs NoSQL
- Types of NoSQL Databases
- Key-Value Pair
- Wide Column
- Document based
- Graph Based
- Caching
- Data Centers, Racks and Hosts
- CPU, Memory, Harddrive, Network Bandwidth
- Random vs Sequential Read/Write on Disk
- Http / Https vs WebSockets
- TCP / IP Model
- IPV4 vs IPV6
- TCP vs UDP
- DNS Look up
- Https and TLS
- Public Key Infrastructure & Certificate Authority
- Symmetric vs Asymmetric Key
- Load Balancer - L4 vs L7
- CDNs and Edge
- Bloom Filters and Count Min Sketch
- Paxos - Consensus over Distributed hosts, Leader Election
- Design Patterns and Object Oriented Design
- Virtual Machines and Containers
- Publisher Subscriber or Queue
- Map Reduce
- Multi threading, concurrency, locks and synchronization, CAS (Compare and Swap)
Some of the Tools that have implemented the above concepts
- Cassandra - 22:50
- MongoDB/Couchbase - 23:22
- Mysql - 22:36
- Memcached - 23:52
- Redis - 23:52
- Zookeeper - 24:30
- Kafka - 25:00
- NGINX - 25:17
- HAProxy - 25:17
- Solr, Elastic search - 25:32
- Amazon S3 - 25:45
- Docker, Kubernetes, Mesos - 26:00
- Hadoop/Spark and HDFS - 26:17
https://docs.datastax.com/en/cassandr... http://cloudurable.com/blog/kafka-arc... https://zookeeper.apache.org/doc/trun... http://www.allthingsdistributed.com/f... https://research.google.com/archive/b... https://en.wikipedia.org/wiki/CAP_the... https://en.wikipedia.org/wiki/Consist... https://www.mongodb.com/mongodb-archi... https://en.wikipedia.org/wiki/HTTP/2 https://en.wikipedia.org/wiki/Transpo...
- Facebook - Text messages within the chat are not encrypted
- Whatsapp / Signal - Text messages within the chat are encrypted. (Even company cannot read it).
- Cassandra DB - Cassandra is a free and open-source, distributed, wide-column store, NoSQL database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure.
- Redis DB (For Distributed Cache) - What is Redis database? What is Redis? Redis, which stands for Remote Dictionary Server, is a fast, open source, in-memory, key-value data store. Redis is an open source (BSD licensed), in-memory data structure store used as a database, cache, message broker, and streaming engine. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams.
- WebSocket - is a bidirectional communication protocol that can send the data from the client to the server or from the server to the client by reusing the established connection channel. The connection is kept alive until terminated by either the client or the server.
- HTTP - it is unidirectional (request -> response type). Server cannot initiate a communication by itself. In our scenario it is not helpful
- 3 users, 3 servers, load balancer, various tables within the database.
- Blob Storage - Blob storage enables companies to keep large amounts of data secured and stored within a Microsoft Azure storage account. Blob storage is a convenient, cost-effective and highly scalable cloud-based method of object storage. BLOB - Binary Large Object