Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud SQL: Can I change machine type with zero downtime?

We need to change our Google cloud SQL instance from db-g1-small to db-n1-standard-1. Can I change it with zero downtime?

Edit 1

I think I found the answer. It seems that it will take a few seconds of downtime.

You can change an instance's tier at any time, with just a few seconds of downtime.

https://cloud.google.com/sql/pricing

Edit 2

I tried it on our dev env. The downtime was about 10 sec.

while true; date; do curl https://api.xxx.com/v1/items; echo ""; sleep 1s; done

2016/8/29 16:24:50 JST
{"OK"}
2016/8/29 16:24:51 JST
Error
2016/8/29 16:25:01 JST
{"OK"}
like image 841
zono Avatar asked Aug 29 '16 07:08

zono


People also ask

Can I change machine type Google Cloud?

You can only change the machine type of a stopped VM. A VM is considered stopped only when the VM is in the TERMINATED state. You cannot change the machine type of a running VM. Caution: If you do not have reservations for the new machine types, changing the machine type can result in resource availability errors.

What option does Cloud SQL offer to help with high availability?

The high availability configuration allows data redundancy in multiple zones inside the region you choose while deploying your DB instance. If you decide to enable high availability, Cloud SQL will set up two DB instances in two different locations with the same region.

Does Cloud SQL support horizontal scaling?

Other methods for horizontal scaling include master-slave configurations and sharding. Cloud SQL does not support these configurations natively, though they may be implemented externally using industry tools such as ProxySQL.


1 Answers

The note about changing tier in a few seconds is under the First Generation section of that page.

For a Second Generation instance, it may take several minutes.

like image 192
Vadim Avatar answered Sep 19 '22 11:09

Vadim