Google Cloud Storage: Pros/Cons and how to use it with JavaScript
This article is part of the series “Cloud Storage Providers, which one to choose?”. You can check out the rest of the articles here:
- Amazon S3: Pros/Cons and how to use it with JavaScript
- Google Cloud Storage: Pros/Cons and how to use it with JavaScript
- Microsoft Azure Blob Storage: Pros/Cons and how to use it with JavaScript
- Backblaze B2: Pros/Cons and how to use it with JavaScript
- DigitalOcean Spaces: Pros/Cons and how to use it with JavaScript
- 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 :)
Pros
- 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
Cons
- 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…)
Cool, but why should I use it over the competition?
- 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
- 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!