楼主: liuxf666
802 5

[学习笔记] [学习笔记]System Design Examples - 2. Design a key-value store [推广有奖]

  • 1关注
  • 3粉丝

已卖:70份资源

学科带头人

54%

还不是VIP/贵宾

-

威望
0
论坛币
13005 个
通用积分
409.9229
学术水平
109 点
热心指数
112 点
信用等级
103 点
经验
71218 点
帖子
1079
精华
0
在线时间
1538 小时
注册时间
2016-7-19
最后登录
2024-6-8

楼主
liuxf666 发表于 2019-4-20 03:31:05 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
#0. Requirements:
  • put(key, value)
  • get(key)

1 Single Server key-value store
# Problem: can't fit everything in memory
Solutions:
  • Compress the data
  • Store the data on disk and only put frequently used data in hash table

2 Distributed Key-Value store
#1 CAP theorem
refer to previous notes.

#2 Design Goals
  • Ability to store "big data" (> 1T)
  • High availability: always respond quickly, even during failures
  • Scalability
- The system can be scaled to support thousands of servers easily- Addition/deletion of servers should be easy
- Heterogeneity: the work distribution must be proportional to the capability of individual servers.
- Tunable tradeoffs between consistency and latency
- Low latency read and write operations (On average < 10 ms for reads, < 20 ms for writes)
- Comprehensible conflict resolution
- Robust failure detection and resolution techniques
#3 System Architecture
  • Data Partition
    • Goals:
- distribute data across multiple servers evenly.
- minimize data movement when nodes are added or removed.


  • Consistent hashing:
  • Approach:
- servers (virtual nodes, i.e. 100 virtual nodes/server) are placed on a hash ring.
- a key is hashed into the same ring, and it is stored in the first server that it encounters while traveling in clockwise direction.





      • Advantages for consistent hashing
- High scalability
- Heterogeneity: make the number of virtual nodes proportional to the server capacity

  • Data Replication: data replicated asynchronously over N servers (N is a configurable parameter, N < number of servers in the system)



    • Consistency: Quorum consensus can be used to guarantee consistency for both read and write operations.
      • Failure Scenarios
#1. learn the techniques to detect failures.
#2. learn common failure scenarios and failure resolution strategies



    • Failure Detection
#1 all-to-all multicasting - not efficient when there are lots of servers in the system
#2 decentralized failure detection methods like gossip protocol for inter-node communication.


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Examples example Design System Store

已有 1 人评分论坛币 学术水平 热心指数 信用等级 收起 理由
经管之家编辑部 + 100 + 3 + 3 + 3 精彩帖子

总评分: 论坛币 + 100  学术水平 + 3  热心指数 + 3  信用等级 + 3   查看全部评分

本帖被以下文库推荐

沙发
充实每一天 发表于 2019-4-20 06:03:02 来自手机
点赞

藤椅
经管之家编辑部 在职认证  发表于 2019-4-20 06:47:52
为您点赞!

板凳
从1万到一亿 在职认证  发表于 2019-4-20 08:39:58

报纸
珍惜点滴 学生认证  发表于 2019-4-20 16:49:12
感谢的分享,向您学习,赞!

地板
胡明敏 发表于 2019-5-4 20:06:47
谢谢分享

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
jg-xs1
拉您进交流群
GMT+8, 2025-12-26 14:55