SlideShare a Scribd company logo
Cloud Spanner
Architecture and
Use Cases
10 April 2021
GDG Cloud Bangalore
Thiago Tasca Nunes
Senior Software Engineer
Google Australia
Agenda ● What is Cloud Spanner?
● Product highlights
● Use Cases
● Internals and architecture
○ Splits, TrueTime, Reads/Writes
● Current work and challenges
01
What is
Cloud Spanner?
In-memory Relational
Non-relational
Cloud
Firestore
Cloud
Memorystore
Cloud
Bigtable
Cloud
SQL
Cloud
Spanner
Managed Redis,
Memcached
Serverless,
scalable
document
store
Managed
MySQL &
PostgreSQL
Scalable
relational
database
Low latency,
scalable wide
column store
Data warehouse
BigQuery
Enterprise data
warehouse
Spanner is part of a portfolio of GCP services
Confidential and proprietary
Relational
semantics
Schemas, ACID
transactions, SQL
Horizontal
scale
99.999% SLA, fully
managed, and scalable
+
Battle tested by Google
How is it differentiated?
02
Product
Highlights
Fully Managed ++
Simplified administration
Automatic failure recovery
Automatic sharding
No maintenance window
Decoupled Storage and Compute
Relational database
PB+ scale, consistent performance
Strong external consistency
Snapshot reads
Cell-level concurrency
Global notion of time
with TrueTime
Availability at any scale
Industry leading 99.999% SLA
Online schema changes
Global replication
Read-only replicas and
stale reads
Paxos group
for split 1
Split N
Split 2
Split 3
Split 1
Zone 1 Zone 2 Zone 3
Split 1 Split 1 Split 1
Split 2 Split 2 Split 2
Split 3
Split N Split N Split N
Split 3 Split 3
Split 3 Split 2 Paxos
Leader*
Single region
Availability at any scale
Zone A
RW - Replica
US region 1 (Default leader)
Zone B
RW - Replica
Zone A
RW - Replica
US region 2
Zone B
RW - Replica
Zone A
Witness
US region 3 (Witness)
Write quorum (US)
Zone A
RO - Replica
Zone B
RO - Replica
Asia region
Europe region
Zone A
RO - Replica
Zone B
RO - Replica
Multi region example
Industry leading 99.999% SLA
Online schema changes
Global replication
Read-only replicas and
stale reads
03
Use Cases
Customer workloads
User / Account data
Global trading metadata
Online banking
Ledger
User profile
Real-time Game play data
Loot/Payer winnings data
Leaderboard
Supply chain mgmt
Retail platform rewards
Pricing/SKU data
Order/Inventory mgmt
Real-time decision making
Route optimization platform
Monitoring & performance
insights data
Electronic Medical Records
Payment / Billing data
Patient data
Digital rights management
Catalog metadata
Gaming Finserv / Fintech
Retail Technology Media &
Entertainment
Healthcare
Industry: Social
Country: India
Use Case: Sharechat App
User profile information and user posts metadata.
Low TCO at scale High-availability with
99.99% SLA in a
regional
configuration
Scales reads & writes
across unlimited
nodes without loss of
transactional
consistency
“Our primary reason to move out of AWS was because we
encountered various limitations of scale with DynamoDB. The other
big reason was cost which became untenable at our scale.”
Challenge
Sharechat is India’s trending content
discovery app with 100M+ users to
generate, share and download
content like videos & memes, chat
with friends, share the latest events
and trends in 15 Indian languages.
Sharechat is aiming to make use of
the latest available technology to
optimize its operational cost and
minimize time to take new features
to the market.
Migration from - Amazon DynamoDB
04
Spanner
Internals
- Splits
- TrueTime
- Reads/Writes
- Paxos
Building Blocks of Spanner
● Google’s Network Infrastructure
○ Redundant, HA, global connectivity
● TrueTime
○ Provides external strong consistency and global serialization
● Optimized Software Stack
○ Custom Paxos implementation
○ Automatic resharding based on size of data and load
Cloud Spanner instance
Zone A Zone B Zone C
DB 1
DB 2
DB 1
DB 2
DB 1
DB 2
Data is always replicated for durability,
availability, and performance
Splits
The primary key range of each table is
partitioned into splits
● Each split is assigned to a server in each
zone
KeyRange Split ID
[-∞, -100] 0
[-99, 3000] 1
[3001, 7120] 2
[7121, ∞] 3
Spanner Server
Zone A
Split 0
Split 2
Spanner Server
Split 1
Split 3
Spanner Server
Zone B
Split 1
Split 2
Spanner Server
Split 0
Split 3
Spanner Server
Zone C
Split 2
Split 3
Spanner Server
Split 0
Split 1
Full key coverage
Splits
Split Layout
Role of splits
● Scalability
○ tables are distributed across span servers
● Load balancing
○ splits move from span server to span
server to balance load
○ splits are automatically split and merged,
based on size and load
GPS Master
TrueTime
Atomic Master
Server Machines
GPS Master
Atomic Master
Server Machines
GPS Master
Atomic Master
Server Machines
Guaranteed clock drift error to be maintained in the order of milliseconds
Sync every 30 sec
TrueTime and
uncertainty
Quantifies the “worst” possible error / drift
between clocks in all datacenters around the
world (global clock)
TrueTime.now() returns an interval t=[t1, t2]
● t2 = t1 + (2 * error)
● Interval is guaranteed to contain the
absolute global time during which now()
was invoked
Life of a query – strong/consistent read
Zone 1 Zone 2 Zone 3
Split 1 Split 1
Split 2
Split 2 Split 2
Split 3 Split 3
Read MyTable[key = 123]
Split 1
Split 3
1. Request
5. Response
2. Latest?
3. Latest = T’!
4. Wait
Life of a query – stale/time bounded read
Zone 1 Zone 2 Zone 3
Split 1 Split 1
Split 2
Split 2 Split 2
Split 3 Split 3
Read MyTable[key = 123, max-age=15s]
Split 1
Split 3
1. Request
(max 15s old)
3. Response
2. Am I
up-to-date?
yes!
Life of a query – single row write
Zone 1 Zone 2 Zone 3
Split 1 Split 1
Split 2
Split 2 Split 2
Split 3 Split 3
Split 1
Split 3
1. Write row
3. Write
4. Ack
3. Write
4. Ack
2. Acq. locks
6. Success
5. Rel. locks
05
Current Work
and Challenges
Features, Entry barrier and Productivity
● New features
○ Cutting edge of Databases and Distributed Computing
■ PITR
■ CDC
● Developer productivity
○ ORM support
■ Hibernate
■ Spring Data
■ Django
○ Migration Tools
■ Harbour Bridge
Open source ecosystem
● We have passionate customers who have open-sourced tools to help other
Spanner developers.
● We're accepting contributions from around the globe and are working to make
the Spanner open-source community even more vibrant.
● See Cloud Spanner Ecosystem on github.
Google Bangalore
● Cloud has a growing presence in Bangalore.
● Even Cloud Spanner is starting a team in Bangalore.
● We're hiring!
○ Backend Engineers
Questions?
More info on Spanner
● Cloud Spanner
● Cloud Spanner Tutorials
● Spanner: Google’s Globally-Distributed Database
● Spanner, TrueTime & The CAP Theorem
Ad

