其他分享
首页 > 其他分享> > 【MIT 6.824 】分布式系统 课程笔记(二)Lecture 03 : GFS

【MIT 6.824 】分布式系统 课程笔记(二)Lecture 03 : GFS

作者:互联网

Lecture 03 : GFS

一、一致性

1, 弱一致性

可能会读到旧数据

2, 强一致性

读到的数据都是最新的

3, 一致性比较

二、系统设计

1, 为什么chunks那么大

2, master知道文件架构

3, client读过程

4, client写过程

5,record append

Client record append
    client asks master for chunk locations
    client pushes data to replicas, but specifies no offset
    client contacts primary when data is on all chunk servers
      primary assigns sequence number
      primary checks if append fits into chunk
        if not, pad until chunk boundary
      primary picks offset for append
      primary applies change locally
      primary forwards request to replicas
      let's saw R3 fails mid-way through applying the write
      primary detects error, tells client to try again
    client retries after contacting master
      master has perhaps brought up R4 in the meantime (or R3 came back)
      one replica now has a gap in the byte sequence, so can't just append
      pad to next available offset across all replicas
      primary and secondaries apply writes
      primary responds to client after receiving acks from all replicas

三、错误

如果master下线了 shadow master可以提供服务, 但是只能提供读操作(脑裂额综合征,导致不能写)

四、 总结

1, GFS缺陷

五、参考

1. GFS.paper

2. lecture 03

标签:03,6.824,chunk,primary,client,master,分布式系统,备份,append
来源: https://www.cnblogs.com/leyang2019/p/11960192.html