- Which SQL databases does Cloud SQL support? MySQL, PostgreSQL, SQL Server
- What are the QPS limits for Cloud SQL? None
- Does Cloud SQL provide Load Balancing? Cloud SQL does not automatically provide or configure load balancing. You can use connection pooling to distribute read requests between read replicas by switching between multiple connection endpoints.
- Are automated backups incremental? Yes
- Can you decrease the size of an instance? No
- Can you upgrade the vCPUs? Yes, with a couple of minutes of downtime
- How do you reclaim the space from a dropped table? Instances running MySQL 5.5 have the innodb_file_per_table flag set to OFF by default; InnoDB never shrinks its default tablespace. To reclaim space for this configuration, create a new instance from the smaller database, or change the value of the innodb_file_per_table flag to ON.
Replication
- What is replication? Replication is the ability to create copies of a Cloud SQL instance or an on-premises database, and offload work to the copies. The primary reason for using replication is to scale the use of data in a database without degrading performance. Other reasons include:
- Migrating data between regions
- Migrating data between platforms
- Migrating data from an on-premises database to Cloud SQL
- How does replication work? When referring to a Cloud SQL instance, the instance that is replicated is called the primary instance and the copies are called read replicas. The primary instance and read replicas all reside in Cloud SQL.
- What is a read replica? The read replica is an exact copy of the primary instance. Data and other changes on the primary instance are updated in almost real-time on the read replica. Read replicas are read-only; you cannot write to them.
- What are cross-region read replicas? Cross-region replication lets you create a read replica in a different region from the primary instance. This improves cross-regional read performance or provides additional backup against regional failure.
- What is an external read replica? External read replicas are external MySQL instances that replicate from a Cloud SQL primary instance.
- Is MySQL instance running on Compute Engine an external read replica? yes
- What happens when replication is interrupted on external read replicas? If replication is interrupted for a few hours, for example by a network or server outage, the replica falls behind the primary. The replica catches up once it reconnects to the primary and starts replicating again. However, if replication is interrupted for longer than Cloud SQL replication logs are preserved (seven backups), you must delete the replica and create a new one.
- How is a read replica charged? At the same rate as a standard Cloud SQL instance
- How are external replicas billed? Charged as network egress
- How do you stop a replica? You can't. You have to delete it
- How many read replicas can a single instance have? You can create up to 10 read replicas for a single primary instance.
- What is a high availability configuration? Also called a regional instance and is located in a primary and secondary zone within the configured region. Within a regional instance, the configuration is made up of a primary instance and a standby instance. Through synchronous replication to each zone's persistent disk, all writes made to the primary instance are replicated to disks in both zones before a transaction is reported as committed.