Top Banner
Cloud Spanner Simon Su / Cloud GDE
18

Try Cloud Spanner

Feb 21, 2017

Download

Technology

Simon Su
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Try Cloud Spanner

Cloud Spanner Simon Su / Cloud GDE

Page 2: Try Cloud Spanner

Spanner vs. Traditional SQL/NoSQL

Page 3: Try Cloud Spanner

Spanner introduction● Global Scale

Horizontally scalable across regions and data centers, from 1 to hundreds or thousands of nodes

● Fully ManagedDatabase management service means replication and maintenance are automatic

● Relational SemanticsEverything you would expect from a relational database - schemas, ACID transactions, and SQL queries (ANSI 2011)

● Multi Language SupportClient libraries in Java, Go, Python, Node.js and more coming. JDBC driver for connectivity with popular third-party tools

Page 4: Try Cloud Spanner

Spanner introduction● Transactional Consistency

Purpose built for strong, global transactional consistency

● Enterprise Grade SecurityData-layer encryption, IAM integration for access and controls, and audit logging

● Highly AvailableWhenever, wherever, your data is highly available

Page 5: Try Cloud Spanner

Interactive with Cloud Console

Page 6: Try Cloud Spanner

Create new Spanner instance

Performance guidance● Each Spanner node can provide up to 10,000 QPS of reads or 2000 QPS

of writes (writing single rows at 1KB data per row), and 2 TiB storage.● For optimal performance, we recommend provisioning enough nodes to

keep overall CPU utilization under 75%.● Minimum of 3 nodes recommended for production environments.● Note that Cloud Spanner performance is highly dependent on workload,

schema design, and dataset characteristics. The performance numbers above are estimates, and assume best practices are followed.

Page 7: Try Cloud Spanner

Create Database

Page 8: Try Cloud Spanner

Database view

Page 9: Try Cloud Spanner

Data preview

Page 10: Try Cloud Spanner

Query from GCP web console

Page 11: Try Cloud Spanner

Spanner SQL Execution Plan

Page 12: Try Cloud Spanner

Spanner permission control

Page 13: Try Cloud Spanner

Resize Spanner instance

Page 14: Try Cloud Spanner

Piece of Code...

Page 15: Try Cloud Spanner

Small RESTful test with Spanner

Page 16: Try Cloud Spanner

RESTful result$ time curl -sS localhost:3000/singer/2 -d firstname=simon -d lastname=su -X POST

$ time time curl -sS localhost:3000/singer/list

See: https://github.com/peihsinsu/try-spaner

Page 17: Try Cloud Spanner

Summarize Spanner benefit

● Pay by use with the storage

● Throughput scaleout by extend instance size

● With transaction and strongly consistent

● Full managed by Google

~ The most I love ~

Page 18: Try Cloud Spanner

~ Thanks ~