Bitzu

Associate Cloud Engineer ยท Choosing and deploying data services

Deploying Cloud SQL, AlloyDB and Spanner

Creating instances (gcloud sql instances create), high availability, read replicas, private IP and connectivity (Auth Proxy), Spanner instance configurations and processing units.

Key points

  • Cloud SQL: gcloud sql instances create NAME --database-version --tier --region.
  • availability-type=regional: standby in another zone (no reads), automatic failover.
  • Read replicas: scale reads, can be promoted.
  • no-assign-ip with --network: private IP; Cloud SQL Auth Proxy connects via IAM (Cloud SQL Client role).
  • Spanner: gcloud spanner instances create NAME --config --description, --nodes or --processing-units (1000 = 1 node).

Source: https://docs.cloud.google.com/sdk/gcloud/reference/sql/instances/create

Practice questions

Single choice

Which gcloud sql instances create setting enables high availability with a standby in another zone?

  1. --availability-type=zonal
  2. --availability-type=regional
  3. --replica-type=standby
  4. --tier=db-ha
Show answer

Answer: B. --availability-type=regional

--availability-type=regional creates the standby and automatic failover; zonal is the default with no failover.

Select all that apply

Which statements about the Cloud SQL Auth Proxy are correct?

  1. It authorizes connections using IAM permissions.
  2. It creates a new network route to the instance by itself.
  3. It uses short-lived certificates to encrypt the connection.
  4. It requires adding the client IP to authorized networks.
  5. It can connect to a private IP instance from a host with VPC access.
Show answer

Answer: A. It authorizes connections using IAM permissions., C. It uses short-lived certificates to encrypt the connection., E. It can connect to a private IP instance from a host with VPC access.

The proxy authorizes with IAM, encrypts with short-lived certificates and works with private IP when it runs with access to the VPC. It does not create a new network path and needs no authorized-networks entry.

True or false

True or false: the standby instance of a Cloud SQL high-availability pair can be used to serve read queries.

Show answer

Answer: False

False. The standby only takes over on failover. To serve reads, create read replicas.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More Associate Cloud Engineer topics in this module