TFS的写操作流程:

只有当所有的DataServer都备份完成了 才会返回写入成功

TFS的读写操作
TFS写操作流程

客户端首先向nameserver发起写请求,nameserver需要根据dataserver上的可写块,容量和负载加权平均来选择一个可写的block。并且在该block所在的多个dataserver中选择一个作为写入的master,这个选择过程也需要根据dataserver的负载以及当前作为master的次数来计算,使得每个dataserver作为master的机会均等。master一段选定,除非master宕机,不会更换,一旦master宕机,需要在剩余的dataserver中选择新的master。返回一个dataserver列表。

客户端向master dataserver开始数据写入操作。master server将数据传输为其他的dataserver节点,只有当所有dataserver节点写入均成功时,master server才会向nameserver和客户端返回操作成功的信息

TFS的读操作流程:

1.根据TFS文件名解析出BlockId 和 File Id

2.像NameServer请求 通过BlockId 和File Id 拿到对应的DataServer服务器

  1. 通过发送Block_ID、File_ID和offset为参数的读请求到对应的dataserver,得到文件内容。


    TFS的读写操作
    TFS的读操作流程

相关文章:

  • 2022-02-16
  • 2021-08-14
  • 2021-10-01
  • 2022-12-23
  • 2022-12-23
  • 2021-10-27
  • 2021-10-08
  • 2022-12-23
猜你喜欢
  • 2021-09-04
  • 2021-10-10
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2022-01-08
  • 2021-10-20
相关资源
相似解决方案