UGA Boxxx

つぶやきの延長のつもりで、知ったこと思ったこと書いてます

【GCS】大容量長期アーカイブ向け「Archive」クラス

外部APIのレスポンス結果などのログをGCSに溜めているが、アクセス頻度は障害の原因調査のときにちょっとみるくらいの頻度

このようにファイルへのアクセスが年に1度あるかないかの頻度の場合は「Archive」と呼ばれるストレージクラスがよいという話を聞いたので調べてみた

cloud.google.com

料金体系はこんな感じ

f:id:uggds:20200707004257p:plain

Archiveクラスとは

  • 1か月あたりGBあたり$ 0.0012から始まる価格で長期データを保持するように設計されているストレージ
  • 1年以上保存され、1年に1回未満しかアクセスされないデータに最適

Archive利点

  • Cost-effective: Low cost, starting at $0.0012 per GB per month.
  • Secure: All data is encrypted at rest and in transit by default.
  • Durable: 11 9’s of durability. Optional geo-redundancy helps protect against regional failure and increases availability.
  • Instant Access: Like all Cloud Storage classes, accessible with millisecond latency.
  • Open: Suitable for Google-specific and multi-cloud architectures alike.
  • Scalable: Start with as little data as you want and grow to beyond exabytes.
  • Simple: Same API across all storage classes for access and management consistency. Fully integrated with Object Lifecycle Management, as reducing your storage TCO never goes out of fashion.
  • Immutable: Applying Bucket Lock to a storage bucket in the Archive class can help you achieve WORM compliance for long-term data storage.

Archive storage class for coldest data now available | Google Cloud Blog

既存のストレージに対して

既に利用中のGCSのストレージクラスはRegional Storageだった

Regional Storageは追加クラスと呼ばれるもので、以下のように書かれている

Cloud Storage は複数の追加のストレージ クラスをサポートしていますが、Cloud Console を使用してこれらのクラスを設定することはできません。これらの追加クラスのいずれかをすでに使用している場合を除き、代わりに Standard Storage を使用する必要があります。

  • Regional Storage: Standard Storage と同等ですが、Regional Storage はリージョンに格納されているオブジェクトにのみ使用できる点が異なります。

https://cloud.google.com/storage/docs/storage-classes?hl=ja#legacy

すでに使用している場合以外は現在は使えないみたい

編集からArchiveクラスに変更可能だが、変更後に保存されたファイルのみが対象とのこと

Changing this bucket’s default storage class affects only objects uploaded after the new storage class is saved. To change your current objects’ storage classes, use gsutil or the Cloud Storage API.