Cloud Spanner Rohit Gupta, Solutions Engineer @rohitforcloud
Today’s goals Provide a brief history of Spanner at Google Provide an explanation of Cloud Spanner Do a demo!
Built on the same infrastructure that powers Google Always Fastest, most Robust, easy to Super-flexible Superior available reliable use Big Data compute economics storage network solutions
GCP Regions Finland Netherlands 3 Belgium 2 London Montreal 3 Frankfurt 3 3 Oregon 2 Iowa 3 4 Tokyo 3 3 California 3 3 N Virginia Taiwan S Carolina 3 Mumbai 3 SJC (JP, HK, SG) 2013 Singapore 2 São Paulo 3 Sydney 3 Leased and owned fiber Edge points of presence (>100) # Future region and number of zones # Current region and number of zones
Background Why build Spanner?
Technical infrastructure at Google It’s 2005...
Google’s needs Horizontally Scaling Database ACID Transactions with global consistency No downtime!
Overview What is Cloud Spanner?
What is Cloud Spanner? Google’s mission-critical scalable relational Database Service Fully managed, database service with global scale Traditional relational semantics: schemas, ACID transactions, SQL Automatic, synchronous replication within and across regions for availability Battle-tested within Google for 5+ yrs (AdWords, GooglePlay)
How does it compare?
Open standards Standard SQL (ANSI 2011) Encryption, Audit logging, Identity and Access Management Client libraries in popular languages (Java, Python, Go, Node.js, etc.) JDBC driver
Types of workloads Transactional Scale-out Global data plane Database consolidation Companies that have Companies currently Companies and/or Companies that outgrown their sharding databases developers building store their business single-instance because they need applications that data in multiple RDBMS and have more read or write have global data database products already moved to throughput than can and need strong with variable NoSQL solution, but be placed on a single consistency maintenance need transactional node overheads and consistency, or they capabilities and need are looking to move consolidation of their to a scalable solution data
Architecture overview Cloud Spanner instance Zone 1 Zone 2 Zone 3 DB 1 DB 1 DB 1 DB 2 DB 2 DB 2
Data replication Update Zone 1 Zone 2 Zone 3 Table 1 Table 1 Table 1 Table 2 Table 2 Table 2
Relational Data Layout SingerId SingerName SingerId AlbumId AlbumName 1 1 Help! 1 Beatles 2 U2 1 2 Abbey Road 3 Pink Floyd 3 1 The Wall
Interleave Data Layout 1 Beatles 1 1 Help! 1 2 Abbey Road 2 U2 3 Pink Floyd 3 1 The Wall
Relational data model CREATE TABLE Singers ( No Downtime SingerId INT64 NOT NULL, Schema Migrations SingerName STRING(MAX), ) PRIMARY KEY(SingerId); ALTER TABLE Singers CREATE TABLE Albums ( ADD COLUMN Age INT64; SingerId INT64 NOT NULL, AlbumId INT64 NOT NULL, AlbumName STRING(MAX), ) PRIMARY KEY( SingerId , AlbumId ) INTERLEAVE IN PARENT Singers ;
Getting started in Python
Storage & Database Portfolio In memory Relational Non-relational Object Warehouse App Engine Cloud Cloud Cloud Cloud Cloud BigQuery Memcache SQL Spanner Datastore Bigtable Storage Good for: Good for: Good for: Good for: Good for: Good for: Good for: Web/mobile apps, Web RDBMS+scale, Hierarchical, Heavy read + Binary or object Enterprise data HA, HTAP mobile, web write, events, gaming frameworks data warehouse Such as: Such as: Such as: Such as: Such as: Such as: Such as: User metadata, User profiles, AdTech, Game state, user CMS, Images, media Analytics, Ad/Fin/MarTech Game State financial, IoT sessions eCommerce serving, backups dashboards
Is your data No structured ? Do you need Yes Mobile SDK’s? Is your workload Yes No Yes analytics ? Firebase Cloud No Storage Storage Is your data Yes relational ? No Do you need Do you need Do you need updates horizontal scalability ? Mobile SDK’s? or low-latency ? No Yes No Yes Yes No Cloud Cloud Cloud Firebase Cloud BigQuery Realtime DB SQL Spanner Datastore Bigtable
Partner integrations Launch partners Committed partners
Whats Next Checkout Google Cloud Spanner at cloud.google.com/spanner Cloud Spanner 201 - youtu.be/Tzhe7sUNDbg Cloud Spanner Case Study - Quizlet Case Study
Thank you
Recommend
More recommend