CodeX
Published in

CodeX

Mastering Storage on Google Cloud

Getting ready for a Google Cloud Platform certification? let's refresh some of that Storage knowledge.

Google Cloud Platform — Storage Services

So, What was storage again?

You need to know that storage on GCP goes far beyond just storage. In this category of services, you can find Cloud SQL -which is a fully managed relational database- or Big Table -which is a No-SQL database-.

There are 5 crucial services categorized as storage and they are covered in the certification exam. This said, reviewing them is a must for your preparation, We will take a sneak peek into:

  1. Cloud Storage.
  2. Cloud SQL.
  3. Cloud Spanner.
  4. Cloud Bigtable.
  5. Cloud Datastore.

Cloud Storage

Is the most basic of them all, it offers durable and highly available storage. It stores your files as sequences of bytes or Binary Large Objects and the intention is for you to just keep data in there, so, ‘storage’ is not the same as file system, in other words -Cloud Storage objects are immutable-.

Security is built-in. Encryption at rest, and during transfer are default features (and I don't think you can opt-out…).

Data traveling between a customer’s device and Google is encrypted by default using HTTPS/TLS (Transport Layer Security). -Google

There are a few different options for data import/export. From a simple CLI command or drag and drop in your browser to third-party services where you can send your petabytes of data and have them loaded for you.

There is also the Storage Transfer Service which lets you schedule and manage batch transfers to Cloud Storage from another cloud provider, from a different Cloud Storage region, or from an HTTP(S) endpoint.

Storage Classes

Currently, there are four different types of storage classes:

  • Regional - high-performance intended for day-to-day use.
  • Multi-regional - Same + replication and expensive.
  • Nearline - Low cost, meant for infrequently accessed.
  • Coldline - Even cheaper, meant for archiving, online backup, and disaster recovery (but, retrieving data is expensive).

Go deeper into their documentation following this -link for storage.

Cloud SQL

It offers a fully managed relational database and you get to choose between MySQL and PostgressSQL.

Fully managed means that you hand off many maintenance tasks like applying patches and updates, managing backups, and configuring replications to Google. The idea of this type of service is that you can put your focus and effort into building your application instead of administering a database (or whatever other service).

It also means that this service comes out of the box with:

  • Automatic replication.
  • Managed backups.
  • Vertical scaling (read and write).
  • Horizontal scaling (read).
  • Google security (Data is encrypted when on the internal network, within database tables, temporary files, and backups).

Go deeper into their documentation following this -link for SQL.

Cloud Spanner

Google’s own Relational Database:

  • Fully Managed with unlimited scale.
  • Automatic replication.
  • Strong global consistency.
  • Managed instances with high availability.
  • SQL (ANSI 2011 with extensions).
  • Database sizes exceeding 2 TB.
  • Many IOPS (Tens of thousands of reads/writes per second or more).

Everything you would expect from a relational database. -Google

Personally, I haven't used this service, Google states it is great for any business requirement, for a wide range of industries that can go from Financial Services to Gaming. The idea is -If you need a relational database with high processing power, scalability and availability- Spanner should give you the best of this trifecta for the best price/benefit relation.

Go deeper into their documentation following this -link for Spanner.

Cloud Bigtable

NoSQL-WideColumn fully managed database. It’s the same database that powers many core Google services, including Search, Analytics, Maps, and Gmail.

  • Design for PETABYTES+ of data.
  • Consistent sub-10ms latency. -That's crazy if you ask me-.

Like most NoSQL databases, it seeks to fulfil requirements such as very high throughput and scalability, where you must handle unstructured data. You can also use it as key/value database where each value is typically no larger than 10 MB or as storage engine for batch MapReduce operations, stream processing/analytics, and machine-learning applications.

It uses the same API as Hadoop’s HBase. This gives you the freedom to migrate from Bigtable to HBase and run away from Google any time. :D

Cloud Bigtable does not support SQL queries, nor does it support multi-row transactions.

Go deeper into their documentation following this -link for Bigtable.

Cloud Datastore

It is another NoSQL database but focused on documents.

  • Design for Terabytes+ of data.
  • ACID transactions capable.
  • Strong and Eventual Consistency capable.
  • Free daily quota.

Cosider Bigtable if you’ll manage structured objects, or if you require support for transactions and SQL-like queries

Go deeper into their documentation following this -link for Datastore.

Conclusion

There is more than meets the eye for each of these services. You need to take your time and go deeper into the documentation for each of them.

In order to make an educated selection for your application is necessary to understand your requirements and each of these services to properly make a selection. A random choice -while may help you get the job done- is likely to result in missing key features or excessive costs that could have been avoided.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Rafael Escoto

Rafael Escoto

Solutions Architect @ Slalom Build. I help build ETL projects, and love technology. Thoughts shared are my own.