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
Which gcloud sql instances create setting enables high availability with a standby in another zone?
- --availability-type=zonal
- --availability-type=regional
- --replica-type=standby
- --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.
Which statements about the Cloud SQL Auth Proxy are correct?
- It authorizes connections using IAM permissions.
- It creates a new network route to the instance by itself.
- It uses short-lived certificates to encrypt the connection.
- It requires adding the client IP to authorized networks.
- 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: 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.
