Google Cloud Storage: Pros/Cons and how to use it with JavaScript

José Vidal
Feb 23, 2018 · 3 min read

This article is part of the series “Cloud Storage Providers, which one to choose?”. You can check out the rest of the articles here:

  1. Amazon S3: Pros/Cons and how to use it with JavaScript
  2. Google Cloud Storage: Pros/Cons and how to use it with JavaScript
  3. Microsoft Azure Blob Storage: Pros/Cons and how to use it with JavaScript
  4. Backblaze B2: Pros/Cons and how to use it with JavaScript
  5. DigitalOcean Spaces: Pros/Cons and how to use it with JavaScript
  6. Wasabi Hot Storage: Pros/Cons and how to use it with JavaScript

Google is stepping up as a reliable Cloud Storage Provider. Along with this, its growing number of cloud services is closing the gap with the AWS ecosystem, which seemed unbeatable not so long ago. Therefore, it makes sense to analyze the pros and cons of its storage service and compare it with other top notch players like Amazon S3 and Backblaze B2.

Disclaimer: Prices and features change all the time. Please let me know if there are any mistakes :)

  • Good documentation. We are talking about hundreds of pages in total, including a pretty detailed API Reference guide
  • Good prices. Around 0,020 USD per GB/month with the Regional class and 0,007 USD per GB/month with the Coldline class
  • Different storage classes for each necessity: Regional (frequent use), Nearline (infrequent use) and Coldline (long-term storage)
  • High durability. Google Cloud Storage offers 99.999999999% (11 9’s) of durability of objects over a given year. This means that data survives even in the event of the simultaneous loss of two disks
  • Many regions available to store your data: North Ameria, South America, Europe, Asia and Australia
  • Easy to integrate with other Google Cloud Services like Kubernetes Engine, App Engine or Compute Engine
  • The “Console” tab in the documentation allows you to try out for free different SDKs. It’s incredibly useful for developers
  • One of the best free layers in the industry. $300 free credit to get started with any GCP product during the first year. Afterwards, 5 GB of Storage free to use forever
  • Support fee is quite hefty, around 150 USD per month for the most basic service (Silver class)
  • Downloading data from Google Cloud Storage is expensive. 0,12 USD per GB
  • Personally, I find the Google Cloud Platform web interface a bit confusing. Sometimes I get lost while browsing around the menus
  • SDK APIs seem less stable than the Amazon S3 ones. I encountered several examples in Stackoverflow that were not valid anymore
  • Prices in both Microsoft Azure (around 0.018 USD per GB/month) or Backblaze B2 (about 0.005 USD per GB/month) are lower than Google Cloud Storage
  • It has a complex pricing schema, similar to AWS S3, so it’s easy to get unexpected costs (e.g., number of requests, transfers…)
  • If you use other Google Cloud Storage services (e.g., Compute Engine), you want to choose it for the advantages it brings the simplified integration
  • If you are developer and want to build prototypes, the Free layer is quite generous, so it might be interesting to kick off new projects
  • If you are a company and can afford to pay the support fee, Google support can be your best ally, as their engineers are stellar

How to use it with JavaScript

  1. How to install the library
npm install @google-cloud/storage

2. How to Authenticate

3. How to create a Bucket

4. How to delete a Bucket

5. How to upload a File

6. How to download a File

7. How to delete a File

8. How to list all files in a Bucket

I hope this article is enough to get you up to speed with Google Cloud Storage. Let me know if you miss out anything on it!

Have a nice day!

DailyJS

JavaScript news and opinion.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

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