HDB++: HIGH AVAILABILITY WITH. l TANGO Meeting l 20 May 2015 l Reynald Bourtembourg

Similar documents
Enabling SOX Compliance on DataStax Enterprise

Introduction to Cassandra

Highly available, scalable and secure data with Cassandra and DataStax Enterprise. GOTO Berlin 27 th February 2014

Practical Cassandra. Vitalii

No-SQL Databases for High Volume Data

Distributed Systems. Tutorial 12 Cassandra

Apache Cassandra for Big Data Applications

Introduction to Apache Cassandra

Apache Cassandra and DataStax. DataStax EMEA

JVM Performance Study Comparing Oracle HotSpot and Azul Zing Using Apache Cassandra

Apache Cassandra 1.2

Going Native With Apache Cassandra. QCon London, 2014

LARGE-SCALE DATA STORAGE APPLICATIONS

Apache Cassandra 1.2 Documentation

CASSANDRA. Arash Akhlaghi, Badrinath Jayakumar, Wa el Belkasim. Instructor: Dr. Rajshekhar Sunderraman. CSC 8711 Project Report

Apache Cassandra 2.0

So What s the Big Deal?

Dell Reference Configuration for DataStax Enterprise powered by Apache Cassandra

CQL for Cassandra 2.2 & later

Best Practices in Deploying and Managing DataStax Enterprise

Facebook: Cassandra. Smruti R. Sarangi. Department of Computer Science Indian Institute of Technology New Delhi, India. Overview Design Evaluation

Big Data Development CASSANDRA NoSQL Training - Workshop. March 13 to am to 5 pm HOTEL DUBAI GRAND DUBAI

MariaDB Cassandra interoperability

Cassandra vs MySQL. SQL vs NoSQL database comparison

Simba Apache Cassandra ODBC Driver

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

DataStax Enterprise Reference Architecture

Overview of Databases On MacOS. Karl Kuehn Automation Engineer RethinkDB

Cassandra. Jonathan Ellis

Open Source Technologies on Microsoft Azure

Evaluation of NoSQL databases for large-scale decentralized microblogging

Going Native With Apache Cassandra. NoSQL Matters, Cologne, 2014

Case study: CASSANDRA

NoSQL: Going Beyond Structured Data and RDBMS

Apache Cassandra Query Language (CQL)

A survey of big data architectures for handling massive data

Benchmarking Couchbase Server for Interactive Applications. By Alexey Diomin and Kirill Grigorchuk

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

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

Welcome to Virtual Developer Day MySQL!

The OpenStack TM Object Storage system

Designing Performance Monitoring Tool for NoSQL Cassandra Distributed Database

Using MySQL for Big Data Advantage Integrate for Insight Sastry Vedantam

BENCHMARKING CLOUD DATABASES CASE STUDY on HBASE, HADOOP and CASSANDRA USING YCSB

MADOCA II Data Logging System Using NoSQL Database for SPring-8

High Throughput Computing on P2P Networks. Carlos Pérez Miguel

Cassandra A Decentralized, Structured Storage System

.NET User Group Bern

NoSQL Database Options

Big Data Analytics with Cassandra, Spark & MLLib

Cassandra A Decentralized Structured Storage System

NoSQL and Hadoop Technologies On Oracle Cloud

Benchmarking Top NoSQL Databases Apache Cassandra, Couchbase, HBase, and MongoDB Originally Published: April 13, 2015 Revised: May 27, 2015

Ankush Cluster Manager - Cassandra Technology User Guide

Introduction to Big Data Training

Analytics March 2015 White paper. Why NoSQL? Your database options in the new non-relational world

HBase A Comprehensive Introduction. James Chin, Zikai Wang Monday, March 14, 2011 CS 227 (Topics in Database Management) CIT 367

Cloudera Enterprise Reference Architecture for Google Cloud Platform Deployments

Real-Time Big Data in practice with Cassandra. Michaël

NOSQL DATABASES AND CASSANDRA

Windows Azure Storage Scaling Cloud Storage Andrew Edwards Microsoft

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

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

An Oracle White Paper June High Performance Connectors for Load and Access of Data from Hadoop to Oracle Database

