Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between Google Cloud Spanner and Cloud SQL?

Tags:

I am novice in GCP stack so I am so confused about amount GCP technologies for storing data:

https://cloud.google.com/products/storage

Although google cloud spanner is not mentioned in the article above I know that it is exist and iti is used for data storage: https://cloud.google.com/spanner

From my current view I don't see any significant difference between cloud sql(with postgres under the hood) and cloud spanner. I found that it has a bit different syntax but it doesn't answer when I should prefer this techology to spring cloud sql.

Could you please explain it ?

P.S.

I consider spring cloud sql as a traditional database with automatic replication and horizontal scalability managed by google.

like image 493
gstackoverflow Avatar asked Feb 26 '20 11:02

gstackoverflow


People also ask

Is Cloud Spanner a SQL database?

Spanner is a distributed, globally scalable SQL database service that decouples compute from storage, which makes it possible to scale processing resources separately from storage.

What is difference between Cloud Spanner and BigQuery?

Google BigQuery does not support transactions and does not allow updating of existing records. On the other hand, Google Cloud Spanner supports OLTP along with scalability and high availability. Hence, Cloud Spanner is more suited for E-commerce systems, Core Banking, Gaming, Telecom, etc.

What is Cloud Spanner used for?

Google Cloud Spanner is a distributed relational database service that runs on Google Cloud. It is designed to support global online transaction processing deployments, SQL semantics, highly available horizontal scaling and transactional consistency.

What is Cloud SQL in Google Cloud?

Cloud SQL is a fully-managed database service that helps you set up, maintain, manage, and administer your relational databases on Google Cloud Platform. You can use Cloud SQL with MySQL, PostgreSQL, or SQL Server.


1 Answers

There is not a big difference between them in terms on what they do (storing data in tables). The difference is how they handle the data in a small and big scale

Cloud Spanner is used when you need to handle massive amounts of data with an elevated level of consistency and with a big amount of data handling (+100,000 reads/write per second). Spanner gives much better scalability and better SLOs.

On the other hand, Spanner is also much more expensive than Cloud SQL.

If you just want to store some data of your customer in a cheap way but still don't want to face server configuration Cloud SQL is the right choice.

If you are planning to create a big product or if you want to be ready for a huge increase in users for your application (viral games/applications) Spanner is the right product.

You can find detailed information about Cloud Spanner in this official paper

like image 88
Chris32 Avatar answered Sep 21 '22 07:09

Chris32