loading...

Google Cloud Platform – Google Cloud Spanner

How to change the time zone on Windows Server 2019

Google Cloud Spanner is a fully managed relational database service. The service allows you to deploy mission critical databases and offers transactional consistency globally, along with automatic synchronous replication for high availability. Cloud spanner is ideal for mission critical databases that require replication and strong transactional consistency. This logo represents Google Cloud Spanner:

Cloud spanner databases are replicated synchronously; this is done at a global scale. The underlying operating system that powers cloud spanner has the ability to synchronously replicate at a byte level. Cloud spanner stores the databases as a bunch of files and the filesystem takes care of replicating these files across multiple regions. Cloud spanner stores all data as rows and replicates these rows on to multiple regions for high availability.

Cloud spanner uses a Paxos-based replication scheme where voting replicas participate in a vote for every write request before committing that request. This makes it possible for data to be read from any node of your cloud spanner instance simultaneously. It is also important to know that there are three types of replicas—read-write replica, read-only replica, and witness replicas. Witness and read-only replicas come into play in a multi-region configuration.

Read-write replicas maintain full copy of your data and support both read and write operations. These are also the only type of replicas used in a single-region configuration. Single-instance replicas only support reads and maintain a full replicated copy for your data from the read-write replicas. Witness replicas do not maintain a full copy of your data and participate in voting to commit writes.

Leader election and voting concepts are out of the scope of this book. Refer to the GCP documentation at https://cloud.google.com/spanner/docs/instances to learn more. 

With cloud spanner, when properly deployed, each node can provide up to 10,000 queries per second (QPS) of reads and 2,000 queries per second of writes. These, however, can vary depending on your workload and schema design.

Let’s briefly look at deploying a cloud spanner instance:

  1. Select Spanner from the left pane and click Create an instance to get started:
  1. Now that we have created an instance, let’s go ahead and create a simple database:
  1. Click on Create database. You can name a table and add columns to your database, or use an SQL statement to create the table.
  2. Sliding Edit as text lets you write SQL statements to build your database schema:
  1. Click on Create to create the table in your database:

Comments are closed.

loading...