Search code examples
sqlcloudgoogle-cloud-platformgoogle-cloud-sql

SQL Cloud, when to use it?


I'm comparing the cost of services like google cloud SQL to launching your own VM in the cloud with whatever sql version you'd like.

VM instance only vs Cloud SQL only

I'm quite surprised by the results I got. The cloud SQL, is more than twice the price for the same underlying system (8 vCPU, 52 Go RAM, 2 To storage)

So basically, you pay more to have less. And I was expecting the contrary... Granted, you don't have to deal with maintenance and automating backup yourself, but I found the price difference ridicule.

So my question is : when should I consider using Cloud SQL instead of running my own specialized VM ?

Right now, I feel like this service is just a fancy way to milk money from the client.

Note : I took the google Cloud example, but this is the same result with other cloud providers.


Solution

  • The tl;dr answer here is that a VM is very different than a fully-managed service. It's like comparing apples and oranges, honestly.

    When you create a VM, you have a VM. You can do whatever you want with it, but it's just a VM. That VM may be subject to restarts, must be totally configured by you in many cases, is not redundant, has no (added) security layer, etc.

    As a managed service, Cloud SQL (and other managed services) offer many things way beyond what you can do on just a VM. You mention a fraction of them, such as backups. With a managed service you're getting a ton of other things which really matter to most people, such as:

    • Updates, upgrades
    • Better performance (in your example the IOPS of PD and Cloud SQL do not match)
    • Support for the service
    • Added security
    • An IAM layer
    • Integrations with other services
    • No need to "build it yourself"
    • etc...

    While a (very) small minority of people may want to roll their own, it's generally a waste of time and a heck of a lot riskier than using a managed service. I think if you asked most any business customer, the cost of a managed service pales in comparison to paying a fleet of people to replicate the benefits you get from one.

    This is true for GCP, AWS, and Azure.