CQL for Cassandra 2.0 & 2.1

A Brief Outline on Bigdata Hadoop

Oracle BI EE Implementation on Netezza. Prepared by SureShot Strategies, Inc.

Client Overview. Engagement Situation. Key Requirements

How Transactional Analytics is Changing the Future of Business A look at the options, use cases, and anti-patterns

Scaling Database Performance in Azure

Database Scalability and Oracle 12c

Amazon Redshift & Amazon DynamoDB Michael Hanisch, Amazon Web Services Erez Hadas-Sonnenschein, clipkit GmbH Witali Stohler, clipkit GmbH

Hadoop IST 734 SS CHUNG

Comparing the Hadoop Distributed File System (HDFS) with the Cassandra File System (CFS)

ORACLE DATABASE 10G ENTERPRISE EDITION

[Hadoop, Storm and Couchbase: Faster Big Data]

Time series IoT data ingestion into Cassandra using Kaa

Axway API Gateway. Version 7.4.1

Introduction to Multi-Data Center Operations with Apache Cassandra and DataStax Enterprise

MapReduce with Apache Hadoop Analysing Big Data


MakeMyTrip CUSTOMER SUCCESS STORY

THE REALITIES OF NOSQL BACKUPS

References. Introduction to Database Systems CSE 444. Motivation. Basic Features. Outline: Database in the Cloud. Outline

Introduction to Database Systems CSE 444

Introduction to Multi-Data Center Operations with Apache Cassandra, Hadoop, and Solr WHITE PAPER

DBA'S GUIDE TO NOSQL APACHE CASSANDRA

HiBench Introduction. Carson Wang Software & Services Group

Moving From Hadoop to Spark

May 6, DataStax Cassandra South Bay Meetup. Cassandra Modeling. Best Practices and Examples. Jay Patel Architect, Platform

An Approach to Implement Map Reduce with NoSQL Databases

Transcription:

HDB++: HIGH AVAILABILITY WITH Page 1

OVERVIEW What is Cassandra (C*)? Who is using C*? CQL C* architecture Request Coordination Consistency Monitoring tool HDB++ Page 2

OVERVIEW What is Cassandra (C*)? Who is using C*? CQL C* architecture Request Coordination Consistency Monitoring tool HDB++ Page 3

WHAT IS CASSANDRA? Mythology: an excellent Oracle not believed. A massively scalable open source NoSQL (Not Only SQL) database Created by Facebook Open Source since 2008 Apache license, 2.0, compatible with GPLV3 Page 4

WHAT IS CASSANDRA? Peer to peer architecture No Single Point of Failure Replication Continuous Availability Multi Data Centers support 100s to 1000s nodes Java High Write Throughput Read efficiency Page 5

WHAT IS CASSANDRA? Source: http://techblog.netflix.com/2011/11/benchmarking-cassandra-scalability-on.html Page 6

OVERVIEW What is Cassandra (C*)? Who is using C*? CQL C* architecture Request Coordination Consistency Monitoring tool HDB++ Page 7

WHO IS USING CASSANDRA? Page 8

OVERVIEW What is Cassandra (C*)? Who is using C*? CQL C* architecture Request Coordination Consistency Monitoring tool HDB++ Page 9

CASSANDRA QUERY LANGUAGE CQL: Cassandra Query Language Very similar to SQL But restrictions and limitations JOIN requests are forbidden No subqueries String comparisons are limited (when not using SOLR) select * from my_table where mystring like %tango% ; No OR operator Can only apply a WHERE condition on an indexed column (or primary key) Page 10

CASSANDRA QUERY LANGUAGE Collections (64K Limitation): list set map TTL INSERT = UPDATE (UPSERT) Doc: http://www.datastax.com/documentation/cql/3.1/cql/cql_intro_c.html cqlsh Page 11

CASSANDRA QUERY LANGUAGE CREATE TABLE IF NOT EXISTS att_scalar_devdouble_ro ( att_conf_id timeuuid, period text, data_time timestamp, data_time_us int, value_r double, quality int, error_desc text, PRIMARY KEY ((att_conf_id,period),data_time,data_time_us) ) WITH comment='scalar DevDouble ReadOnly Values Table ; Page 12

