The document discusses a Cloud OnAir event about database management and databases. It includes an agenda that covers overviews of Cloud SQL, Cloud Memorystore, Cloud Spanner, and Cloud Firestore updates. Several speakers are also listed that will provide presentations on choosing the right database, database migrations, database modernization, and specific database services like Cloud Spanner and Cloud Bigtable.
Report
Share
Report
Share
1 of 70
Download to read offline
More Related Content
[Cloud OnAir] Talks by DevRel Vol.4 データ管理とデータ ベース 2020年8月27日 放送
8. Robert Kubis, Google Cloud, @hostirosti
DBS214
How to Choose the Right
Database For Your Workloads
9. Robert Kubis, Google Cloud, @hostirosti
DBS214
How to Choose the Right
Database For Your Workloads
10. 01
Migrate
Lift and shift / optimize existing
workloads w/o relearning skills
03
Innovate & Transform
Extend and innovate on top of
databases build for the cloud
02
Modernize
Modernize and extend migrated
applications, rethink how you use and
simplify your databases in the cloud
Database journeys with Google Cloud
Benefits: Faster migration time, fewer
application rewrites, familiarity with
current stack, enable easier
modernization and innovation on our
platform
Benefits: Help reduce or eliminate
reliance on a single database vendor,
help reduce TCO of your database
deployments, adopt open-source and
cloud-native database technologies,
modernize database architecture
Benefits: Build powerful applications
and workloads that scale with your
needs, fully managed and integrated
with other parts of the platform
12. Cloud SQL Features
● External Replication (MySQL)
● Backup / Restore backed by GCS
● SQL Server Replication
● SSD, high storage capacity → high IOPS
● Regional Disks
● Up to 96 vCPUs, 624GB Memory, 30TB storage
Database Migration Partners, Partner Services and Tools
How do we support your SQL migration
Google Cloud SQL
Fully-managed database service that
makes it easy to set-up and administer
your relational, MySQL, PostgreSQL,
& SQL Server databases in the cloud.
Bare Metal Solution
Enabling specialized workloads with
Google Cloud
Learn more: DBS102 - What’s new in Cloud SQL
DBS201 - Getting to Know Cloud SQL for SQL Server
DBS301 - High Availability and Disaster Recovery with Cloud SQL
https://cloud.google.com/solutions/database-migration
13. Purpose built
hardware
Flexible ways
to manage
Work with
Google Cloud
Low latency to
GCP Service
*Certified hardware link
Certified hardware* for
high-performance mission
critical workloads like
Oracle databases
Leverage existing DBAs or
bring your preferred SI
partners to manage
specialized workloads
Support and Billing from
Google Cloud for your bare
metal needs
Bare Metal Solution is built
in close proximity to
Google Data Center with
dedicated interconnect
Learn more: DBS213 - Bare Metal Solution: Bring All Your Enterprise Workloads to GCP
Bare Metal Solution with Google Cloud
14. Firestore
A fast, fully managed
serverless NoSQL document
database that simplifies
storing, syncing, and
querying data for your
mobile, web, and IoT apps -
in real time at global scale.
The power of our Cloud Native Databases
Bigtable
A fast, fully managed
wide-column / key-value
NoSQL database for use
cases where low latency
random data access,
scalability and reliability are
critical.
Cloud Spanner
A fully managed
enterprise-grade,
globally-distributed, and
strongly-consistent SQL
database service combining
the benefits of relational
database structure with
non-relational horizontal scale.
Learn more: DBS204 - Future-proof Your Business for Global Scale and Consistency with Cloud Spanner
DBS211 - Modernizing HBase workloads with Cloud Bigtable
DBS215 - Simplify Complex Application Development Using Cloud Firestore
16. How do we support your
database modernization?
Learn more: DBS208 - Switching from DynamoDB to Cloud Bigtable and Spanner
https://cloud.google.com/solutions/database-migration
Cloud Spanner
● JDBC / Hibernate
Support
● Spring Cloud Integration
● Local Emulator
● Dataflow Import
Templates
● Powershell Module
● Availability
● Scalability
Cloud Bigtable
● HBase API
● Local Emulator
● Terraform Integration
● Fast, high throughput
writes
● Availability
● Scalability
Firestore
● Used in front of traditional
databases
● Extending applications for
rich features like real-time
synchronization, offline
support
● Local Emulator
● Availability
● Scalability
17. How to choose your database
modernization destination?
Technical Considerations
● Tools and Integrations
● Data Model
● Consistency Requirements
● Ops and ease of use
● Availability
● Scalability
● Security
Business Considerations
● Reusing skills and knowledge
● SLAs
● Managed functionality and ops
● Security
● Compliance and Certification
● Pricing model
● Scalability
● Availability
Learn more: https://cloud.google.com/solutions/database-migration
Blog post on Medium: Things I Wished More Developers Knew About Databases
18. Why Cloud Spanner?
Practitioner perks:
● JDBC / Hibernate Support
● Terraform integration
● SQL Dialect Open Source
● Local Emulator
● API based management enabled
● Idiomatic client libraries
● cloudspannerecosystem.dev
Key features:
● Fully managed ACID relational database
● Built-in HA (SLA up to 99.999%)
● No planned downtime for anything
● Online elastic capacity scaling (qps, storage)
● Storage - pay for what you use
● Query Optimizer Version pinning
Key verticals:
● SaaS
● Retail
● Financial services
● Healthcare
● Gaming
Sample workloads:
● Inventory management
● Financial transactions
● Lots of real-time data
● Global meta-data
Learn more: DBS204 - Future-proof Your Business for Global Scale and Consistency with Cloud Spanner
19. Why Cloud Bigtable?
Practitioner perks:
● HBase Client compatible
● Terraform integration
● Key Visualizer for schema optimizations
● Local Emulator
● API based management
● Idiomatic client libraries
Key features:
● Fully managed wide-column NoSQL DB
● Row-level atomic operations
● Low latency random data access with linear scale
● Replication is eventually consistent across zones
and regions
● Zero touch failover for HA
Key verticals:
● AdTech, MarTech
● Financial Services
● Internet of Things (IoT)
● Media
● Retail
Key workloads:
● Real-time analytics
● Personalization, recommendations
● Monitoring (time-series)
● Geospatial datasets
● Graphs
Learn more: DBS211 - Modernizing HBase workloads with Cloud Bigtable
20. Why Firestore?
Practitioner perks:
● iOS, Android, Web clients
● Server Client Libraries
● Cloud Functions integration
● Expressive Querying
● Partition and Bulk Writer APIs
● Sync data across devices, on or offline
Key features:
● Fully-managed document NoSQL database
● Semi-structured / hierarchical data
● Online on-demand scaling
● Transactions on up to 500 documents
● Strong consistency across regions
● 1,000,000 concurrent real-time connections
Key verticals:
● Software & Technology
● Media
● Telecommunications
● Retail
● Mobile Games
Key workloads:
● User profiles
● User messaging
● Product catalogs
● Game state
● Offline/edge data
Learn more: DBS215 - Simplify Complex Application Development Using Cloud Firestore
21. Why managed OSS?
Practitioner perks:
● Use your existing skills and tools
● Wide variety of frameworks and connectors
● Idiomatic client libraries in multiple
programming languages
● API based management
● Integrated Monitoring
Key features:
● Fully managed open source databases
● Seamless updates (OS and DB system)
● Integrated with the rest of our platform
● Managed Backup/Restore
● Flexible resource allocation
● HA using Regional Persistent Disks
● Point in time recovery (MySQL, PostgreSQL)
Key verticals:
● SaaS
● Retail
● Financial services
● Healthcare
● Telco
Sample workloads:
● Inventory management
● Financial transactions
● Cache
● Search indexing
● SaaS applications on top of OSS databases
22. Why BigQuery?
Practitioner perks:
● Reuse existing skills - SQL
● User-defined functions
● Federated Queries
● NL query interface
● Multi-cloud integration
Key features:
● Serverless fully managed data warehouse
● Partitioned columnar storage
● Streaming inserts
● Supports MERGEs, UPDATEs, DELETEs
● Declarative machine learning in SQL
Key verticals:
● Retail
● Advertising
● IoT
● Gaming
● Financial Services
Key workloads:
● Interactive reporting on large data
● Data Science and advanced analyses
● Big Data / ML processing using SQL
Learn more: DA200 - What's New in BigQuery, Google Cloud's Modern Data Warehouse
23. Metadata management
service
In-memory Non-relational / NoSQL Relational Data warehouse Partners Databases On GCE (IaaS)
Microsoft SQL Server
Oracle
SAP HANA
IBM Db2
MySQL
PostgreSQL
Non-relational
Cloud
Memorystore
Managed Redis
Query with
microsecond
latency
Ideal For:
Real-time
analytics,
caching
Firestore
Serverless,
scalable
document
Store
Quickly query
on any
attributes
Ideal For:
client side
mobile and
web apps,
gaming
leaderboards,
user presence
at global scale
Cloud
Bigtable
Low latency,
scalable wide
column store
High throughput,
low latency
reads and writes,
endless scale
Ideal For:
Real-time
access, large
analytical
workloads and
building
low-latency
applications
Cloud
SQL
Managed
MySQL,
PostgreSQL,
& SQL Server,
Bare Metal
Solution
ACID
transactions,
Referential
integrity
Ideal For:
WordPress,
backends,
game states,
CRM tools
Cloud
Spanner
Scalable
relational
database
Horizontal
scale, strong
consistency,
ACID, SQL,
endless scale
Ideal For:
scale insurance
and
mission-critical
availability
BigQuery
Enterprise
data
Warehouse
Serverless
managed
data
warehouse
Ideal For:
real-time
analytics,
advanced
and
predictive
analytics,
enterprises
Built and managed by Google Built and managed by
Partners
(as a service or Anthos)
Managed by you and/or Partners
Data Catalog
Data management portfolio
26. What's New With Cloud SQL
Brett Hesterberg, Google Cloud
DBS102
27. A fully-managed database service that
makes it easy to set-up and administer
your relational, MySQL, PostgreSQL,
& SQL Server databases in the cloud
What is Google
Cloud SQL?
28. BigQuery to Cloud SQL federation
Easily analyze data
● Enables BigQuery to query data
residing in Cloud SQL in
real-time, without copying or
moving data
● After the initial one-time set up,
you can write a query with the
SQL function
EXTERNAL_QUERY()
● Last month Cloud SQL
federation brought in 21PB of
data to BigQuery
29. Committed Use Discounts
Ideal for workloads with predictable resources needs
Fully transferable between MySQL, PostgreSQL, and
SQL Server
Fully transferable between machine sizes
One Year
Commitment
Discount: 25%
Three Year
Commitment
Discount: 52%
30. Disaster Recovery:
PostgreSQL & MySQL
Cross-region replication
● Guard against a region failure
● Google Cloud VPC is global
● Secure: Private networking
● Easy to use: Create a replica in
any region in the world with no
additional networking
configuration
32. New:
Maintenance
Notification &
Rescheduling
Prepare for upcoming maintenance
● Receive notifications one week in
advance of incoming maintenance
activities
Reschedule maintenance
● Delay maintenance up to one
week or apply it immediately
34. Gopal Ashok, Google Cloud
DBS210
Optimally Deploy
an Application Cache
with Memorystore
35. Cloud
Memorystore
Redis and
Memcached
(Beta) managed
by Google
Open source redis and
memcached managed
by Google
Highly available
and reliable
Replication
Automatic failover
Availability SLA
Scalable and
secure
Automated scaling
Private IP deployment
Network security
Granular access
control (IAM)
36. Memorystore for Redis
Max Capacity 300 GB
Tiers Basic, Standard
Availability SLA 99.9%
Zonal Replication ✓
Automatic Failover ✓
Data Backup ✓
OSS protocol compliant ✓
Versions 3.2, 4.0, 5.0
What’s New ● Version 5.0
● Version upgrade
● Shared VPC Support
● VPC-Service Control
37. Memorystore for Memcached (Beta)
Max Capacity 5 TB
Horizontal Scaling Up to 20 nodes
Node size Up to 256 GB/ 32 cores
Availability SLA 99.9%
OSS protocol compliant ✓
Versions 1.5.16
Discovery Endpoint ✓
41. Cloud Spanner の構成
ゾーン a ゾーン b ゾーン c
Cloud Spanner
インスタンス
2 ノード
東京リージョン (asia-northeast1)
分散ストレージ
(Colossus)
分散ストレージ
(Colossus)
分散ストレージ
(Colossus)
Cloud Spanner は、コンピュートとストレージが分散されており、デフォルトで
すべてのゾーンにサーバーが配置される
コンピュート
ストレージ
Server 1 Server 2 Server 1 Server 2 Server 1 Server 2
52. Request Patterns
● Avoid Hotspots - Completely random primary key is
best for avoid hotspots & for simple CRUD like
operations.
● Interleaved Tables - For relationship, better to use
interleaved-tables
● Scans - For scan operations, better to have the
following
○ Avoid scanning the same rows over
○ Use timestamp & shardId combination
53. ● Reduce R/W transaction time (first operation to
commit time)
○ Increase in R/W transaction time = increase in
lock contention
● Retry on Aborts
○ Identify what to abort and what not to
● For R/O transactions, use snapshot reads
Transactions
54. Transaction Execution
r
w
c
r1
w1
c
w2
r2
r1, r2
w1
c
w2
r1, r2
w1, w2, c
Basic txn
(3 round trips)
Multi entity txn
(5 round trips)
Multi entity txn +
TransactionGraph
(4 round trips)
Multi entity txn +
TransactionGraph +
TransactionCoalescer
(2 round trips)
55. gRPC
● Context deadlines
● Flow control
● Compression
● Interceptors to the rescue
Client-Side Tuning
Sessions
● Read-Write vs Read-only sessions
● Session Management APIs are
expensive
● Pool size based on workload
56. ● Scales horizontally
○ CPU utilization
● Ease of management and Provisioning
○ Multi-region support
● Network
○ Routing/Bandwidth is bigger bottleneck than Spanner
● Database Splits and Compactions
Spanner-side Tuning
57. Sophia Hu, Google Cloud
Takayasu Oyama, COLOPL, Inc.
DBS205
Modernize Your Gaming
Applications for Scale
and Player Engagement
58. Split 1where id = 1
where id = 1
where id = 1
where id = 1
where id = 1
where id = 1
where id = 1
where id = 1
id: 1
id: 2
…
…
Latency increases for Split 1
Split 2
id: xxx
id: xxx
…
Split 3
id: xxx
id: xxx
…
Cloud Spanner
HOTSPOT
Handling burst of access to shared data
59. where id = 1 and copyNo = 1
where id = 1 and copyNo = 2
where id = 1 and copyNo = 3
where id = 1 and copyNo = 4
where id = 1 and copyNo = 5
where id = 1 and copyNo = 6
where id = 1 and copyNo = 7
where id = 1 and copyNo = 8
…
…
Split 2
id: xxx
copyNo:2 id: 1
…
Split 3
id: xxx
copyNo:3 id: 1
…
Split 1
id: xxx
copyNo:1 id: 1
Cloud Spanner
Handling burst of access to shared data
(possible solution)
60. Shared Data
(Master)
where id = 1
where id = 1
where id = 1
where id = 1
where id = 1
where id = 1
where id = 1
where id = 1
Replica Set
Handling burst of access to shared data
(actual solution)
61. Game Bots
Simulated Queries
Latency (99th percentile)
Storage Split Split SplitSplit
Can't split fast enough!
Cloud Spanner
Handling launch day traffic
62. Game Bots
Storage Split SplitSplit SplitSplit
Simulated Queries
Triggers "load based split"
Cloud Spanner
Handling launch day traffic
64. Cloud OnAir
● DBS215
○ Simplify Complex Application Development Using Cloud
Firestore
Cloud Firestore
65. Minh Nguyen, Google Cloud
Arash Parsa, Google Cloud
Marta Kosarchyn, Khan Academy
DBS215
Simplify Complex
Application Development
Using Cloud Firestore
66. Performance best practices
def next_id() {
next_id += 1
return next_id
}
def handle_request(doc) {
db
.collection(‘Foo’)
.document(next_id())
.set(doc)
}
key-space
time
~1000s of RPS
shards
single shard
70. Cloud OnAir
● DBS214: How to Choose the Right Database For Your Workloads
● DBS102: What's New With Cloud SQL
● DBS210: Optimally Deploy an Application Cache with Memorystore
● DBS204-JP: Cloud Spanner で進化し続けるビジネスを支えるシステムを構築
● DBS303: Lessons Learned from Evaluating Cloud Spanner at Uber Scale
● DBS205: Modernize Your Gaming Applications for Scale and Player Engagement
● DBS215: Simplify Complex Application Development Using Cloud Firestore
取り上げたセッション