To optimize the cost of storing your data, based on the projected frequency of operations on objects in a bucket, you can choose one of the following storage classes as a default one for all of the objects in a bucket:
- Standard class is the default one if you don’t make any choice. It is the best choice for frequent access to data, but it also has the highest price per GB. However, out of all the available classes, the price for operations such as insert, list, or copy is the lowest:
- Use case: Hosting website content, media streaming and sharing, content storage for frequently accessed data, and serving data for gaming applications.
- Nearline will be the best if you access your objects less frequently than once per month. It has a lower price per GB than the Standard class, but if you decide to delete, replace, or move data sooner than 30 days, you will have to pay for early deletion, as if this object was actually stored for 30 days. Nearline also has higher operations charges than Standard:
- Use case: Statistical data that is analyzed once per month, data archives, sporadically accessed multimedia content.
- Coldline is a good fit for data accessed less frequently than once a quarter. However, its minimum storage duration is 90 days, and, similar to Nearline, if you decide to delete, replace, or move data sooner, you will be charged the early deletion fee. In addition, making operation charges on objects costs more for Coldline than Nearline:
- Use case: Archival storage, data accessed once a year, all rarely used data.
- Archive is designed for the least frequently accessed data but performs similarly to other storage classes. It is important to note that objects belonging to the Archive class are as easily accessible as ones from other classes. You don’t have to restore them first to another class to be able to access them. However, data operations are the most expensive for the Archive class compared to other classes. Also, data deleted after a few months will incur the same cost as if it was stored for a whole year:
- Use case: Data that is not expected to be accessed. It is a replacement for storing data on tapes but without weeks-long restores and with high durability for long-term storage requirements – for example, 3-7 years.
The following figure shows how the price and availability can differ depending on the storage class used for a Google Cloud Storage bucket with 1 TB of data. On the left, we have the Standard class, which is the most expensive but has the highest availability and no early deletion fees. On the right, we can see that an Archive class bucket can get expensive if data is retrieved earlier than expected in one year:
Figure 8.3 – An example of how price and availability values change for the same amount of data depending on a storage class for a regional bucket in europe-central2
Note that all storage classes offer similar performance and response times in milliseconds. They also have a consistent set of APIs and similar tooling. The difference is mainly in the cost metrics. Also, Standard storage provides the highest availability.