System Design


A - Ask good questions

B - Don't use buzzwords

C - Clear and organized thinking

D - Drive discussions with 80-20 rule

Things to consider

Features

API

Availability

Latency

Scalability

Durability

Class Diagram

Security and Privacy

Cost-effective

Concepts to know

Vertical vs horizontal scaling: if you need to scale up your system either in vertical scaling, which means add more memory, cpu or hard drive to an existing host. Or you do a horizontal scaling, which means keep one host small and add another host. So vertical scaling would be expensive, it does not have distributed problem but it holds single point failure. horizontal scaling can expand the machines infinitely, but need to deal with distributed challenge. horizontal scaling is more preferred.

CAP theorem: consistency / availability / partition tolerance. Distributed system can only satisfy two factor. Normally we must choose partition tolerance because it will drop network packets. for example, traditional relational database will choose consistency over availability which means it could be less available but their data is consistent. On the other hand, noSQL database prefer availability over consistency.

ACID vs BASE: Base stands for basically available soft state eventual consistency. Base is more used in NoSQL database. When you use Nosql database, you need to know which part of ACID can be sacrifice.

Partitioning/Sharding: When you need to store a trillion records of data, you cannot put them into one database in a machine. You need to partitioning them into several smaller parts. one effective way is to use Consistent Hashing

Optimistic vs pessimistic locking

Strong vs eventual consistency RelationalDB vs NoSQL Types of NoSQL Key value Wide column Document-based Graph-based Caching Data center/racks/hosts CPU/memory/Hard drives/Network bandwidth Random vs sequential read/writes to disk HTTP vs http2 vs WebSocket TCP/IP model ipv4 vs ipv6 TCP vs UDP DNS lookup Http

&

TLS Public key infrastructure and certificate authority(CA) Symmetric vs asymmetric encryption Load Balancer CDNs

&

Edges Bloom filters and Count-Min sketch Paxos Leader election Design patterns and Object-oriented design Virtual machines and containers Pub-sub architecture MapReduce Multithreading, locks, synchronization, CAS(compare and set) Tools Cassandra MongoDB/Couchbase Mysql Memcached Redis Zookeeper Kafka NGINX HAProxy Solr, Elastic search Amazon S3 Docker, Kubernetes, Mesos Hadoop/Spark and HDFS

results matching ""

    No results matching ""