-
Types
-
Relational
- Cloud SQL
- Cloud Spanner
-
Non relational
- Cloud Firestore
- Cloud Bigtable
-
Data warehouse
- BigQuery
-
Unstructured
- Cloud Storage
-
In-memory
- Cloud Memorystore
-
Fileserver
- Cloud Filestore
-
Unmanaged
- Compute Engine/Persistent Disk
-
Storage
-
Overview
- Enables users to create buckets to store data
- Globally unique name and location
- Default storage class for objects
- Low-milliseconds latency and high durability
-
Storage Classes
-
Standard
-
Multi-Regional
- Designed for frequently accessed data
- e.g. hot objects, website content etc
- Highest availability
- Geo-redundant, US, EU etc
-
Regional
- Designed for storing data in the same region
- Better performance for high-compute workloads
- Data stored in regional locations close to compute
- Lacks high availability
-
Dual-Regional
- Data stored across two regions
- Similar to Regional storage class
- Provides high availability
- Higher cost than regional
-
Nearline
- Designed for infrequently accessed data
- Read or modify data once a month or less
- Data backup
- Cost for data access
- Highly durable
- Geo-redundancy available
- 30-day minimum storage duration
-
Coldline
- Designed for disaster recovery storage
- Access at most every 90 days
- Very low cost
- Highly durable
- Data available within milliseconds
- Cost for data access higher than nearline
- Geo-redundancy available
- 90-day minimum storage durability
-
Archival
- Designed for data accessed approx once a year
- For long term storage of data for compliance
- Highest cost for data access
-
Bucket storage class
- Specified when creating bucket
- Defaults to Standard storage class
- Regional or multi-regional
- Objects added use the default unless otherwise specified
- Bucket storage class can be changed
- Only new objects will be affected
-
Object storage class
- Storage class for objects can be specified
- If not specified, object will take on default storage class of bucket
- Can be changed later autotomatically using Object Lifecycle Management
- Storage class setting for objects affects availability and pricing
- Availability, storage duration and pricing differ by storage class
-
SQL
-
Overview
- Hosted MySQL, PostgreSQL and MSSQL database
- Traditional relational database, managed on Compute Engine
- Supports Lift and shift of on-premise database
- Often the first step for on-premise to Cloud migration
- Schema, SQL, Stong consistency, failover replica, vertical scalability
-
Managed services
- OS and database installation and updates
- Storage (autoscaling)
- Backups
- Failover, read replicas
- Cross regional replication
-
Limitations
- Hard cap of 30TB for single Cloud SQL instance
- Limited scalability (vertical rather than horizontal)
-
Availability
- Failover created in separate region, or zone in same region
- Data is automatically replicated to failover instance
-
Failover
- Primary instance stops responding
- Cloud SQL automatically fails over to failover instance
- Failover instance becomes the new primary instance
- Replication lag is the time a failover instance takes to catch up with primary instance update
- Replication lag does not result in data loss
- Lag can be addressed by increasing performance of failover instance
-
Scaling
- Vertical scaling by increasing storage/compute for single instance
- Horizontal scaling by creating multiple read replicas
- Storage scales automatically, while compute does not
- No downtime during storage scaling
- Disk size directly tied to disk performance
- Compute (CPU/RAM) scaling requires a restart
-
Spanner
- Horizontally scalable relational database
- Cross regional availability
- Global footprint, strong consistency
- Near infinite capacity
- Not a direct lift and shift of MySQL. Modification required
- Schema, SQL, Stong consistency, high availability, automatic replication
-
Firestore
- Non relational database
- Semi-structured, ACID transactions
- Completely no-ops, no individual machine to interact with
- Key/value pair with flexible schema definition
- Scales from zero to terabytes
- Grows with application. Cost effective
- Ideal for web and mobile applications
- Improved query performance with indexes
- Composite index for complex queries
-
Bigtable
- Non-relational database
- Ideal for analytics
- Very high volume of writes
- Milliseconds response time
- More expensive than Datastore
- Requires node management
- HBase compatible
- Performance over cost efficiency
- Pay for nodes, irrespective of utilization
- Petabyte scale
-
Memorystore
- Managed in-memory database, compatible with Redis
- Results in very fast performance
- Sub-milliseconds data access
- Regional presence, similar to Cloud SQL
- Up to 300 GB instance capacity
- Failover and high availability across two zones in single region
-
Filestore
- High performance file store - NAS
- Managed file storage/sharing instance
- OS, updates, patches handled for user