2013-11-13 15:22
浏览 51


I have an Nginx Server with php-fpm installed on Centos 6.4

1. Current status:

I use the NFS server to hold versions and files, Nginx mounts the NFS and serves files from it. this scenario is working and handles large volumes of traffic

2. Desired scenario

Replace the NFS with S3 and mount it using fuse & s3fs. In that scenario the server fails when forced to handle high traffic.

Is fuse & s3fs much slower or am i missing something? Thx

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • douliwang6896 2013-11-13 15:35

    The problem is in thinking that S3 behaves like an NFS mount. It does not. NFS and other disk volumes work on blocks, s3 works on entire objects. Generally when accessing files from s3fs, the entire file is copied to tmp and it has much higher latency than disk access.

    A couple of solutions:

    If you prefer NFS, you can set up an NFS share from a separate instance and mount it on the instances that need it.

    Otherwise, you can deploy your code directly to the instance itself, (which is something you can automate) and run your code from there. Static assets could be served directly from s3 via cloudfront and/or with cloudfront using a custom origin.

    点赞 打赏 评论
  • douchuoliu4422 2013-11-14 15:32

    Take a look at RioFS project, it allows you to mount S3 bucket as local directory (we are using fuse). As datasage mentioned earlier: you can't really compare NFS with S3, as these two are completely different filesystems used in different scenarios. RioFS let you upload / download files and list directory content. Anything extra (like appending data to a file) is not supported.

    点赞 打赏 评论

相关推荐 更多相似问题