Adri Van Houdt asked me on Twitter: @tpryan @googlecloud what are the major differences [between Cloud SQL v1 and v2]?
It demanded more than a 140-character answer.
Most of the differences are explained in the Cloud SQL Documentation, but to sum up salient details: Cloud SQL v2 has better performance, more capacity, and will probably run cheaper for the same amount of work.
- Up to 7X throughput and 20X storage capacity of first generation instances
- Less expensive than first generation for most use cases
- Option to add high availability failover and read replication
- Configurable backup period and maintenance window
- Proxy support (for better security and access using dynamic IP addresses)
Wait what? Bigger, Faster, Cheaper? Is there a reason why I wouldn’t run on Cloud SQL v2? It’s in beta, so there are some features missing. Most are not deal breakers, unless, you know, they are for you:
- No Service Level Agreement (SLA)
- Only MySQL 5.6 is supported.
- No point-in-time recovery from backups
- No standard Persistent Disk (HDD) support
- But yes Solid-state Persistent Disk (SSD)
- No automatic scaling of storage capacity
- But you can do manually increases with no downtime
- No IPv6 connectivity
The big one here for most larger customers is going to be no SLA.
Not listed here, there is another important feature. If you are an App Engine customer and looked at v2 before, it did not support App Engine. However, that appears to have changed: you can now access Cloud SQL v2 from App Engine standard environment or App Engine flexible environment.
The pricing for v1 and the pricing for v2 are a bit different. The pricing for v2 looks a lot more like the pricing tier structure for Compute Engine now.
Also, not sure if it is related but we have a new logo now. Instead of the on-the-nose “SQL” on a blue hexagon, it’s a hard-angled symbol for database on a blue hexagon.
So there you have it, bigger, better, cheaper, but no SLA. There are more subtle differences that are explained at length in the documentation, so you should definitely test out and see for yourself. I, for one, am moving my stuff over now that there is App Engine standard support.
Terrence, have you tried to set up a datasource to a Cloud SQL v2 using the Cloud SQL Proxy? I’m trying to wrap my head around how that might be done, if it’s feasible.
LikeLike
My guess: I’d install the proxy, start it on an alternate port besides 3306 since I already have a local instance of mysql running on the server,
./cloud_sql_proxy -instances==tcp:3307 \
-credential_file= &
Open the port on the firewall, set up the datasource on 127.0.0.1 port 3307, and it should hopefully work. Does this seem right to you?
LikeLike