Is cloud spanner the only solution for horizontal scaling of mysql instances on the google cloud? Is there a way to scale in cloud sql?
How to explain vertical and horizontal scaling in the cloud. Horizontal scaling affords the ability to scale wider to deal with traffic. It is the ability to connect multiple hardware or software entities, such as servers, so that they work as a single logical unit. This kind of scale cannot be implemented at a moment’s notice. So,...
When it comes to scaling databases, there are two approaches: vertical scaling and horizontal scaling. Vertical scaling is when you have a single database instance serve all transactions. If you need to serve more transactions, execute more operations, or store more data than your instance can handle, you have to grow your instance.
Most cloud-scale database applications use a combination of these two strategies. For example, a Software as a Service application may use horizontal scaling to provision new end-customers and vertical scaling to allow each end-customer's database to grow or shrink resources as needed by the workload.
It is defined as the process of adding more instances of the same type to the existing pool of resources and not increasing the capacity of existing resources like in vertical scaling. This kind of scaling also helps in decreasing the load on the server. This is called Horizontal Scaling
Cloud Spanner doesn't scale MySQL in that it isn't a drop-in replacement, but it is itself a horizontally scaling relational database.
You can add read replicas in CloudSQL to scale your reads.
As Albert Cui stated, Cloud Spanner does not have a horizontally-scaling MySQL database behind it, but rather a different implementation that is a transactional, ACID relational database with strong consistency, accepts SQL (though it's not fully compliant with SQL), is globally distributed and scales horizontally.
For more information you can consult the Cloud Spanner documentation
About Cloud SQL, you can scale read capacity horizontally with read replicas, and it can scale vertically (that is, increase the hardware capacity of the instance in which it runs) with no more effort than choosing an instance of a higher tier and only a couple of minutes of downtime. Keep in mind that it doesn't scale automatically, and it can't scale memory, CPU power or capacity independently, you need to choose from predefined instance tiers.
According to this article by Google, you can scale Cloud SQL horizontally by using the MySQL implementation and ProxySQL. However, keep in mind that this goes beyond the Cloud SQL managed service.
For more information you can consult the Cloud SQL documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With