More Related Content

What's hot (20)

PostgreSQLのfull_page_writesについて(第24回PostgreSQLアンカンファレンス@オンライン 発表資料)
PostgreSQLのfull_page_writesについて(第24回PostgreSQLアンカンファレンス@オンライン 発表資料)PostgreSQLのfull_page_writesについて(第24回PostgreSQLアンカンファレンス@オンライン 発表資料)
PostgreSQLのfull_page_writesについて(第24回PostgreSQLアンカンファレンス@オンライン 発表資料)
NTT DATA Technology & Innovation
 
GOOGLE BIGTABLE
GOOGLE BIGTABLEGOOGLE BIGTABLE
GOOGLE BIGTABLE
Tomcy Thankachan
 
Redis at LINE
Redis at LINERedis at LINE
Redis at LINE
LINE Corporation
 
Streaming Event Time Partitioning with Apache Flink and Apache Iceberg - Juli...
Streaming Event Time Partitioning with Apache Flink and Apache Iceberg - Juli...Streaming Event Time Partitioning with Apache Flink and Apache Iceberg - Juli...
Streaming Event Time Partitioning with Apache Flink and Apache Iceberg - Juli...
Flink Forward
 
[SSA] 03.newsql database (2014.02.05)
[SSA] 03.newsql database (2014.02.05)[SSA] 03.newsql database (2014.02.05)
[SSA] 03.newsql database (2014.02.05)
Steve Min
 
Oracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret InternalsOracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret Internals
Anil Nair
 
