19

NFS vs AFS

 6 years ago
source link: http://threezj.com/2018/08/20/NFS vs AFS/?amp%3Butm_medium=referral
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

周末读了ostep的两篇文章 Sun’s Network File SystemThe Andrew File System ,都是讲的分布式文件系统,但是侧重的方向不同,导致相关实现也全然不同,写篇笔记对比一下。

NFS

NFS的goal是fast crash recovery and simple,所以它的设计都是为这个目的服务。

key design

  • stateless

    server不保存任何有关client的状态。假如crash,不用做任何操作,直接重启即可。这是一个最重要的设计。需要的信息都通过rpc的参数传递过来。

  • idempotent

    接口都做到幂等性,这样做主要是为了处理message lost 或者 server crash这些情况,client只需要retry即可。

  • client-cache

    这主要为性能考虑,但同时为带来一致性问题。NFS通过前先通过getattr request发送给server,查看cache是否过期,一般是周期性的问一下,比如所3s。同时在close的时候将cache刷回server。

AFS

AFS却不同,它的goal为scale。也就是如何让server能支持更多的服务器。为了支持很多的client,要做的就是减少与client 与server的交互,也就减少了server的资源占用(cpu/network)。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK