Caching - Deepstash
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).

7 STASHED

Key Concepts for System Design

πŸ“– Cracking the Coding Interview

MORE IDEAS FROM THEARTICLE

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.

7 STASHED

1 LIKE

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.

7 STASHED

1 LIKE

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.

7 STASHED

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.

7 STASHED

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

7 STASHED

Deepstash helps you become inspired, wiser and productive, through bite-sized ideas from the best articles, books and videos out there.

GET THE APP:

RELATED IDEAS

Fit Stages

A successful value proposition requires fit between what the company offers and what customers want.

Fit happens in three stages:

  1. On paper: You identify customer jobs, pains, and gains that you can address with your value proposition.
  2. In the market: Customers positively react to your value proposition and you get market traction.
  3. In the bank: You find a scalable and profitable business model.

2 STASHED

3 LIKES

Searching for Fit

πŸ“– Value Proposition Design

JORDAN PETERSON

The purpose of life is finding the largest burden that you can bear and bearing it.

6 STASHED

6 LIKES

Jordan Peterson - epitome of awareness

πŸ“– Reading.

FEAR OF DEATH

Fear of death is the most common fear among everyone.

But the question is why do we fear death?Β 

  • Anything which is not in our experience triggers fears. Unkown things cause restlessness and fear, So we fear death because what is after death is unknown to us.
  • We can also understand the first point in this way, It is not death what most people fear, but the process that precedes it: THE DYING

10 STASHED

8 LIKES

Fear of Death and How to Overcome It

πŸ“– Reading

❀️ Brainstash Inc.