CASSANDRA QUERY LANGUAGE CREATE TABLE IF NOT EXISTS att_scalar_devdouble_ro ( att_conf_id timeuuid, period text, data_time timestamp, data_time_us int, value_r double, quality int, error_desc text, PRIMARY KEY ((att_conf_id,period),data_time,data_time_us) ); Partition key Clustering columns Page 13

OVERVIEW What is Cassandra (C*)? Who is using C*? CQL C* architecture Request Coordination Consistency Monitoring tool HDB++ Page 14

CASSANDRA ARCHITECTURE Node: one Cassandra instance (Java process) Token Range +2 63-1 -2 63 Node 5 Node 7 Node 6 Node 8 Page 15

CASSANDRA ARCHITECTURE Partition: ordered and replicable unit of data on a node identified by a token Partitioner (based on mumur3 algorithm by default) will distribute the data across the nodes. Token Range +2 63-1 -2 63 Node 5 Node 7 Node 6 Node 8 Page 16

CASSANDRA ARCHITECTURE Rack: logical set of nodes Token Range -2 63 +2 63-1 Rack 1 Rack 3 Node 5 Rack 2 Node 7 Node 6 Rack 4 Node 8 Page 17

CASSANDRA ARCHITECTURE Data Center: logical set of racks Data Center 1 Data Center 2 Token Range +2 63-1 -2 63 Rack 1 Rack 3 Node 5 Rack 2 Node 7 Node 6 Rack 4 Node 7 Page 18

REQUEST COORDINATION Cluster: full set of nodes which maps to a single complete token ring Cassandra Cluster Data Center 1 Data Center 2 Token Range +2 63-1 -2 63 Rack 1 Rack 3 Node 5 Rack 2 Node 7 Node 6 Rack 4 Node 7 Page 19

OVERVIEW What is Cassandra (C*)? Who is using C*? CQL C* architecture Request Coordination Consistency Monitoring tool HDB++ Page 20

REQUEST COORDINATION Coordinator: the node chosen by the client to receive a particular read or write request to its cluster Data Center 1 Client Page 21

REQUEST COORDINATION Coordinator: the node chosen by the client to receive a particular read or write request to its cluster Data Center 1 Coordinator Client Page 22

REQUEST COORDINATION Coordinator: the node chosen by the client to receive a particular read or write request to its cluster Data Center 1 Coordinator Read/Write Client Page 23

REQUEST COORDINATION Any node can coordinate any request Each client request may be coordinated by a different node Data Center 1 Coordinator Acknowledge No Single Point of Failure Client Page 24

REQUEST COORDINATION The Cassandra driver chooses the coordinator node Round-Robin pattern, token-aware pattern Client library to manage requests Many open source drivers for many programming languages Java Python C++ Node.js C# Perl PHP Go Clojure Ruby Scala R (GNU S) Client Driver Coordinator Erlang Haskell ODBC Page 25 Rust

