简体   繁体   English

Google Cloud MySQL第2代与使用MySQL的计算实例

[英]Google Cloud MySQL 2nd Generation vs Compute Instance with MySQL

The new Google Cloud MySQL 2nd Generation spins up its own VM instance to run the MySQL server. 新的Google Cloud MySQL第2代将提升其自己的VM实例以运行MySQL服务器。 Please see the following picture: 请看下图:

例

What is the difference between using the 2nd Generation instance, or using my own Compute VM instance with a manually installed version of MySQL on it? 使用第二代实例或将我自己的Compute VM实例与手动安装的MySQL版本一起使用有什么区别? Are there any advantages when it comes to high availability, security, or performance? 在高可用性,安全性或性能方面是否有任何优势?

Adding to the answer that Terry posted, and answering your question in the comment: 添加到Terry发布的答案中,并在评论中回答您的问题:

You can create a highly available Cloud SQL Second Generation by doing the following: 您可以通过执行以下操作来创建高度可用的Cloud SQL第二代:

  1. Set up your master instance correctly including sizing it appropriately and setting up binary logging. 正确设置您的主实例,包括适当调整其大小并设置二进制日志记录。 The master instance must have one backup after binary logging has been enabled. 启用二进制日志记录后,主实例必须具有一个备份。 You should place your master instance in a zone that's close to your other services. 您应将主实例放置在与其他服务接近的区域中。 See preparing the master instance . 请参阅准备主实例

  2. Create one failover replica in a different zone than the master. 在与主服务器不同的区域中创建一个故障转移副本。 See creating a failover replica . 请参阅创建故障转移副本

  3. Optionally, create one or more read replicas. (可选)创建一个或多个只读副本。 Note that a master instance with a failover replica is sufficient for creating a highly available configuration. 请注意,具有故障转移副本的主实例足以创建高可用性配置。

  4. Optionally, test failover . (可选) 测试故障转移 Keep in mind that testing the failover moves the master to a new zone. 请记住,测试故障转移会将主服务器移到新区域。

To answer your question "So what happens if the VM instance they create fails?" 回答您的问题“那么,如果它们创建的VM实例失败,会发生什么?”

A master instance falls out of high availability mode when the failover replica becomes unavailable. 当故障转移副本不可用时,主实例将退出高可用性模式。 This can happen, for example, if the network connection between the master instance and failover replica is interrupted, or if the failover replica is down due to its own zone failure. 例如,如果主实例和故障转移副本之间的网络连接中断,或者由于其自身的区域故障而导致故障转移副本关闭,则可能会发生这种情况。 During this time, the master instance is not in high availability mode, and you will not be able to failover to the replica because it is not safe to do so. 在此期间,主实例不处于高可用性模式,并且您将无法故障转移到副本,因为这样做不安全。 The failover replica resumes replication on reconnection, and high availability mode is re-enabled when the failover replica finishes catching up. 故障转移副本在重新连接时恢复复制,并在故障转移副本完成追赶时重新启用高可用性模式。

The major difference is that Cloud SQL v2 does not have to be managed. 主要区别在于不必管理Cloud SQL v2。 Google Cloud handles management, replication, and snapshots. Google Cloud处理管理,复制和快照。 Additionally Cloud SQL v2 using Cloud SQL Proxy works with App Engine standard and flexible runtimes to allow for flexible, but secure connections to SQL from other clients. 此外,使用Cloud SQL Proxy的 Cloud SQL v2可与App Engine标准和灵活的运行时一起使用,以允许从其他客户端到SQL的灵活但安全的连接。

In return you do not have any access to any of the underlying system. 作为回报,您无权访问任何基础系统。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM