- What is Cloud Spanner? Fully managed relational database with unlimited scale, strong consistency, and up to 99.999% availability.
- How do you stop a Spanner instance? As there is no need to manually stop or restart a given instance, Cloud Spanner does not offer a way to do so.
- What are two important choices when creating a Cloud Spanner instance? Instance configuration and compute capacity
- What does it mean that Cloud Spanner’s data is strongly typed? you must define a schema for each database and that schema must specify the data types of each column of each table.
- What are Cloud Spanner’s instrospection tools? a set of built-in tables that you can query to gain more insight about queries, transactions, reads and more.
- What is TTL? Time to live (TTL) allows database administrators to set policies to periodically delete data from Cloud Spanner tables.
- What is PITR? Cloud Spanner point-in-time recovery (PITR) provides protection against accidental deletion or writes. For example, if an operator inadvertently writes data or an application rollout corrupts the database, with PITR you can recover the data from a point-in-time in the past (up to a maximum of 7 days) seamlessly.
- What does an instance configuration define? An instance configuration defines the geographic placement and replication of the databases in that instance.
- What are the two types of instance configurations? Regional configurations and multi-region configurations
- What are multi-region configurations? Multi-region configurations allow you to replicate the database's data not just in multiple zones, but in multiple zones across multiple regions, as defined by the instance configuration.
- What are the benefits of multi-region configurations? High availability, data distribution, external consistency
- Can you switch between configuration types? You can move your instance from any instance configuration to any other instance configuration, including between regional and multi-regional configurations. Moving the instance does not cause downtime, and Cloud Spanner continues to provide the usual transaction guarantees during a move, including strong consistency.
- Why would you want to change the leader region? To be closer to connecting clients to reduce application latency.
Compute Capacity
- What does the compute capacity define? Compute capacity defines amount of server and storage resources that are available to the databases in an instance.
- How many processing units is a node? When you create an instance, you specify its compute capacity as a number of processing units or as a number of nodes, with 1000 processing units being equal to 1 node.
- How does Cloud Spanner allot storage?
- For instances smaller than 1 node, Cloud Spanner allots 204.8 GB of data for every 100 processing units in the database.
- For instances of 1 node and larger, Cloud Spanner allots 2 TB of data for each node.
Replication
- What’s the impact of increasing computing capacity on the replicas? Increasing compute capacity does not increase the number of replicas (which are fixed for a given instance configuration), but rather increases the resources each replica has in the instance.
- How does replication work? At a high level, all data in Cloud Spanner is organized into rows. Cloud Spanner creates multiple copies, or "replicas," of these rows, then stores these replicas in different geographic areas. Cloud Spanner uses a synchronous, Paxos-based replication scheme, in which voting replicas (explained in detail below) take a vote on every write request before the write is committed. This property of globally synchronous replication gives you the ability to read the most up-to-date data from any Cloud Spanner read-write or read-only replica.