REQUEST COORDINATION The coordinator manages the replication process Replication Factor (RF): onto how many nodes should a write be copied The write will occur on the nodes responsible for that partition 1 RF (#nodes in cluster) Every write is time-stamped RF=3 Coordinator Client Driver Page 26

REQUEST COORDINATION The coordinator manages the replication process Replication Factor (RF): onto how many nodes should a write be copied The write will occur on the nodes responsible for that partition 1 RF (#nodes in cluster) Every write is time-stamped RF=3 Coordinator Client Driver Page 27

OVERVIEW What is Cassandra (C*)? Who is using C*? CQL C* architecture Request Coordination Consistency Monitoring tool HDB++ Page 28

CONSISTENCY The coordinator applies the Consistency Level (CL) Consistency Level (CL): Number of nodes which must acknowledge a request Examples of CL: ONE TWO THREE ANY ALL (Not recommended) QUORUM (= RF/2 + 1) EACH_QUORUM LOCAL_QUORUM CL may vary for each request On success, the coordinator notifies the client (with most recent partition data in case of read request) Page 29

CONSISTENCY ONE - READ - SINGLE DC Coordinator Client Driver Node 6 RF=3 Node 5 Direct Read Request Digest Read Request (Hash) + eventual read repair Page 30

CONSISTENCY ONE - READ - SINGLE DC Coordinator Client Driver Node 6 RF=3 Node 5 Direct Read Request Digest Read Request (Hash) + eventual read repair Page 31

CONSISTENCY ONE READ - SINGLE DC Coordinator Client Driver Node 6 RF=3 Node 5 Direct Read Request Digest Read Request (Hash) + eventual read repair Page 32

CONSISTENCY ONE - READ - SINGLE DC Coordinator Client Driver Node 6 RF=3 Node 5 Direct Read Request Digest Read Request (Hash) + eventual read repair Page 33

CONSISTENCY QUORUM READ - SINGLE DC Coordinator Client Driver Node 6 RF=3 Node 5 Direct Read Request Digest Read Request (Hash) Page 34

CONSISTENCY QUORUM READ - SINGLE DC Coordinator Client Driver Node 6 RF=3 Node 5 Direct Read Request Digest Read Request (Hash) Page 35

CONSISTENCY QUORUM READ - SINGLE DC Coordinator Client Driver Node 6 RF=3 Node 5 Direct Read Request Digest Read Request (Hash) Page 36

CONSISTENCY QUORUM READ - SINGLE DC Coordinator Client Driver Node 6 In case of inconsistency: the most recent data is returned RF=3 Node 5 Direct Read Request Digest Read Request (Hash) Page 37

CONSISTENCY QUORUM READ - SINGLE DC Coordinator Client Driver Node 6 Read repair if needed RF=3 Node 5 Direct Read Request Digest Read Request (Hash) Page 38

CONSISTENCY ONE WRITE - SINGLE DC Coordinator Client Driver Node 6 RF=3 Node 5 Write Request Page 39

CONSISTENCY ONE WRITE - SINGLE DC Coordinator Client Driver Node 6 ACK RF=3 Node 5 ACK Page 40

CONSISTENCY ONE WRITE - SINGLE DC Coordinator Client Driver Node 6 RF=3 Node 5 Write Request Page 41

CONSISTENCY ONE WRITE - SINGLE DC Client Driver SUCCESS Coordinator Node 6 ACK RF=3 Node 5 ACK Page 42

CONSISTENCY ONE WRITE - SINGLE DC Client Driver SUCCESS Coordinator hint max_hint_window_in_ms property in cassandra.yaml file Node 6 ACK RF=3 Node 5 ACK Hinted handoff mechanism Page 43

CONSISTENCY ONE WRITE - SINGLE DC Client Driver Coordinator hint max_hint_window_in_ms property in cassandra.yaml file Node 6 RF=3 Node 5 Write Request Hinted handoff mechanism Page 44

CONSISTENCY ONE WRITE - SINGLE DC Client Driver Coordinator hint max_hint_window_in_ms property in cassandra.yaml file Node 6 RF=3 Node 5 Write Request Hinted handoff mechanism Page 45

CONSISTENCY ONE WRITE - SINGLE DC Coordinator Client Driver Node 6 RF=3 Node 5 Hinted handoff mechanism Page 46

CONSISTENCY if node downtime > max_hint_window_in_ms Anti-entropy node repair Page 47

CONSISTENCY QUORUM WRITE - SINGLE DC Coordinator Client Driver Node 6 RF=3 Node 5 Write Request Page 48

CONSISTENCY QUORUM WRITE - SINGLE DC Coordinator Client Driver Node 6 ACK RF=3 Node 5 ACK Page 49

CONSISTENCY QUORUM WRITE - SINGLE DC Client Driver SUCCESS Coordinator Node 6 ACK RF=3 Node 5 ACK Page 50

CONSISTENCY QUORUM WRITE - SINGLE DC Coordinator Client Driver Node 6 RF=3 Node 5 Write Request Page 51

CONSISTENCY QUORUM WRITE - SINGLE DC Client Driver SUCCESS Coordinator Node 6 ACK RF=3 Node 5 ACK Page 52

CONSISTENCY QUORUM WRITE - SINGLE DC Coordinator Client Driver Node 6 RF=3 Node 5 Write Request Page 53

CONSISTENCY QUORUM WRITE - SINGLE DC Client Driver FAILURE Coordinator Node 6 ACK RF=3 Node 5 ACK Page 54

CONSISTENCY LOCAL QUORUM WRITE - MULTI DC Client Driver Coordinator Node 5 Node 6 RF=2 RF=3 Node 5 DC1 DC2 Write Request Page 55

CONSISTENCY LOCAL QUORUM WRITE - MULTI DC Client Driver SUCCESS Coordinator Node 5 Node 6 ACK RF=3 RF=2 ACK Node 5 DC1 DC2 ACK Page 56

OVERVIEW What is Cassandra (C*)? Who is using C*? CQL C* architecture Request Coordination Consistency Monitoring tool HDB++ Page 57

MONITORING TOOL: OPSCENTER http://cassandra2:8888 Page 58

OVERVIEW What is Cassandra (C*)? Who is using C*? CQL C* architecture Request Coordination Consistency Monitoring tool HDB++ Page 59

HDB++ libhdb++ <<implements>> <<implements>> libhdb++mysql <<use>> libhdb++cassandra <<use>> hdb++cm-srv hdb++es-srv hdb++es-srv hdb++es-srv hdb++es-srv hdb++cm-srv hdb++es-srv hdb++es-srv hdb++es-srv hdb++es-srv MySQL Cassandra Cassandra Cassandra Page 60

CONCLUSION: C* PROS High Availability SW upgrade with no downtime HW failure Linear Scalability Need more performances? => Add nodes Big community with industrial support Page 61

CONCLUSION: C* PROS Can use Apache Spark for analytics (distributed processing) List, Set, Map data types (tuples and user defined types soon) Tries not to let you do actions which do not perform well Backups = snapshot = hard links => very fast (+Replication) Difficult to lose data Good fit for time series data Page 62

CONCLUSION: C* CONS Requires more total disk space and machines sstable (C* data files) format can change from one version to another No easy way to come back to a previous version once the sstables have been converted to a newer version Cannot rename keyspaces or tables easily (not foreseen in CQL) Tedious to modify existing partitions (Needs to duplicate the data at some point in the process) Page 63

CONCLUSION: C* CONS Different way of modeling Not designed for huge read requests Can be tricky to tune to avoid long GC pauses Maintenance: Need to run nodetool repair regularly if some data are deleted to avoid resurrections (CPU intensive operation) Can take quite some time to redeem disk space after deletion in some specific cases. Page 64

THE END

USEFUL LINKS http://cassandra.apache.org Planet Cassandra (http://planetcassandra.org) Datastax academy (https://academy.datastax.com) Cassandra Java Driver getting started (https://academy.datastax.com/demos/cassandra-java-driver-gettingstarted) Cassandra C++ Driver: https://github.com/datastax/cpp-driver Datastax documentation (http://www.datastax.com/docs) Users mailing list: user-subscribe@cassandra.apache.org #Cassandra channel on IRC (http://webchat.freenode.net/?channels=#cassandra) Page 66

CASSANDRA FUTURE DEPLOYMENT DC Prod 1 partition/hour Keyspace prod RF:3 (write LOCAL_QUORUM) 7200 RPM Disks Big CPU - 64GB RAM DC Analytics 1 Keyspace prod RF:3 (read LOCAL_QUORUM) Keyspace analytics RF:3 (write LOCAL_QUORUM) SSD Disks Big CPU 128 GB RAM DC Analytics 2 Keyspace analytics RF:5 (read LOCAL_QUORUM) 7200 RPM Disks Tiny CPU 32 GB RAM Page 67

CASSANDRA FUTURE DEPLOYMENT DC Prod 1 partition/hour Keyspace prod RF:3 (write LOCAL_QUORUM) 7200 RPM Disks Big CPU - 64GB RAM DC Analytics 1 Keyspace prod RF:3 (read LOCAL_QUORUM) Keyspace analytics RF:3 (write LOCAL_QUORUM) SSD Disks Big CPU 128 GB RAM Page 68

CASSANDRA S NODE-BASED ARCHITECTURE Page 69

BASIC WRITE PATH CONCEPT Page 70

BASIC READ PATH CONCEPT Page 71