Google Cloud SQL
Google Cloud SQL — Easy Notes
☁️ What is Cloud SQL?
Cloud SQL = Google Cloud’s fully managed relational database service.
It supports:
- MySQL
- PostgreSQL
- SQL Server
Think of it like:
Normal database: You install, configure, patch, backup, and maintain it yourself.
Cloud SQL: Google manages most of these tasks for you.
π§ What does Google manage?
Cloud SQL reduces your database maintenance work. Google handles things like:
- Patching and updates
- Backups
- Replication configuration
- Infrastructure maintenance
So you can focus on your application, rather than managing database infrastructure.
No software installation or database-server maintenance is required.
π Scaling
Cloud SQL instances can scale significantly, including up to:
- 128 processor cores
- 864 GB RAM
- 64 TB storage
So it can support fairly large relational workloads.
π Replication
Cloud SQL supports different replication scenarios.
For example:
Primary Database → Replica
If the primary database has a problem or you need additional read capacity, replicas can help.
It can also support replication involving external primary databases and external MySQL instances.
πΎ Backups
Cloud SQL provides managed backups.
Google securely stores the backup data so that it can be used when you need to restore your database.
The course says the instance cost includes seven backups.
π Security
Cloud SQL provides encryption for customer data:
- Data moving through Google's internal networks
- Data stored in database tables
- Temporary files
- Backups
It also has a network firewall to control which network traffic can access your database instance.
π Who can connect to Cloud SQL?
Cloud SQL isn't limited to one application.
It can be accessed by:
Google Cloud services
- App Engine
- Compute Engine
- Other Google Cloud applications
External applications
- SQL Workbench
- Toad
- Other database tools using standard database drivers
π» Example: Java Application
Suppose you have:
Java App → Cloud SQL for MySQL
Your Java application can connect using a standard driver such as Connector/J.
Similarly, Python applications can connect using appropriate MySQL drivers.
π₯️ Compute Engine + Cloud SQL
You can have:
Compute Engine VM ↓ Network ↓ Cloud SQL ↓ MySQL
The Compute Engine VM can be authorized to access the Cloud SQL database.
The Cloud SQL instance can also be configured in the same zone as the VM for suitable deployment scenarios.
π§ Remember it like this
Cloud SQL = Managed SQL Database
| Feature | Meaning |
|---|---|
| MySQL | ✅ |
| PostgreSQL | ✅ |
| SQL Server | ✅ |
| Managed backups | ✅ |
| Patching/updates | Google manages |
| Replication | ✅ |
| Encryption | ✅ |
| Firewall | ✅ |
| App Engine access | ✅ |
| Compute Engine access | ✅ |
| External tools | ✅ |
⭐ One-line exam/interview definition
Cloud SQL is a fully managed relational database service on Google Cloud that supports MySQL, PostgreSQL, and SQL Server, while Google handles tasks such as backups, patching, updates, and infrastructure management.
Comments
Post a Comment