Cloud SQL或VM实例以托管MySQL数据库 [英] Cloud SQL or VM Instance to host MySQL Database

查看:131
本文介绍了Cloud SQL或VM实例以托管MySQL数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,但对在何处托管其数据库感到困惑.

I have a website and i am confused where to host its database.

Google Cloud SQL D1层具有0.5 GB RAM,每天的费用为$ 1.46.

Google Cloud SQL D1 tier has 0.5 GB RAM and its cost is $1.46 per day.

GCE n1-standard-2具有7.5 GB RAM,每天的费用为1.68.

GCE n1-standard-2 has 7.5 GB RAM and its cost is 1.68 per day.

我正在Cloud SQL上托管当前数据库,并且当并发活动连接增加时,性能会下降.这一定是因为云sql的RAM较低.

I am hosting my current database on Cloud SQL and the performance goes down when concurrent active connections goes up. It must because of low RAM of cloud sql.

我可以在VM实例上设置mysql服务器,并可以对外部服务器进行远程访问.另外,Cloud SQL在最大连接数方面有限制.

I can set up mysql server on VM Instance and can give remote access to external servers. Also, Cloud SQL has limitation on maximum connections.

那么,为什么要在Cloud SQL上托管它?

So, why should i host it on Cloud SQL?

我主要关心的是性能.

推荐答案

Google Cloud SQL是一项提供完全托管的MySQL数据库的服务. Google负责应用补丁和更新,管理备份以及配置复制.在Compute Engine VM上安装MySQL将使您对MySQL的维护和管理转移.

Google Cloud SQL is a service that delivers fully managed MySQL databases. Google takes care of applying patches and updates, managing backups, and configuring replication. Installing MySQL on a Compute Engine VM will shift the maintenance and management of MySQL to you.

每个Cloud SQL实例在区域内都可用( https://cloud.google.com/sql/sla ),并提供7天的免费备份.数据会自动加密并在许多地理位置复制,副本之间的故障转移会自动处理.

Every Cloud SQL instance is regionally available (https://cloud.google.com/sql/sla) and includes seven days of free backups. Data is automatically encrypted and replicated in many geographic locations and failover between copies is handled automatically.

关于成本,当数据库处于非活动状态时,不会向您的Cloud SQL实例收费.如果每次使用"计费的15分钟内没有连接,而套餐"计费的12小时内没有连接,则数据库实例处于非活动状态. 按使用"和打包"计费选项可帮助用户根据数据库使用量来节省费用.总而言之,拥有不经常访问的小型数据库的Cloud SQL用户每月支付的费用通常不到$ 1.00,而运行着经常访问的大型数据库的用户则支付更高的费用.

Concerning cost, you are not be charged for your Cloud SQL instances when your database is inactive. A database instance is inactive if there are no connections for 15 minutes for "Per Use" billing and 12 hours for "Package" billing. "Per Use" and "Package" billing options help users find savings based on their database usage. Put together, Cloud SQL users with small, infrequently accessed databases often pay less than $1.00 per month, while users running large, frequently accessed databases pay more.

通过为您的应用程序专门调整GCE上的MySQL安装,您也许可以胜过Cloud SQL,但我建议您考虑使用自动故障转移和备份等功能,因为这些可能会引起管理方面的麻烦.

You may be able to outperform Cloud SQL by tuning a MySQL install on GCE specifically for your application, but I recommend factoring in features like automatic failover and backups since these can become management headaches.

这篇关于Cloud SQL或VM实例以托管MySQL数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