官网:开始-简介
百度文库:AmazonS3架构分析
知乎:S3高可靠演进
S3核心思想:
从使用者角度,存储的形式/载体是以桶来管理。可以创建桶(Bucket),然后可以往桶里存储对象(文件),一个桶可以放很多对象。可以使用http的一组api对对象进行管理。
S3就像一个部署在全球网络的硬盘,如果地方比较固定,可以指定桶所在的区域region如华南来减少时延。
存储的实现由一系列组件完成:webservice为对外接口,coordinator负责协调请求,nodepicker负责选择副本存储位置,keymap负责索引,bitStore完成存储,replicator来复制副本,DFDD监控
桶和对象是对外部概念,具体对象存储在BitrStore Node。
S3会出故障吗?
会的,出现过还不止一次。有服务暂停几个小时的,但确凿的丢数据的报道没有。服务说明按时间,99%可用,具体看不同区域的说明。
AWS中断 对Amazon S3用户造成严重破坏
AWS 的 S3 故障回顾和思考
AWS S3 上有少量的数据丢失,不知道该怎么搞?
s3常用操作
创建profile
询问管理员要id,key等信息:
]# aws configure --profile webscaleaws_access_key_id = xxxxidaws_secret_access_key = yyyykeyDefault region name [None]: us-gov-west-1Default output format [json]: json
测试
>cat testS3.sh#!/bin/bash#input keys#echo "type accesskey:"#read accesskey#echo "type secret:"#read secret#echo accesskey=$accesskey,secret=$secret.url="http://192.168.52.40:8084"profile="webscale"#1.create bucket#list buckets#aws s3 ls --profile $profile --endpoint-url $urlaws s3 ls --profile $profile --endpoint-url $url#createaws s3 mb s3://bucket-test --profile $profile --endpoint-url $url#listaws s3 ls s3://bucket-test --profile $profile --endpoint-url $url#2.push fileaws s3 ls s3://bucket-test --profile $profile --endpoint-url $urlaws s3 cp /etc/yum.conf s3://bucket-test/ --profile $profile --endpoint-url $url#3.ls filesaws s3 ls s3://bucket-test --profile $profile --endpoint-url $url#4.delete fileaws s3 rm s3://bucket-test/yum.conf --profile $profile --endpoint-url $urlaws s3 ls s3://bucket-test --profile $profile --endpoint-url $url#5.delete bucketaws s3 rb s3://bucket-test --profile $profile --endpoint-url $urlaws s3 ls --profile $profile --endpoint-url $url
