Key Concepts for System Design - Deepstash

Keep reading for FREE

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.

12

125 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.

13

83 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.

12

65 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).

12

63 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

12

63 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.

13

81 reads

CURATED BY

ocpodariu

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

CURATOR'S NOTE

📖 Cracking the Coding Interview

stash-superman-illustration

Explore the World’s

Best Ideas

200,000+ ideas on pretty much any topic. Created by the smartest people around & well-organized so you can explore at will.

An Idea for Everything

Explore the biggest library of insights. And we've infused it with powerful filtering tools so you can easily find what you need.

Knowledge Library

Powerful Saving & Organizational Tools

Save ideas for later reading, for personalized stashes, or for remembering it later.

# Personal Growth

Take Your Ideas

Anywhere

Organize your ideas & listen on the go. And with Pro, there are no limits.

Listen on the go

Just press play and we take care of the words.

Never worry about spotty connections

No Internet access? No problem. Within the mobile app, all your ideas are available, even when offline.

Get Organized with Stashes

Ideas for your next work project? Quotes that inspire you? Put them in the right place so you never lose them.

Join

2 Million Stashers

4.8

5,740 Reviews

App Store

4.7

72,690 Reviews

Google Play

Sean Green

Great interesting short snippets of informative articles. Highly recommended to anyone who loves information and lacks patience.

Shankul Varada

Best app ever! You heard it right. This app has helped me get back on my quest to get things done while equipping myself with knowledge everyday.

samz905

Don’t look further if you love learning new things. A refreshing concept that provides quick ideas for busy thought leaders.

Ashley Anthony

This app is LOADED with RELEVANT, HELPFUL, AND EDUCATIONAL material. It is creatively intellectual, yet minimal enough to not overstimulate and create a learning block. I am exceptionally impressed with this app!

Jamyson Haug

Great for quick bits of information and interesting ideas around whatever topics you are interested in. Visually, it looks great as well.

Laetitia Berton

I have only been using it for a few days now, but I have found answers to questions I had never consciously formulated, or to problems I face everyday at work or at home. I wish I had found this earlier, highly recommended!

Giovanna Scalzone

Brilliant. It feels fresh and encouraging. So many interesting pieces of information that are just enough to absorb and apply. So happy I found this.

Ghazala Begum

Even five minutes a day will improve your thinking. I've come across new ideas and learnt to improve existing ways to become more motivated, confident and happier.

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving & library

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Personalized recommendations

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