Skip to content
Logo Theodo

Choosing the best storage solution in GCP

Barbora Cernakova11 min read

Picture of a warehouse

Are you new to GCP, looking to make sense of all the storage offerings GCP provides or simply hoping to learn something new? You’re in the right place!

In this blog we’re going to compare the key differences between GCP’s numerous storage solutions. We will start by taking a look at a handy decision tree which gives you an overview of the various options. We will then categorise the available storage solutions into blob, relational, NoSQL, file, block and other storage. For each option, we will delve a bit deeper into the specifics and we will highlight the best suited use cases as well as flag any potential downsides. Let’s get started!


Decision tree

As promised, we’re starting with a decision tree to help you choose the best storage tool for your use case. Don’t worry if you’re not sure what all this means - we’ll take a look at each tool below.

Decision tree

Now let’s look at each of the options listed above in a bit more detail.


Blob storage

Blob storage allows you to store unstructured object data. This means that we’re looking at data which often consists of items (e.g. media files) which don’t need to sit within a file structure.

Cloud Storage

We’re starting with one of the most commonly used storage options - Cloud Storage. Cloud Storage is GCP’s blob storage solution and it is often used alongside other tools such as Compute Engine (service for creating and running virtual machines), App Engine (platform for building highly scalable applications using serverless) and BigQuery (data warehousing solution - more info below). In terms of its structure, it uses buckets to group items.

Benefits

Downsides

In terms of common use cases, Cloud Storage is an excellent option for archiving data for audits and for storing data for disaster recovery. It is also great for minimising latency for users who download large data objects since you can choose dual-regional or multi-regional storage to bring your data closer to your users.


Relational storage

Unlike with blob storage, relational databases organise data into tables which can be linked to each other. They are the industry standard and GCP provides a couple of options for storing relational data within the cloud.

Cloud SQL

Cloud SQL is the obvious choice when setting up a relational database in GCP. It provides a fully managed service which now allows you to create instances of MySQL, PostgreSQL as well as Microsoft SQL Server.

Benefits

Downsides

Cloud SQL is an excellent option if you’re looking to replicate your on-premise database within the cloud, or if you’d simply like to stick with a database you know already. This is exactly what happened with AutoTrader, a digital automotive marketplace. They were looking to move their on-premise infrastructure to the cloud, and they chose to move their existing Oracle database into Cloud SQL.

Cloud Spanner

GCP’s alternative to Cloud SQL is Cloud Spanner. Cloud Spanner provides a relational database structure with the added advantage of horizontal scaling.

Benefits

Downsides

Since Cloud Spanner offers strong consistency globally, it is well suited to financial applications. A fun real-life example is Pokemon Go, which uses Cloud Spanner due to the aforementioned feature.

Pokemon Go


NoSQL storage

By comparison to relational storage, NoSQL databases store data in non-tabular formats. This can include document storage, key-value pairs or wide-column databases. GCP offers two main NoSQL databases, which we will explore below.

Cloud Bigtable

Cloud Bigtable consists of sparsely populated columns, where rows are indexed by a single key. It is possible to group columns into column families to capture which columns are related. Each row-column intersection can contain multiple cells at different timestamps, and this allows Cloud Bigtable to record a history of data updates.

Benefits

Downsides

Cloud Bigtable works well for operational and analytical use cases, and is often used with IoT applications. A real-life example is Dow Jones, a news content and business information provider, who uses Cloud Bigtable to store their data before processing it for analytics.

Firestore (previously Datastore)

Previously known as Datastore, Firestore is the new generation of this NoSQL document database. Unlike Cloud Bigtable, it uses JSON to store data.

Benefits

Downsides

Firestore is an excellent choice for mobile and web applications at global scale. Thanks to its integration with Firebase, setting up Firestore can be a seamless experience. An example of Firestore being used in the real life is The New York Times, who use Firestore to support their real-time rich text editing tool.

New York Times


File and block storage

We are now moving on from nonSQL storage to file storage, by which we mean storage which allows us to replicate the commonly used file structure of nested folders. The best way of thinking about it is that it mimics the file system of a computer. Block storage, by comparison, stores data as separate pieces, where each piece can be uniquely identified. Block storage is very performant since it allows for data to be accessed via multiple paths.

Filestore

Filestore (not to be confused with Firestore) is GCP’s fully managed network attached storage (NAS) option. It is often used alongside instances of Compute Engine and Kubernetes Engine. Filestore also offers four tiers (basic HDD, basic SSD, high scale SSD and enterprise) to allow you to pick the best solution for your needs.

Benefits

Downsides

Filestore is often used for file sharing as well as high performance computing, e.g. genomics processing.

Persistent disk

We are now delving into the world of storage solutions for Compute Engine. GCP provides a variety of options within the persistent disk offering. As expected, at the the highest level of categorisation, you can choose between SSD and HDD.

Benefits

Downsides

The most common use case for persistent disks is, unsurprisingly, attaching them to Compute Engine instances.

Local ephemeral disk

The final file storage type we’ll cover is local ephemeral disk. The main difference between local ephemeral disks and persistent disks hides in the name - persistent disks retain data even if they are not attached to a virtual machine and the data will be kept until the disk is deleted. By comparison, the data stored on local disks is lost as soon as the virtual machine it is attached to is stopped or deleted.

Benefits

Downsides

Local disks are best suited if you need fast scratch disk or cache.


Other storage types

In this final section we introduce the remaining two storage solutions which don’t fit well into any of the categories mentioned above.

Memorystore

Memorystore is GCP’s fully managed service for Redis and Memcached. If you are interested in using either Redis or Memcached but don’t want the hassle of managing them, Memorystore is the storage option for you.

Benefits

Downsides

BigQuery

GCP’s data warehouse solution, BigQuery can handle data storage as well as analysis. It isn’t the most common storage solution, and is often used alongside other storage options for data analysis only.

Benefits

Downsides

One of GCP’s customers using BigQuery is The Home Depot, who use this tool to keep track of their stock across 50,000+ items and 2,000+ locations.

Hardware store


Conclusion

GCP provides a massive variety of data storage tools for all sorts of use cases. Selecting the best option can be difficult, since there are so many tools to choose from. My best advice is to start from your data type, this will often significantly narrow down the available possibilities. Afterwards, considering the location of your data (e.g. zonal or global), required consistency and capacity will help you decide. Make sure to consider cost as well - you can use GCP’s pricing calculator to get a sense of how expensive different solutions would be.

I hope that you’re this leaving this blog post with a clearer idea of the different storage options GCP provides. Remember that if none of the tools listed here fits your use case, you can always build your own solution on Compute Engine. Best of luck with your cloud journey!

Intro to storage options

Cloud SQL for AutoTrader

Cloud Spanner for Pokemon Go

Cloud Bigtable for Dow Jones

Firestore for The New York Times

BigQuery for The Home Depot

Pricing calculator

Images from Unsplash

Liked this article?