System Design Interview – An insider's guide
Rate it:
Open Preview
Kindle Notes & Highlights
by Alex Xu
Read between September 7, 2020 - January 31, 2023
3%
Flag icon
Non-relational databases might be the right choice if: •Your application requires super-low latency. •Your data are unstructured, or you do not have any relational data. •You only need to serialize and deserialize data (JSON, XML, YAML, etc.). •You need to store a massive amount of data.
3%
Flag icon
A master database generally only supports write operations. A slave database gets copies of the data from the master database and only supports read operations.
4%
Flag icon
Advantages of database replication: •Better performance: In the master-slave model, all writes and updates happen in master nodes; whereas, read operations are distributed across slave nodes. This model improves performance because it allows more queries to be processed in parallel. •Reliability: If one of your database servers is destroyed by a natural disaster, such as a typhoon or an earthquake, data is still preserved. You do not need to worry about data loss because data is replicated across multiple locations. •High availability: By replicating data across different locations, your ...more
4%
Flag icon
A cache is a temporary storage area that stores the result of expensive responses or frequently accessed data in memory so that subsequent requests are served more quickly.
5%
Flag icon
Consider using cache when data is read frequently but modified infrequently.
5%
Flag icon
A CDN is a network of geographically dispersed servers used to deliver static content. CDN servers cache static content like images, videos, CSS, JavaScript files, etc.
6%
Flag icon
Each web server in the cluster can access state data from databases. This is called stateless web tier.
7%
Flag icon
To further scale our system, we need to decouple different components of the system so they can be scaled independently. Messaging queue is a key strategy employed by many real-world distributed systems to solve this problem.
7%
Flag icon
A message queue is a durable component, stored in memory, that supports asynchronous communication. It serves as a buffer and distributes asynchronous requests.
8%
Flag icon
Sharding separates large databases into smaller, more easily managed parts called shards. Each shard shares the same schema, though the actual data on each shard is unique to the shard.
9%
Flag icon
When choosing a sharding key, one of the most important criteria is to choose a key that can evenly distributed data.
13%
Flag icon
The ability to ask good questions is also an essential skill, and many interviewers specifically look for this skill.