GCP Classroom Series – 06/Apr/2021

Cloud SQL

  • Create and Manage Replications
  • We create replicas of the database to increase availability
  • First kind of Replication is Read Replicas

Cloud SQL Read Replicas and other replicas

  • They are low cost availability replicas for the primary/master instance.
  • Lets create an Cloud SQL instance
    • with private ip connected to some vnet Preview
  • Create a vm instance in the same vnet where you configured private connectivity Preview Preview
  • Lets install a sample database Refer Here Preview
  • Lets create a read replica Preview Preview Preview Preview
  • After the read replication is created we can promote read replication to make this replica a primary or a standby instance which allows create, retrieve, update and delete statements Preview
  • Disable replication will remove the replication b/w instances
  • To create a failover click on failover on the cloud sql instance in the overview page
  • External replication is done by executing mysql native options Refer Here

Connectivity to cloud sql instances

  • To understand private connectivity, as we have already mentioned vms in a particular network where the private service endpoint is created can communicate to the database over private ip address
    Preview Preview
  • Refer Here for the official documentation about connecting to database instances Preview

Cloud Spanner

  • Cloud spanner is another relation dbms service offered by GCP.
  • This is different from cloud sql in many aspects
    • This is a Google proprietary technology
    • Costlier
    • Stronger ACID values for ACID Refer Here
    • More reliable
    • Fully managed
  • We choose Cloud spanner over Cloud SQL if
    • Data sizes exceeding 10 TB
    • Heavy usage QPS (Queries per second) exceeding 5000
    • Users in multiple regions

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin