Cloud SQL or VM Instance to host MySQL Database

梦想的初衷 提交于 2020-07-20 07:48:50

问题


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

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

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

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.

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.

So, why should i host it on Cloud SQL?

My main concern is performance.


回答1:


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.

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.

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.

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.



来源:https://stackoverflow.com/questions/34017276/cloud-sql-or-vm-instance-to-host-mysql-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!