Thursday, December 24, 2015

[google-cloud-sql-discuss] Re: 2nd Generation Failover documentation?

Hello Brian,

In order to deploy fault-tolerant applications that have high availability, Google recommends deploying applications across multiple zones in a region. This helps protect against unexpected failures of components, up to and including a single zone. You can configure a Cloud SQL Second Generation instance to be highly available by configuring replication to a failover replica instance in different zone than the master instance.


You can leverage the high-bandwidth, low-latency network connections between zones in the same region to set up a failover replica instance in a different zone than the master instance. In the event of failure of the master instance's zone, Google Cloud SQL automatically switches over to the failover replica.


I hope this helps.


Sincerely,

George


On Thursday, December 24, 2015 at 11:05:37 AM UTC-5, Brian Wawok wrote:
George:

So if gen2 has automatic failover baked in, what is the purpose of a failover replica?  Does it make failover faster, or what does it buy me?

Thanks,

Brian

On Thursday, December 24, 2015 at 11:02:58 AM UTC-5, grached wrote:
Hello Brian,

All Cloud SQL data is replicated in multiple zones. In the unlikely event of a zone outage, instances fail over to another, available, zone automatically. Failover is designed to be transparent to your applications, so that after failover, an instance has the same instance name, IP address, and firewall rules. During the failover there will typically be a few seconds downtime as the instance starts up in a new zone. However, in some cases, the InnoDB crash-recovery process may take longer, delaying the time before the instance is up. 

In a failover event, existing connections to instances are broken. You can test how your application responds to a failover by restarting your instance. For recommendations on managing connections that can help in failover events, see the FAQ entry How should I manage connections?

You can configure:

  • Cloud SQL instances that replicate from a Cloud SQL master instance.
  • Cloud SQL instances that replicate from an external master instance.
  • External MySQL instances that replicate from a Cloud SQL master instance.

  • Note that external read replica instances must:
  • Be able to connect to the Cloud SQL master instance with the MySQL wire protocol.
  • Support row-based replication.
  • Be the same (or later) version of the Cloud SQL instance being replicated.

For more information about read replicas, including use cases for each type, see Configuring Replication with Google Cloud SQL.


You can use the Google Cloud Platform Console to see all of your Cloud SQL instances, and whether an instance is a master or read replica instance. You can use the Cloud SDK to check whether an instance is a master or read replica. For more information, see Checking replication status.


I hope this helps.


Sincerely,

George




On Wednesday, December 23, 2015 at 12:51:36 PM UTC-5, Brian Wawok wrote:
Hi!

From reading the documentation and poking around, I am not entirely sure how the cloud SQL failover is setup. Can anyone point me to a more complete documentation, or answer a few questions for me?


1) In 1st gen, when there was a failure a new instance was automagically spun up and activated. In 2nd gen, is this no longer the case? Do I NEED to create a Failover Replica for the same behavior?

2) In the event of a failover, will my failover replica automatically become primary? Or do I need to trigger a failover by hand when something is down? 

3) How long of a bad event is there before the automatic failover process is started? 

4) My failover replica has an IP.. do I need to change my clients to use this IP, or will the old primary IP now start pointing at the failover replica? i.e. is this really a floating IP that gets moved?

5) Can I use my failover replica as a read slave, or must it just sit idle until an event?

6) What happens to the old primary in a failover after it comes back. Does it become a failover replica for the new primary, or do I need to do something by hand?

7) How do I reset my original primary to be the real master after a failover event is complete?


Thanks!


Brian

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/df2058c4-ff71-4173-b1e7-7d16d2d97605%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment