Standard vs Nearline vs Coldline vs Archive in GCP: Key Differences
Standard storage is for frequently accessed data, Nearline is for data accessed less than once a month, Coldline suits data accessed less than once a quarter, and Archive is for rarely accessed data, like backups, accessed less than once a year. Costs decrease from Standard to Archive, but access times and retrieval fees increase.Quick Comparison
This table summarizes the main differences between GCP storage classes.
| Storage Class | Access Frequency | Storage Cost (per GB/month) | Retrieval Cost | Minimum Storage Duration | Use Case |
|---|---|---|---|---|---|
| Standard | Frequent (multiple times per month) | Highest | None | None | Active data, websites, apps |
| Nearline | Less than once a month | Lower than Standard | Moderate | 30 days | Backup, data accessed monthly |
| Coldline | Less than once every 3 months | Lower than Nearline | Higher | 90 days | Disaster recovery, archival |
| Archive | Less than once a year | Lowest | Highest | 365 days | Long-term archival, compliance |
Key Differences
Standard storage is designed for data you need often and quickly, like website files or active databases. It has the highest storage cost but no extra fees for accessing data.
Nearline is cheaper for storage but charges a fee when you retrieve data. It suits backups or data you check monthly. It requires you to keep data for at least 30 days to avoid extra charges.
Coldline lowers storage costs further but increases retrieval fees and minimum storage duration to 90 days. It is ideal for disaster recovery or data you rarely need but want to keep accessible.
Archive offers the lowest storage cost but the highest retrieval cost and slowest access times, with a minimum 365-day storage. Use it for data you almost never access but must keep long-term, like compliance records.
Code Comparison
Here is how to create a Standard storage bucket using the gcloud command-line tool.
gcloud storage buckets create my-standard-bucket --location=us --storage-class=STANDARDNearline Equivalent
To create a Nearline storage bucket, change the storage class in the command.
gcloud storage buckets create my-nearline-bucket --location=us --storage-class=NEARLINEWhen to Use Which
Choose Standard when you need fast, frequent access to your data, like for websites or apps.
Choose Nearline for data you access less than once a month, such as monthly backups.
Choose Coldline for data accessed rarely, like quarterly disaster recovery copies.
Choose Archive for long-term storage of data you almost never access but must keep, like compliance archives.
Key Takeaways
gcloud commands to create buckets with the desired storage class easily.