Sunday, April 24, 2022

Udemy -> Pragmatic System design | Section 15: Design a news feed (aka Twitter)

 April 24, 2022

Introduction

I have to take down some notes, and then I will start to read more carefully and also follow the presentation better. 

How to scale 


  • Read replicas?
  • Sharding?
  • Cache?
Read replicas
300K reads per second
20K reads per replica? = 15 replicas
50K reads per replica? = 6 replicas
Pros: Simplicity
Cons: Cost and space requirements

Sharding

300K reads per second
10K reads per shard? - 30 shards
25K read per shard? = 12 shards
Pros: less costly than replicas, since each shard is smaller 
Cons: architectural complexity

Sharding - space requirements
30TB of data
30 shards => 1TB for each
12 shards -> 3TB for each

Caching


Cache aside?
Read through?

Caching and storage
86GB per day
3 instances for read purposes
Every instance is 32GB?





No comments:

Post a Comment