Replication And Sharding

향카청 cheatsheet·2021년 9월 10일

System Design

목록 보기
14/14

Replication:
THe act of duplicating the data from one database server to others. This is sometimes used to increase the redundancy of your system and tolerate regional failures for instance. Other times you can use replication to move data closer to your clients thus decreasing the latency of accessing specific data

Sharding:
Sometimes called data partitioning, sharding is the act of splitting a database into two or more pieces called shards and is typically done to increase the throughput of your database. Popular sharding strategies include:
-Sharding based on a client's region
-Sharding based on the type of data being stored(e.g: user data gets stored in one shard, payments data gets stored in another shard)
-Sharding based on the hash of a column (only fopr structed data)

Hot Spot:
When distributing a workload acress a set of servers, that workload might be spread unevenly. This can happen if your sharding key or your hashing fuction are suboptimal, or if your workload is natually skewed: some servers will receive a lot more traffic than others, thus creating a hot spot

0개의 댓글