Buckets | Google Cloud Storage

Harshini Komali
5 min readMar 21, 2021

--

You can create a storage bucket using:

  1. Google Cloud Console

2. gsutil

3. Client libraries

4. Rest APIs

Create a storage bucket using console

  1. Login to google cloud console and browse to Cloud Storage browser from the navigation menu.
  2. Click create bucket option to open the bucket creation form.

3. Enter a unique name for your bucket and click Continue.

4. Select a Location type and Location where the bucket will be permanently store.

5. Select a Default storage class for the bucket. The default storage class is assigned to all objects in the bucket.

6. Select an access control mode to determine control access to the bucket’s object. Optionally, you can add bucket labels, set a retention policy and choose an encryption method.

7. Click create.

8. You can view your bucket in the Cloud Storage browser page. There is also a search bar to filter the buckets by name prefix or location or using additional criteria.

Bucket Naming guidelines

  • Bucket names must contain only lower-case letters, numbers, dashes(-), underscores(_) and dots(.). Spaces are not allowed. Names containing dots require verification.
  • Bucket names should start and end with a number or letter.
  • Bucket names can contain 3–63 characters. Names containing dots can contain up to 222 characters.
  • Bucket names cannot be represented as an IP address.(example: 192.122.3.1)
  • Bucket names cannot have ‘goog’ prefix or contain ‘google’ or misspelled versions of it like ‘g00g’.

Bucket locations

You can specify a location for your bucket while creation to store object data.

You can select one from the following location types:

  • A region is a specific geographic place such as Mumbai
  • A dual-region is a specific pair of regions such as Tokyo and Osaka
  • A multi-region is a large geographic area such as United States that contains two or more geographic places
  • Objects stored in a multi-region and dual-region are geo-redundant i.e. data is stored redundantly in at least two separate geographic places separated by at least 100 miles.

Location considerations

You should choose a location which balances availability, latency and bandwidth costs for the end users.

  • You can use a region to help optimize latency and network bandwidth for data consumers when you have the entire pipeline in the same region.
  • You can use a dual-region for high availability and similar performance advantages as regions. Note that data stored in dual-region is geo-redundant.
  • You can use a multi-region when you want to serve content to consumers outside of Google network and distributed across large geographic areas or when you want higher data availability. Data stored in multi-region is also geo-redundant.
  • Generally, you should store data in a location which is convenient or contains majority of the users.
  • When you are using a Compute Engine VM instance that requires access to Cloud Storage bucket for reads/writes, it is better to store data in the same location as your instance for better performance.

Storage Classes

The storage class you set for an object affects the object’s availability and pricing model. When you create a bucket, you can select a storage class and the objects in the bucket inherit this storage class unless explicitly set otherwise. Standard Storage is the default storage class. Changing the default storage class of a bucket does not affect the already existing objects in the bucket. If you want to change the storage class of an object, you can either rewrite it or use Object Lifecycle Management.

Available Storage Classes

Standard Storage: This is the default storage class set to the bucket if you do not select a storage class while creating a bucket. Standard storage is suitable for data that is accessed frequently(“hot” data) and stored only for brief period of time.

  • When used in a region, Standard Storage is appropriate for storing data in the same location as you VM instances or Kubernetes instances that use the data. This maximizes the performance for data-intensive computations and reduce network usage.
  • When used in a dual-region, you still get optimized performance when accessing products in one of the associated regions along with improved availability.
  • When used in multi-region, Standard Storage is appropriate for storing data that is accessed around the world such as streaming videos, serving website content or serving data for mobile or gaming applications.

Nearline Storage: Nearline Storage is a low cost, highly durable storage service for data accessed once a month or less. It is best suitable for scenarios where slightly lower availability ,a minimum 30-day storage duration and slightly higher access costs are acceptable trade-offs for lower at-rest storage costs. It is appropriate for data backup, long-tail multimedia content and archiving.

Coldline Storage: Coldline Storage is a very low-cost, highly durable storage service for data accessed at most once a quarter. It is a better choice in scenarios where slightly lower availability, a 90-day minimum storage duration and higher costs of data access are acceptable trade-offs for lowered at-rest storage costs.

Archive Storage: Archive storage is the lowest-cost, highly durable storage service for data archival, disaster recovery and online backup. The data is available within milliseconds. It has higher costs for data access and operations and a 365 days minimum storage duration. Archive Storage is the best option for data accessed less than once per year. For example

Cold data storage: Archived data, such as data stored for regulated or legal reasons, can be stored at low costs and accessed when needed.

Disaster recovery: In times of disasters recovery, recovery time is the key. Cloud Storage provides low latency access to data stored in Archive Storage.

Cloud Storage provides several additional classes which cannot be set using the Cloud Console. These classes are:

Multi-regional Storage: This is equivalent to Standard Storage, except that it can be used to store objects in dual-regions or multi-regions.

Regional Storage: Equivalent to Standard storage but can be used to store only regional objects.

Durability Reduced Availability Storage: Similar to Standard Storage except:

  • DRA has higher pricing for operations
  • DRA has lower performance, particularly in terms of availability.

--

--

Harshini Komali

Just another Software Engineer working on making myself a better engineer than yesterday.