Skip to content

Instantly share code, notes, and snippets.

@zeddee
Last active September 25, 2019 18:22
Show Gist options
  • Save zeddee/98dc67bc14cca1dc3da8e1635b8f6088 to your computer and use it in GitHub Desktop.
Save zeddee/98dc67bc14cca1dc3da8e1635b8f6088 to your computer and use it in GitHub Desktop.

Google Cloud Storage Notes

Documentation: https://cloud.google.com/storage/pricing#operations-by-class

Difference between Standard, Nearline, and Coldline storage

  • There are 3 storage classes for google cloud storage.
  • Docs describe the use-cases for each storage class, but needed to do a bit of close reading to understand the difference between the 3 products in terms of cost and usage.
  • Turns out that the differences between the 3 are:
    • Cost per GB
    • Cost per 10,000 Class A operation
    • Cost per 10,000 Class B operations
    • SLA guarantees (standard has more 9's)
  • This is where it gets a bit murky.
  • There are also costs for data ingress and egress.
    • These costs are the same for all storage classes
    • Comes up to ~US$0.12 per GB for moving data, unless it's China where it's US$0.23
    • Ingress is free
  • However, free ingress comes with a catch, because "operations" are a separate cost table.
  • So from what I understand, you're charged separately for moving data and performing an operation. See operations cost table
  • This means that nearline and coldline cost more to write and read from.

Operations cost table

API or Feature Class A Operations Class B Operations Free Operations
JSON API storage.*.insert1 storage.*.get storage.channels.stop
storage.*.patch storage.*.getIamPolicy storage.buckets.delete
storage.*.update storage.*.testIamPermissions storage.objects.delete
storage.*.setIamPolicy storage.*AccessControls.list storage.projects.hmacKeys.delete
storage.buckets.list storage.notifications.list
storage.buckets.lockRetentionPolicy Each object notification
storage.notifications.delete
storage.objects.compose
storage.objects.copy
storage.objects.list
storage.objects.rewrite
storage.objects.watchAll
storage.projects.hmacKeys.create
storage.projects.hmacKeys.list
storage.*AccessControls.delete
XML API GET Service
GET Bucket (when listing objects in a bucket) GET Bucket (when retrieving bucket configuration) DELETE
PUT GET Object
POST HEAD
Object Lifecycle Management SetStorageClass Delete

1 Simple, multipart, and resumable uploads with the JSON API are each considered one Class A operation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment