Key Concepts for System Design - Deepstash
Key Concepts for System Design

Key Concepts for System Design

Ideas, facts & insights covering these topics:

6 ideas

·

557 reads

7

Explore the World's Best Ideas

Join today and uncover 100+ curated journeys from 50+ topics. Unlock access to our mobile app with extensive features.

Scaling

Scaling

Systems can be scaled:

  • Vertically - by increasing the resources of a specific node (more CPU, memory, disk etc.). This is easier to do, but it's limited. You can only add so many CPU cores and memory.
  • Horizontally - by adding more nodes of the same kind. This usually requires adding a load balancer in front of your nodes to distribute the load evenly.

15

140 reads

Database denormalization

Database denormalization

Joins in relational databases get very slow as the system grows bigger. You should denormalize your data to avoid joins and speed up your queries.

Normalized databases are designed to minimize redundancy, while denormalized databases are designed to optimize read time.

16

100 reads

Database sharding

Database sharding

Sharding means splitting your data across multiple nodes. This can be done in different ways:

1. Vertical sharding

  • Store tables on different nodes.
  • Drawback: If one of these tables gets very large, then you need to re-shard that database.

2. Key-based sharding

  • Use part of your data (usually the row ID) to shard it.
  • Drawback: The number of nodes is fixed. If you want to add more nodes, then you have to reallocate the data.

3. Directory-based sharding

  • Maintain a lookup table for where each data is found.
  • Drawback: The lookup table is a single point of failure, that's constantly under load.

16

78 reads

Caching

Caching

Caching systems are usually in-memory key-value databases that provide very fast access to data. They sit between your application and the database.

Depending on your use case, you can either cache only the results of the database queries, or cache the entire response objects (such as fully rendered web pages).

15

73 reads

Asynchronous processing

Asynchronous processing

Slow operations should be done asynchronously to avoid making users wait for long periods of time until their requests are processed.

Sometimes this can be done in advance, by pre-processing data that you know users will need. For example, a forum might periodically re-render its page of most popular posts and the number of comments.

Asynchronous processing usually requires 2 components:

  1. A queue that stores tasks, ordered by time and priority
  2. A system that processes tasks

16

73 reads

Networking metrics

Networking metrics

  • Bandwidth - Maximum amount of data that can be transferred in a unit of time. Usually expressed in bits per second.
  • Throughput - Amount of data that is actually transferred in a unit of time.
  • Latency - How long it takes data to go from one end to the other.

16

93 reads

IDEAS CURATED BY

ocpodariu

Alt account of @ocp. I use it to stash ideas about software engineering

CURATOR'S NOTE

📖 Cracking the Coding Interview

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Personalized microlearning

100+ Learning Journeys

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates