F1: A Distributed SQL Database That Scales. Presentation by: Alex Degtiar (adegtiar@cmu.edu) 15-799 10/21/2013



Similar documents
F1: A Distributed SQL Database That Scales

White Paper. Optimizing the Performance Of MySQL Cluster

SQL Server 2014 New Features/In- Memory Store. Juergen Thomas Microsoft Corporation

Database Scalability {Patterns} / Robert Treat

The Sierra Clustered Database Engine, the technology at the heart of

MongoDB Developer and Administrator Certification Course Agenda

Report for the seminar Algorithms for Database Systems F1: A Distributed SQL Database That Scales

How to Choose Between Hadoop, NoSQL and RDBMS

MySQL Cluster New Features. Johan Andersson MySQL Cluster Consulting johan.andersson@sun.com

In Memory Accelerator for MongoDB

Lecture 10: HBase! Claudia Hauff (Web Information Systems)!

Can the Elephants Handle the NoSQL Onslaught?

Big Data With Hadoop

A survey of big data architectures for handling massive data

Cluster Computing. ! Fault tolerance. ! Stateless. ! Throughput. ! Stateful. ! Response time. Architectures. Stateless vs. Stateful.

MySQL és Hadoop mint Big Data platform (SQL + NoSQL = MySQL Cluster?!)

Cloud Computing at Google. Architecture

Using MySQL for Big Data Advantage Integrate for Insight Sastry Vedantam

W I S E. SQL Server 2008/2008 R2 Advanced DBA Performance & WISE LTD.

SAP HANA - Main Memory Technology: A Challenge for Development of Business Applications. Jürgen Primsch, SAP AG July 2011

The Oracle Universal Server Buffer Manager

Amr El Abbadi. Computer Science, UC Santa Barbara

Data Distribution with SQL Server Replication

Would-be system and database administrators. PREREQUISITES: At least 6 months experience with a Windows operating system.

An Approach to Implement Map Reduce with NoSQL Databases

Architectural patterns for building real time applications with Apache HBase. Andrew Purtell Committer and PMC, Apache HBase


extensible record stores document stores key-value stores Rick Cattel s clustering from Scalable SQL and NoSQL Data Stores SIGMOD Record, 2010

Overview of Databases On MacOS. Karl Kuehn Automation Engineer RethinkDB

Practical Cassandra. Vitalii

Evolution of Web Application Architecture International PHP Conference. Kore Nordmann / <kore@qafoo.com> June 9th, 2015

Appendix A Core Concepts in SQL Server High Availability and Replication

SQL Server 2008 Performance and Scale

Bigdata High Availability (HA) Architecture

Domain driven design, NoSQL and multi-model databases

Real-time Data Replication

Module 14: Scalability and High Availability

ScaleArc idb Solution for SQL Server Deployments

<Insert Picture Here> Oracle NoSQL Database A Distributed Key-Value Store

A1 and FARM scalable graph database on top of a transactional memory layer

Evaluator s Guide. McKnight. Consulting Group. McKnight Consulting Group

High Availability for Database Systems in Cloud Computing Environments. Ashraf Aboulnaga University of Waterloo

Direct NFS - Design considerations for next-gen NAS appliances optimized for database workloads Akshay Shah Gurmeet Goindi Oracle

NoSQL Databases. Nikos Parlavantzas

Affordable, Scalable, Reliable OLTP in a Cloud and Big Data World: IBM DB2 purescale

Tips and Tricks for Using Oracle TimesTen In-Memory Database in the Application Tier

OLTP Meets Bigdata, Challenges, Options, and Future Saibabu Devabhaktuni

NoSQL systems: introduction and data models. Riccardo Torlone Università Roma Tre

How To Use Big Data For Telco (For A Telco)

A programming model in Cloud: MapReduce

Hypertable Architecture Overview

Distributed File System. MCSN N. Tonellotto Complements of Distributed Enabling Platforms

Couchbase Server Under the Hood

Eloquence Training What s new in Eloquence B.08.00

On the Design and Scalability of Distributed Shared-Data Databases

Near Real Time Indexing Kafka Message to Apache Blur using Spark Streaming. by Dibyendu Bhattacharya

GigaSpaces Real-Time Analytics for Big Data

High-Volume Data Warehousing in Centerprise. Product Datasheet

CASE STUDY: Oracle TimesTen In-Memory Database and Shared Disk HA Implementation at Instance level. -ORACLE TIMESTEN 11gR1

Tier Architectures. Kathleen Durant CS 3200

Data Management in the Cloud

Using Oracle NoSQL Database

Cloud DBMS: An Overview. Shan-Hung Wu, NetDB CS, NTHU Spring, 2015

Hadoop: A Framework for Data- Intensive Distributed Computing. CS561-Spring 2012 WPI, Mohamed Y. Eltabakh

Structured Data Storage

Online Transaction Processing in SQL Server 2008

Online, Asynchronous Schema Change in F1

Portable Scale-Out Benchmarks for MySQL. MySQL User Conference 2008 Robert Hodges CTO Continuent, Inc.

Why NoSQL? Your database options in the new non- relational world IBM Cloudant 1

Hadoop and Map-Reduce. Swati Gore

Apache Hadoop. Alexandru Costan

Using RDBMS, NoSQL or Hadoop?

MS SQL Performance (Tuning) Best Practices:

Performance Evaluation of NoSQL Systems Using YCSB in a resource Austere Environment

Recovery Principles in MySQL Cluster 5.1

How To Scale Out Of A Nosql Database

A Survey of Distributed Database Management Systems

low-level storage structures e.g. partitions underpinning the warehouse logical table structures

ScaleArc for SQL Server

Sharding with postgres_fdw

How To Scale Big Data

Comparing MySQL and Postgres 9.0 Replication

Optimizing Performance. Training Division New Delhi

Study and Comparison of Elastic Cloud Databases : Myth or Reality?

X4-2 Exadata announced (well actually around Jan 1) OEM/Grid control 12c R4 just released

Comparing Microsoft SQL Server 2005 Replication and DataXtend Remote Edition for Mobile and Distributed Applications

NoSQL Databases. Institute of Computer Science Databases and Information Systems (DBIS) DB 2, WS 2014/2015

CLOUD computing offers the vision of a virtually infinite

Chapter 11 Map-Reduce, Hadoop, HDFS, Hbase, MongoDB, Apache HIVE, and Related

HDFS Architecture Guide

Apache HBase. Crazy dances on the elephant back

CitusDB Architecture for Real-Time Big Data

Comparison of the Frontier Distributed Database Caching System with NoSQL Databases

Using distributed technologies to analyze Big Data

In-Memory Databases MemSQL

Integrating VoltDB with Hadoop

Distributed File Systems

these three NoSQL databases because I wanted to see a the two different sides of the CAP

SAP HANA SPS 09 - What s New? SAP HANA Scalability

DISTRIBUTED AND PARALLELL DATABASE

Transcription:

F1: A Distributed SQL Database That Scales Presentation by: Alex Degtiar (adegtiar@cmu.edu) 15-799 10/21/2013

What is F1? Distributed relational database Built to replace sharded MySQL back-end of AdWords system Combines features of NoSQL and SQL Built on top of Spanner

Goals Scalability Availability Consistency Usability

Features Inherited From Spanner Scalable data storage, resharding, and rebalancing Synchronous replication Strong consistency & ordering

New Features Introduced Distributed SQL queries, including joining data from external data sources Transactionally consistent secondary indexes Asynchronous schema changes including database reorganizations Optimistics transactions Automatic change history recording and publishing

Architecture

Architecture - F1 Client Client library Initiates reads/writes/transactions Sends requests to F1 servers

Architecture

Architecture - F1 Server Coordinates query execution Reads and writes data from remote sources Communicates with Spanner servers Can be quickly added/removed

Architecture

Architecture - F1 Slaves Pool of slave worker tasks Processes execute parts of distributed query coordinated by F1 servers Can also be quickly added/removed