YugabyteDBを使ってみよう - part2 -(NewSQL/分散SQLデータベースよろず勉強会 #2 発表資料)
YugabyteDBを使ってみよう - part2 -(NewSQL/分散SQLデータベースよろず勉強会 #2 発表資料)YugabyteDBを使ってみよう - part2 -(NewSQL/分散SQLデータベースよろず勉強会 #2 発表資料)
YugabyteDBを使ってみよう - part2 -(NewSQL/分散SQLデータベースよろず勉強会 #2 発表資料)
NTT DATA Technology & Innovation
 
Oracle Golden Gate Bidirectional Replication
Oracle Golden Gate Bidirectional ReplicationOracle Golden Gate Bidirectional Replication
Oracle Golden Gate Bidirectional Replication
Arun Sharma
 
PostgreSQLのgitレポジトリから見える2021年の開発状況(第30回PostgreSQLアンカンファレンス@オンライン 発表資料)
PostgreSQLのgitレポジトリから見える2021年の開発状況(第30回PostgreSQLアンカンファレンス@オンライン 発表資料)PostgreSQLのgitレポジトリから見える2021年の開発状況(第30回PostgreSQLアンカンファレンス@オンライン 発表資料)
PostgreSQLのgitレポジトリから見える2021年の開発状況(第30回PostgreSQLアンカンファレンス@オンライン 発表資料)
NTT DATA Technology & Innovation
 
Best Practice of Compression/Decompression Codes in Apache Spark with Sophia...
 Best Practice of Compression/Decompression Codes in Apache Spark with Sophia... Best Practice of Compression/Decompression Codes in Apache Spark with Sophia...
Best Practice of Compression/Decompression Codes in Apache Spark with Sophia...
Databricks
 
Apache Kafka - Martin Podval
Apache Kafka - Martin PodvalApache Kafka - Martin Podval
Apache Kafka - Martin Podval
Martin Podval
 
地理分散DBについて
地理分散DBについて地理分散DBについて
地理分散DBについて
Kumazaki Hiroki
 
Planning for Disaster Recovery (DR) with Galera Cluster
Planning for Disaster Recovery (DR) with Galera ClusterPlanning for Disaster Recovery (DR) with Galera Cluster
Planning for Disaster Recovery (DR) with Galera Cluster
Codership Oy - Creators of Galera Cluster
 
Scalar DB: Universal Transaction Manager
Scalar DB: Universal Transaction ManagerScalar DB: Universal Transaction Manager
Scalar DB: Universal Transaction Manager
Scalar, Inc.
 
Design Patterns for Distributed Non-Relational Databases
Design Patterns for Distributed Non-Relational DatabasesDesign Patterns for Distributed Non-Relational Databases
Design Patterns for Distributed Non-Relational Databases
guestdfd1ec
 
Distributed SQL Databases Deconstructed
Distributed SQL Databases DeconstructedDistributed SQL Databases Deconstructed
Distributed SQL Databases Deconstructed
Yugabyte
 
Dbts 分散olt pv2
Dbts 分散olt pv2Dbts 分散olt pv2
Dbts 分散olt pv2
Takashi Kambayashi
 
ビッグデータ処理データベースの全体像と使い分け
ビッグデータ処理データベースの全体像と使い分けビッグデータ処理データベースの全体像と使い分け
ビッグデータ処理データベースの全体像と使い分け
Recruit Technologies
 
CockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL DatabaseCockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL Database
C4Media
 
アプリ開発者、DB 管理者視点での Cloud Spanner 活用方法 | 第 10 回 Google Cloud INSIDE Games & App...
アプリ開発者、DB 管理者視点での Cloud Spanner 活用方法 | 第 10 回 Google Cloud INSIDE Games & App...アプリ開発者、DB 管理者視点での Cloud Spanner 活用方法 | 第 10 回 Google Cloud INSIDE Games & App...
アプリ開発者、DB 管理者視点での Cloud Spanner 活用方法 | 第 10 回 Google Cloud INSIDE Games & App...
Google Cloud Platform - Japan
 
PostgreSQLのfull_page_writesについて(第24回PostgreSQLアンカンファレンス@オンライン 発表資料)
PostgreSQLのfull_page_writesについて(第24回PostgreSQLアンカンファレンス@オンライン 発表資料)PostgreSQLのfull_page_writesについて(第24回PostgreSQLアンカンファレンス@オンライン 発表資料)
PostgreSQLのfull_page_writesについて(第24回PostgreSQLアンカンファレンス@オンライン 発表資料)
NTT DATA Technology & Innovation
 
Streaming Event Time Partitioning with Apache Flink and Apache Iceberg - Juli...
Streaming Event Time Partitioning with Apache Flink and Apache Iceberg - Juli...Streaming Event Time Partitioning with Apache Flink and Apache Iceberg - Juli...
Streaming Event Time Partitioning with Apache Flink and Apache Iceberg - Juli...
Flink Forward
 
[SSA] 03.newsql database (2014.02.05)
[SSA] 03.newsql database (2014.02.05)[SSA] 03.newsql database (2014.02.05)
[SSA] 03.newsql database (2014.02.05)
Steve Min
 
Oracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret InternalsOracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret Internals
Anil Nair
 
YugabyteDBを使ってみよう - part2 -(NewSQL/分散SQLデータベースよろず勉強会 #2 発表資料)
YugabyteDBを使ってみよう - part2 -(NewSQL/分散SQLデータベースよろず勉強会 #2 発表資料)YugabyteDBを使ってみよう - part2 -(NewSQL/分散SQLデータベースよろず勉強会 #2 発表資料)
YugabyteDBを使ってみよう - part2 -(NewSQL/分散SQLデータベースよろず勉強会 #2 発表資料)
NTT DATA Technology & Innovation
 
Oracle Golden Gate Bidirectional Replication
Oracle Golden Gate Bidirectional ReplicationOracle Golden Gate Bidirectional Replication
Oracle Golden Gate Bidirectional Replication
Arun Sharma
 
PostgreSQLのgitレポジトリから見える2021年の開発状況(第30回PostgreSQLアンカンファレンス@オンライン 発表資料)
PostgreSQLのgitレポジトリから見える2021年の開発状況(第30回PostgreSQLアンカンファレンス@オンライン 発表資料)PostgreSQLのgitレポジトリから見える2021年の開発状況(第30回PostgreSQLアンカンファレンス@オンライン 発表資料)
PostgreSQLのgitレポジトリから見える2021年の開発状況(第30回PostgreSQLアンカンファレンス@オンライン 発表資料)
NTT DATA Technology & Innovation
 
Best Practice of Compression/Decompression Codes in Apache Spark with Sophia...
 Best Practice of Compression/Decompression Codes in Apache Spark with Sophia... Best Practice of Compression/Decompression Codes in Apache Spark with Sophia...
Best Practice of Compression/Decompression Codes in Apache Spark with Sophia...
Databricks
 
Apache Kafka - Martin Podval
Apache Kafka - Martin PodvalApache Kafka - Martin Podval
Apache Kafka - Martin Podval
Martin Podval
 
地理分散DBについて
地理分散DBについて地理分散DBについて
地理分散DBについて
Kumazaki Hiroki
 
Scalar DB: Universal Transaction Manager
Scalar DB: Universal Transaction ManagerScalar DB: Universal Transaction Manager
Scalar DB: Universal Transaction Manager
Scalar, Inc.
 
Design Patterns for Distributed Non-Relational Databases
Design Patterns for Distributed Non-Relational DatabasesDesign Patterns for Distributed Non-Relational Databases
Design Patterns for Distributed Non-Relational Databases
guestdfd1ec
 
Distributed SQL Databases Deconstructed
Distributed SQL Databases DeconstructedDistributed SQL Databases Deconstructed
Distributed SQL Databases Deconstructed
Yugabyte
 
ビッグデータ処理データベースの全体像と使い分け
ビッグデータ処理データベースの全体像と使い分けビッグデータ処理データベースの全体像と使い分け
ビッグデータ処理データベースの全体像と使い分け
Recruit Technologies
 
CockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL DatabaseCockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL Database
C4Media
 
アプリ開発者、DB 管理者視点での Cloud Spanner 活用方法 | 第 10 回 Google Cloud INSIDE Games & App...
アプリ開発者、DB 管理者視点での Cloud Spanner 活用方法 | 第 10 回 Google Cloud INSIDE Games & App...アプリ開発者、DB 管理者視点での Cloud Spanner 活用方法 | 第 10 回 Google Cloud INSIDE Games & App...
アプリ開発者、DB 管理者視点での Cloud Spanner 活用方法 | 第 10 回 Google Cloud INSIDE Games & App...
Google Cloud Platform - Japan
 

Similar to Cloud spanner architecture and use cases (20)

Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...
Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...
Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...
DataStax
 
Everything You Need to Know About Sharding
Everything You Need to Know About ShardingEverything You Need to Know About Sharding
Everything You Need to Know About Sharding
MongoDB
 
Adam Dagnall: Advanced S3 compatible storage integration in CloudStack
Adam Dagnall: Advanced S3 compatible storage integration in CloudStackAdam Dagnall: Advanced S3 compatible storage integration in CloudStack
Adam Dagnall: Advanced S3 compatible storage integration in CloudStack
ShapeBlue
 
Deploy Microservices in the Real World
Deploy Microservices in the Real WorldDeploy Microservices in the Real World
Deploy Microservices in the Real World
Elana Krasner
 
Scaling Security on 100s of Millions of Mobile Devices Using Apache Kafka® an...
Scaling Security on 100s of Millions of Mobile Devices Using Apache Kafka® an...Scaling Security on 100s of Millions of Mobile Devices Using Apache Kafka® an...
Scaling Security on 100s of Millions of Mobile Devices Using Apache Kafka® an...
confluent
 
Getting more into GCP.pdf
Getting more into GCP.pdfGetting more into GCP.pdf
Getting more into GCP.pdf
Knoldus Inc.
 
moveMountainIEEE
moveMountainIEEEmoveMountainIEEE
moveMountainIEEE
Christopher Gallo
 
Supporting Digital Media Workflows in the Cloud with Perforce Helix
Supporting Digital Media Workflows in the Cloud with Perforce HelixSupporting Digital Media Workflows in the Cloud with Perforce Helix
Supporting Digital Media Workflows in the Cloud with Perforce Helix
Perforce
 
Choosing the right parallel compute architecture
Choosing the right parallel compute architecture Choosing the right parallel compute architecture
Choosing the right parallel compute architecture
corehard_by
 
[PASS Summit 2016] Blazing Fast, Planet-Scale Customer Scenarios with Azure D...
[PASS Summit 2016] Blazing Fast, Planet-Scale Customer Scenarios with Azure D...[PASS Summit 2016] Blazing Fast, Planet-Scale Customer Scenarios with Azure D...
[PASS Summit 2016] Blazing Fast, Planet-Scale Customer Scenarios with Azure D...
Andrew Liu
 
Time Series Analytics Azure ADX
Time Series Analytics Azure ADXTime Series Analytics Azure ADX
Time Series Analytics Azure ADX
Riccardo Zamana
 
Intro to Azure SQL database
Intro to Azure SQL databaseIntro to Azure SQL database
Intro to Azure SQL database
Steve Knutson
 
Tour de France Azure PaaS 3/7 Stocker des informations
Tour de France Azure PaaS 3/7 Stocker des informationsTour de France Azure PaaS 3/7 Stocker des informations
Tour de France Azure PaaS 3/7 Stocker des informations
Alex Danvy
 
Managing 100s of PetaBytes of data in Cloud
Managing 100s of PetaBytes of data in CloudManaging 100s of PetaBytes of data in Cloud
Managing 100s of PetaBytes of data in Cloud
lohitvijayarenu
 
MongoDB Sharding Webinar 2014
MongoDB Sharding Webinar 2014MongoDB Sharding Webinar 2014
MongoDB Sharding Webinar 2014
Dylan Tong
 
Maximizing Data Lake ROI with Data Virtualization: A Technical Demonstration
Maximizing Data Lake ROI with Data Virtualization: A Technical DemonstrationMaximizing Data Lake ROI with Data Virtualization: A Technical Demonstration
Maximizing Data Lake ROI with Data Virtualization: A Technical Demonstration
Denodo
 
Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...
Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...
Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...
Continuent
 
Cloud computing fundamentals with Microsoft Azure
Cloud computing fundamentals with Microsoft AzureCloud computing fundamentals with Microsoft Azure
Cloud computing fundamentals with Microsoft Azure
Radoslav Gatev
 
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020
Tim Wagner
 
Virtual training intro to InfluxDB - June 2021
Virtual training  intro to InfluxDB  - June 2021Virtual training  intro to InfluxDB  - June 2021
Virtual training intro to InfluxDB - June 2021
InfluxData
 
Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...
Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...
Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...
DataStax
 
Everything You Need to Know About Sharding
Everything You Need to Know About ShardingEverything You Need to Know About Sharding
Everything You Need to Know About Sharding
MongoDB
 
Adam Dagnall: Advanced S3 compatible storage integration in CloudStack
Adam Dagnall: Advanced S3 compatible storage integration in CloudStackAdam Dagnall: Advanced S3 compatible storage integration in CloudStack
Adam Dagnall: Advanced S3 compatible storage integration in CloudStack
ShapeBlue
 
Deploy Microservices in the Real World
Deploy Microservices in the Real WorldDeploy Microservices in the Real World
Deploy Microservices in the Real World
Elana Krasner
 
Scaling Security on 100s of Millions of Mobile Devices Using Apache Kafka® an...
Scaling Security on 100s of Millions of Mobile Devices Using Apache Kafka® an...Scaling Security on 100s of Millions of Mobile Devices Using Apache Kafka® an...
Scaling Security on 100s of Millions of Mobile Devices Using Apache Kafka® an...
confluent
 
Getting more into GCP.pdf
Getting more into GCP.pdfGetting more into GCP.pdf
Getting more into GCP.pdf
Knoldus Inc.
 
Supporting Digital Media Workflows in the Cloud with Perforce Helix
Supporting Digital Media Workflows in the Cloud with Perforce HelixSupporting Digital Media Workflows in the Cloud with Perforce Helix
Supporting Digital Media Workflows in the Cloud with Perforce Helix
Perforce
 
Choosing the right parallel compute architecture
Choosing the right parallel compute architecture Choosing the right parallel compute architecture
Choosing the right parallel compute architecture
corehard_by
 
[PASS Summit 2016] Blazing Fast, Planet-Scale Customer Scenarios with Azure D...
[PASS Summit 2016] Blazing Fast, Planet-Scale Customer Scenarios with Azure D...[PASS Summit 2016] Blazing Fast, Planet-Scale Customer Scenarios with Azure D...
[PASS Summit 2016] Blazing Fast, Planet-Scale Customer Scenarios with Azure D...
Andrew Liu
 
Time Series Analytics Azure ADX
Time Series Analytics Azure ADXTime Series Analytics Azure ADX
Time Series Analytics Azure ADX
Riccardo Zamana
 
Intro to Azure SQL database
Intro to Azure SQL databaseIntro to Azure SQL database
Intro to Azure SQL database
Steve Knutson
 
Tour de France Azure PaaS 3/7 Stocker des informations
Tour de France Azure PaaS 3/7 Stocker des informationsTour de France Azure PaaS 3/7 Stocker des informations
Tour de France Azure PaaS 3/7 Stocker des informations
Alex Danvy
 
Managing 100s of PetaBytes of data in Cloud
Managing 100s of PetaBytes of data in CloudManaging 100s of PetaBytes of data in Cloud
Managing 100s of PetaBytes of data in Cloud
lohitvijayarenu
 
MongoDB Sharding Webinar 2014
MongoDB Sharding Webinar 2014MongoDB Sharding Webinar 2014
MongoDB Sharding Webinar 2014
Dylan Tong
 
Maximizing Data Lake ROI with Data Virtualization: A Technical Demonstration
Maximizing Data Lake ROI with Data Virtualization: A Technical DemonstrationMaximizing Data Lake ROI with Data Virtualization: A Technical Demonstration
Maximizing Data Lake ROI with Data Virtualization: A Technical Demonstration
Denodo
 
Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...
Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...
Webinar Slides: AWS Aurora MySQL Replacement: Break Away From Geo-Limitations...
Continuent
 
Cloud computing fundamentals with Microsoft Azure
Cloud computing fundamentals with Microsoft AzureCloud computing fundamentals with Microsoft Azure
Cloud computing fundamentals with Microsoft Azure
Radoslav Gatev
 
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020
Tim Wagner
 
Virtual training intro to InfluxDB - June 2021
Virtual training  intro to InfluxDB  - June 2021Virtual training  intro to InfluxDB  - June 2021
Virtual training intro to InfluxDB - June 2021
InfluxData
 
Ad

More from GDG Cloud Bengaluru (11)

Making cloud native deployments easy with Buildpack
Making cloud native deployments easy with BuildpackMaking cloud native deployments easy with Buildpack
Making cloud native deployments easy with Buildpack
GDG Cloud Bengaluru
 
What's new with serverless on google cloud
What's new with serverless on google cloud What's new with serverless on google cloud
What's new with serverless on google cloud
GDG Cloud Bengaluru
 
Managing serverless workloads with knative
Managing serverless workloads with knativeManaging serverless workloads with knative
Managing serverless workloads with knative
GDG Cloud Bengaluru
 
Introduction to OpenFaas
Introduction to OpenFaasIntroduction to OpenFaas
Introduction to OpenFaas
GDG Cloud Bengaluru
 
Building observable infrastructure and code
Building observable infrastructure and codeBuilding observable infrastructure and code
Building observable infrastructure and code
GDG Cloud Bengaluru
 
Kubernetes best practices with GKE
Kubernetes best practices with GKEKubernetes best practices with GKE
Kubernetes best practices with GKE
GDG Cloud Bengaluru
 
Serverless solutions on GCF
Serverless solutions on GCFServerless solutions on GCF
Serverless solutions on GCF
GDG Cloud Bengaluru
 
Anthos Application Modernization Platform
Anthos Application Modernization PlatformAnthos Application Modernization Platform
Anthos Application Modernization Platform
GDG Cloud Bengaluru
 
Assessing the quality of doctor consultations using ML
Assessing the quality of doctor consultations using MLAssessing the quality of doctor consultations using ML
Assessing the quality of doctor consultations using ML
GDG Cloud Bengaluru
 
Intro to GKE and app deployment with Kubernetes
Intro to GKE and app deployment with KubernetesIntro to GKE and app deployment with Kubernetes
Intro to GKE and app deployment with Kubernetes
GDG Cloud Bengaluru
 
Google Cloud - Stand Out Features
Google Cloud - Stand Out FeaturesGoogle Cloud - Stand Out Features
Google Cloud - Stand Out Features
GDG Cloud Bengaluru
 
Making cloud native deployments easy with Buildpack
Making cloud native deployments easy with BuildpackMaking cloud native deployments easy with Buildpack
Making cloud native deployments easy with Buildpack
GDG Cloud Bengaluru
 
What's new with serverless on google cloud
What's new with serverless on google cloud What's new with serverless on google cloud
What's new with serverless on google cloud
GDG Cloud Bengaluru
 
Managing serverless workloads with knative
Managing serverless workloads with knativeManaging serverless workloads with knative
Managing serverless workloads with knative
GDG Cloud Bengaluru
 
Building observable infrastructure and code
Building observable infrastructure and codeBuilding observable infrastructure and code
Building observable infrastructure and code
GDG Cloud Bengaluru
 
Kubernetes best practices with GKE
Kubernetes best practices with GKEKubernetes best practices with GKE
Kubernetes best practices with GKE
GDG Cloud Bengaluru
 
Anthos Application Modernization Platform
Anthos Application Modernization PlatformAnthos Application Modernization Platform
Anthos Application Modernization Platform
GDG Cloud Bengaluru
 
Assessing the quality of doctor consultations using ML
Assessing the quality of doctor consultations using MLAssessing the quality of doctor consultations using ML
Assessing the quality of doctor consultations using ML
GDG Cloud Bengaluru
 
Intro to GKE and app deployment with Kubernetes
Intro to GKE and app deployment with KubernetesIntro to GKE and app deployment with Kubernetes
Intro to GKE and app deployment with Kubernetes
GDG Cloud Bengaluru
 
Google Cloud - Stand Out Features
Google Cloud - Stand Out FeaturesGoogle Cloud - Stand Out Features
Google Cloud - Stand Out Features
GDG Cloud Bengaluru
 
Ad

Recently uploaded (20)

Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
João Esperancinha
 
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Safe Software
 
Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
Unlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web AppsUnlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web Apps
Maximiliano Firtman
 
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptxSmart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Seasia Infotech
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)
Kaya Weers
 
Building the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdfBuilding the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdf
Cheryl Hung
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Q1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor PresentationQ1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor Presentation
Dropbox
 
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Maarten Verwaest
 
Artificial_Intelligence_in_Everyday_Life.pptx
Artificial_Intelligence_in_Everyday_Life.pptxArtificial_Intelligence_in_Everyday_Life.pptx
Artificial_Intelligence_in_Everyday_Life.pptx
03ANMOLCHAURASIYA
 
AI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamsonAI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamson
UXPA Boston
 
Com fer un pla de gestió de dades amb l'eiNa DMP (en anglès)
Com fer un pla de gestió de dades amb l'eiNa DMP (en anglès)Com fer un pla de gestió de dades amb l'eiNa DMP (en anglès)
Com fer un pla de gestió de dades amb l'eiNa DMP (en anglès)
CSUC - Consorci de Serveis Universitaris de Catalunya
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptxDevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
Justin Reock
 
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
Ivano Malavolta
 
Mastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B LandscapeMastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B Landscape
marketing943205
 
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
João Esperancinha
 
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Safe Software
 
Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
Unlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web AppsUnlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web Apps
Maximiliano Firtman
 
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptxSmart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Seasia Infotech
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)
Kaya Weers
 
Building the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdfBuilding the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdf
Cheryl Hung
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Q1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor PresentationQ1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor Presentation
Dropbox
 
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Maarten Verwaest
 
Artificial_Intelligence_in_Everyday_Life.pptx
Artificial_Intelligence_in_Everyday_Life.pptxArtificial_Intelligence_in_Everyday_Life.pptx
Artificial_Intelligence_in_Everyday_Life.pptx
03ANMOLCHAURASIYA
 
AI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamsonAI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamson
UXPA Boston
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptxDevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
Justin Reock
 
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
Ivano Malavolta
 
Mastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B LandscapeMastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B Landscape
marketing943205
 

Cloud spanner architecture and use cases

  • 1. Cloud Spanner Architecture and Use Cases 10 April 2021 GDG Cloud Bangalore Thiago Tasca Nunes Senior Software Engineer Google Australia
  • 2. Agenda ● What is Cloud Spanner? ● Product highlights ● Use Cases ● Internals and architecture ○ Splits, TrueTime, Reads/Writes ● Current work and challenges
  • 4. In-memory Relational Non-relational Cloud Firestore Cloud Memorystore Cloud Bigtable Cloud SQL Cloud Spanner Managed Redis, Memcached Serverless, scalable document store Managed MySQL & PostgreSQL Scalable relational database Low latency, scalable wide column store Data warehouse BigQuery Enterprise data warehouse Spanner is part of a portfolio of GCP services
  • 5. Confidential and proprietary Relational semantics Schemas, ACID transactions, SQL Horizontal scale 99.999% SLA, fully managed, and scalable + Battle tested by Google How is it differentiated?
  • 7. Fully Managed ++ Simplified administration Automatic failure recovery Automatic sharding No maintenance window Decoupled Storage and Compute
  • 8. Relational database PB+ scale, consistent performance Strong external consistency Snapshot reads Cell-level concurrency Global notion of time with TrueTime
  • 9. Availability at any scale Industry leading 99.999% SLA Online schema changes Global replication Read-only replicas and stale reads Paxos group for split 1 Split N Split 2 Split 3 Split 1 Zone 1 Zone 2 Zone 3 Split 1 Split 1 Split 1 Split 2 Split 2 Split 2 Split 3 Split N Split N Split N Split 3 Split 3 Split 3 Split 2 Paxos Leader* Single region
  • 10. Availability at any scale Zone A RW - Replica US region 1 (Default leader) Zone B RW - Replica Zone A RW - Replica US region 2 Zone B RW - Replica Zone A Witness US region 3 (Witness) Write quorum (US) Zone A RO - Replica Zone B RO - Replica Asia region Europe region Zone A RO - Replica Zone B RO - Replica Multi region example Industry leading 99.999% SLA Online schema changes Global replication Read-only replicas and stale reads
  • 12. Customer workloads User / Account data Global trading metadata Online banking Ledger User profile Real-time Game play data Loot/Payer winnings data Leaderboard Supply chain mgmt Retail platform rewards Pricing/SKU data Order/Inventory mgmt Real-time decision making Route optimization platform Monitoring & performance insights data Electronic Medical Records Payment / Billing data Patient data Digital rights management Catalog metadata Gaming Finserv / Fintech Retail Technology Media & Entertainment Healthcare
  • 13. Industry: Social Country: India Use Case: Sharechat App User profile information and user posts metadata. Low TCO at scale High-availability with 99.99% SLA in a regional configuration Scales reads & writes across unlimited nodes without loss of transactional consistency “Our primary reason to move out of AWS was because we encountered various limitations of scale with DynamoDB. The other big reason was cost which became untenable at our scale.” Challenge Sharechat is India’s trending content discovery app with 100M+ users to generate, share and download content like videos & memes, chat with friends, share the latest events and trends in 15 Indian languages. Sharechat is aiming to make use of the latest available technology to optimize its operational cost and minimize time to take new features to the market. Migration from - Amazon DynamoDB
  • 15. Building Blocks of Spanner ● Google’s Network Infrastructure ○ Redundant, HA, global connectivity ● TrueTime ○ Provides external strong consistency and global serialization ● Optimized Software Stack ○ Custom Paxos implementation ○ Automatic resharding based on size of data and load
  • 16. Cloud Spanner instance Zone A Zone B Zone C DB 1 DB 2 DB 1 DB 2 DB 1 DB 2 Data is always replicated for durability, availability, and performance
  • 17. Splits The primary key range of each table is partitioned into splits ● Each split is assigned to a server in each zone KeyRange Split ID [-∞, -100] 0 [-99, 3000] 1 [3001, 7120] 2 [7121, ∞] 3
  • 18. Spanner Server Zone A Split 0 Split 2 Spanner Server Split 1 Split 3 Spanner Server Zone B Split 1 Split 2 Spanner Server Split 0 Split 3 Spanner Server Zone C Split 2 Split 3 Spanner Server Split 0 Split 1 Full key coverage Splits Split Layout
  • 19. Role of splits ● Scalability ○ tables are distributed across span servers ● Load balancing ○ splits move from span server to span server to balance load ○ splits are automatically split and merged, based on size and load
  • 20. GPS Master TrueTime Atomic Master Server Machines GPS Master Atomic Master Server Machines GPS Master Atomic Master Server Machines Guaranteed clock drift error to be maintained in the order of milliseconds Sync every 30 sec
  • 21. TrueTime and uncertainty Quantifies the “worst” possible error / drift between clocks in all datacenters around the world (global clock) TrueTime.now() returns an interval t=[t1, t2] ● t2 = t1 + (2 * error) ● Interval is guaranteed to contain the absolute global time during which now() was invoked
  • 22. Life of a query – strong/consistent read Zone 1 Zone 2 Zone 3 Split 1 Split 1 Split 2 Split 2 Split 2 Split 3 Split 3 Read MyTable[key = 123] Split 1 Split 3 1. Request 5. Response 2. Latest? 3. Latest = T’! 4. Wait
  • 23. Life of a query – stale/time bounded read Zone 1 Zone 2 Zone 3 Split 1 Split 1 Split 2 Split 2 Split 2 Split 3 Split 3 Read MyTable[key = 123, max-age=15s] Split 1 Split 3 1. Request (max 15s old) 3. Response 2. Am I up-to-date? yes!
  • 24. Life of a query – single row write Zone 1 Zone 2 Zone 3 Split 1 Split 1 Split 2 Split 2 Split 2 Split 3 Split 3 Split 1 Split 3 1. Write row 3. Write 4. Ack 3. Write 4. Ack 2. Acq. locks 6. Success 5. Rel. locks
  • 26. Features, Entry barrier and Productivity ● New features ○ Cutting edge of Databases and Distributed Computing ■ PITR ■ CDC ● Developer productivity ○ ORM support ■ Hibernate ■ Spring Data ■ Django ○ Migration Tools ■ Harbour Bridge
  • 27. Open source ecosystem ● We have passionate customers who have open-sourced tools to help other Spanner developers. ● We're accepting contributions from around the globe and are working to make the Spanner open-source community even more vibrant. ● See Cloud Spanner Ecosystem on github.
  • 28. Google Bangalore ● Cloud has a growing presence in Bangalore. ● Even Cloud Spanner is starting a team in Bangalore. ● We're hiring! ○ Backend Engineers
  • 29. Questions? More info on Spanner ● Cloud Spanner ● Cloud Spanner Tutorials ● Spanner: Google’s Globally-Distributed Database ● Spanner, TrueTime & The CAP Theorem
  翻译: