orangain flavor

じっくりコトコト煮込んだみかん2。知らないことを知りたい。

Amazon S3のUS Standardリージョンって何?

EC2などのサービスでは US East (Northern Virginia) というリージョンが存在しますが、S3だけは US East の代わりに、US Standard というリージョンが存在します。何故なのか気になるのでちょっと調べてみました。

f:id:mi_kattun:20140607200533p:plain

AWS公式資料から

US Standardへのリクエストは自動的に Northern Virginia または Pacific Northwest *1 にルーティングされるとのことです。

この認識が正しければ、S3で自動的に作られるオブジェクトの3つ以上の複製が、これら2つのリージョンにまたがって保管されていると考えられます。

 This region automatically routes requests to facilities in Northern Virginia or the Pacific Northwest using network maps.

Buckets and Regions - Amazon Simple Storage Service

転送量課金の面では、US East (Northern Virginia) と同じリージョンという扱いです。

 リージョン間でコピーリクエストを通じて転送されるデータは、S3 詳細ページの料金表セクションに指定された料金で課金されます。同じリージョン内にある Amazon EC 2 と Amazon S3 間、もしくは米国東部の Amazon EC2 と米国スタンダードの Amazon S3 間でデータ転送を行った場合、請求は発生しません。

よくある質問 - Amazon S3 (クラウドストレージサービス Amazon Simple Storage Service) | アマゾン ウェブ サービス(AWS 日本語)

ちなみに、US Standardのみデータ整合性モデルが異なります。想像ですが、2つのリージョンにまたがって複製されるため、強い整合性を採用できなかったのかもしれません。

米国西部(オレゴン)、米国西部(北カリフォルニア)、欧州(アイルランド)、アジアパシフィック(シンガポール)、アジアパシフィック(東京)、アジアパシフィック(シドニー)、および南米(サンパウロ)リージョンの Amazon S3 バケットは、新しいオブジェクトの PUTS に対して、「書き込み後の読み込み」整合性を提供します。また、PUTS および DELETES の上書きについて、結果整合性を提供します。米国スタンダードリージョンの Amazon S3 バケットは、結果整合性を提供します。

よくある質問 - Amazon S3 (クラウドストレージサービス Amazon Simple Storage Service) | アマゾン ウェブ サービス(AWS 日本語)

中の人に聞いた方のブログ記事から

Shlomo Swidler氏が、AWSのJeff Barr氏にRead-After-Write ConsistencyがUS Standardで提供されない理由を聞いたというブログ記事です。

その理由は「US Standardが米両岸にまたがる論理リージョンだから」と書かれています。やはり上での想像は正しかったようです。

Read-after-write consistency for AWS S3 is was only available in the US-west and EU regions, not the US-Standard region. I asked Jeff Barr of AWS blogging fame why, and his answer makes a lot of sense:

This is a feature for EU and US-West. US Standard is bi-coastal and doesn’t have read-after-write consistency.

Aha! I had forgotten about the way Amazon defines its S3 regions. US-Standard has servers on both the east and west coasts (remember, this is S3 not EC2) in the same logical “region”. The engineering challenges in providing read-after-write consistency in a smaller geographical area are greatly magnified when that area is expanded. The fundamental physical limitation is the speed of light, which takes at least 16 milliseconds to cross the US coast-to-coast (that’s in a vacuum – it takes at least four times as long over the internet due to the latency introduced by routers and switches along the way).

Read-After-Write Consistency in Amazon S3

結論

Amazon S3のUS Standardリージョンは、アメリカ東西海岸にまたがる論理リージョンです。 ただ転送量課金の面では、US East (Northern Virginia)と同じと考えて問題ないでしょう。

もう少し明確なソースがありそうな気がしますが、見つけられませんでした。ご存じの方は教えて頂けるとありがたいです。

参考:

*1:Oregonのことかと思いましたが、Oregonは2011年に始まった比較的新しいリージョンなので違うかもしれません。わかりません。