Architecture

Architecture - F1 Master Maintains slave membership pool Monitors slave health Distributes list membership list to F1 servers

Architecture

Architecture - Spanner Servers Hold actual data Re-distribute data when servers added Support MapReduce interaction Communicates with CFS

Data Model Relational schema (similar to RDBMS) Tables can be organized into a hierarchy Child table clustered/interleaved within the rows from its parent table Child has foreign key as prefix of p-key

Data Model

Secondary Indexes Transactional & fully consistent Stored as separate tables in Spanner Keyed by index key + index table p-key Two types: Local and Global

Local Secondary Indexes Contain root row p-key as prefix Stored in same spanner directory as root row Adds little additional cost to a transaction

Global Secondary Indexes Does not contain root row p-key as prefix Not co-located with root row Often sharded across many directories and servers Can have large update costs Consistently updated via 2PC

Schema Changes - Challenges F1 massively and widely distributed Each F1 server has schema in memory Queries & transactions must continue on all tables System availability must not be impacted during schema change

Schema Changes Applied asynchronously Issue: concurrent updates from different schemas Solution: Limiting to one active schema change at a time (lease on schema) Subdivide schema changes into phases Each consecutively mutually compatible

Transactions Full transactional consistency Consists of multiple reads, optionally followed by a single write Flexible locking granularity

Transactions - Types Read-only: fixed snapshot timestamp Pessimistic: Use Spanner s lock transactions Optimistic: o o o Read phase (Client collects timestamps) Pass to F1 server for commit Short pessimistic transaction (read + write) Abort if conflicting timestamp Write to commit if no conflicts

Optimistic Transactions: Pros and Cons Pros Tolerates misbehaving clients Support for longer transactions Server-side retryability Server failover Speculative writes Cons Phantom inserts Low throughput under high contention

Change History Supports tracking changes by default Each transaction creates a change record Useful for: Pub-sub for change notifications Caching

Client Design MySQL-based ORM incompatible with F1 New simplified ORM No joins or implicit traversals Object loading is explicit API promotes parallel/async reads Reduces latency variability

Client Design NoSQL interface Batched row retrieval Often simpler than SQL SQL interface Full-fledged Small OLTP, large OLAP, etc Joins to external data sources

Query Processing Centrally executed or distributed Batching/parallelism mitigates latency Many hash re-partitioning steps Stream to later operators ASAP for pipelining Optimized hierarchically clustered tables PB-valued columns: structured data types Spanner s snapshot consistency model provides globally consistent results

Query Processing Example

Query Processing Example Scan of AdClick table Lookup join operator (SI) Repartitioned by hash Distributed hash join Repartitioned by hash Aggregated by group

Distributed Execution Query splits into plan parts => DAG F1 server: query coordinator/root node and aggregator/sorter/filter Efficiently re-partitions the data Can t co-partition Hash partitioning BW: network hardware Operate in memory as much as possible Hierarchical table joins efficient on child table Protocol buffers utilized to provide types

Evaluation - Deployment AdWords: 5 data centers across US Spanner: 5-way Paxos replication Read-only replicas

Evaluation - Performance 5-10ms reads, 50-150ms commits Network latency between DCs Round trip from leader to two nearest replicas 2PC 200ms average latency for interactive application - similar to previous Better tail latencies Throughput optimized for non-interactive apps (parallel/batch) 500 transactions per second

Issues and Future work High commit latency Only AdWords deployment show to work well - no general results Highly resource-intensive (CPU, network) Strong reliance on network hardware Architecture prevents co-partitioning processing and data

Conclusion More powerful alternative to NoSQL Keep conveniences like SI, SQL, transactions, ACID but gain scalability and availability Higher commit latency Good throughput and worst-case latencies

References Information, figures, etc.: J. Shute, et al., F1: A Distributed SQL Database That Scales, VLDB, 2013. High-level summary: http://highscalability.com/blog/2013/10/8/f1-andspanner-holistically-compared.html