开源项目 minio - 可以让你部署一套兼容 Amazon S3 的文件存储服务

huacnlee · November 24, 2016 · Last by huacnlee replied at November 24, 2016 · 6018 hits

Minio is an object storage server released under Apache License v2.0. It is compatible with Amazon S3 cloud storage service. It is best suited for storing unstructured data such as photos, videos, log files, backups and container / VM images. Size of an object can range from a few KBs to a maximum of 5TB.

看介绍说它是实现兼容 Amazon S3 的文件存储服务,也就是说如果你不想用一些云存储服务(例如 Aliyun OSS,UpYun,七牛什么的...)你想省钱,或者业务要求不能那么做。

在这种情况下,我们除了直接存磁盘还有别的选择吗?现在有这个好了!

好处

  1. 由于是兼容 Amazon S3 的,也就是说那些增对 S3 的 Ruby 库(当然不止 Ruby 的)是可以用的,我已经看到介绍说可以用 aws-sdk 这个 Gem 了。
  2. 你无需在考虑怎么组织你的文件服务器,怎么设定文件存储规则;
  3. 有 Docker 的方式,pull 下来就能跑了

还有 Web 管理界面的哦!

Ruby 里面使用

看起来只需要修改一下 AWS 的配置信息就可以了:

Aws.config.update(
  region: 'us-east-1',
  endpoint: "http://127.0.0.1:9000",
  force_path_style: true,
  credentials: Aws::Credentials.new(
    "Q3AM3UQ867SPQQA43P2F",
    "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"
  )
)

项目地址:https://github.com/minio/minio

Go 写的,很赞。我们用的是他们的 Go client 来访问 S3。顺带说一句,这种 Object Storage,根据 guid 而不是路径访问文件是未来的趋势。

node 的有 https://github.com/scality/S3

ruby 的有 https://github.com/jubos/fake-s3

都兼容 S3,可以用这些自建存储,外面在套上 CDN 或其他云服务

关键是稳定性怎么样,会不会丢数据,云服务商的好处是可以自动做多重备份

#3 楼 @numbcoder 这总比直接磁盘存储好吧

You need to Sign in before reply, if you don't have an account, please Sign up first.