MySQL Cluster for Real Time, HA Services

Similar documents
Building Highly Available and Scalable Real- Time Services with MySQL Cluster

<Insert Picture Here> MySQL Cluster What are we working on

MySQL Cluster Student Guide

MySQL Cluster Web Scalability, % Availability. Andrew

MySQL & NoSQL: The Best of Both Worlds

Introduction to MySQL Cluster: Architecture and Use

MySQL High Availability

MySQL CLUSTER. Low latency for a real-time user experience. 24 x 7 availability for continuous service uptime

MySQL CLUSTER. Low latency for a real-time user experience; 24 x 7 availability for continuous service uptime;

<Insert Picture Here> MySQL Web Reference Architectures Building Massively Scalable Web Infrastructure

MySQL Cluster Scaling to Billion Database Queries with MySQL Cluster. Bernd Ocklin MySQL Cluster Engineering

MySQL HA Solutions Selecting the best approach to protect access to your data

MySQL High Availability. Michael Messina Senior Managing Consultant, Rolta-AdvizeX /

State of the Dolphin Developing new Apps in MySQL 8

MySQL in the Cloud: Creating a Market-Leading DBaaS

MySQL Cluster Ed 2. Duration: 4 Days

What s New in MySQL 5.7 Geir Høydalsvik, Sr. Director, MySQL Engineering. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

<Insert Picture Here> Value of TimesTen Oracle TimesTen Product Overview

MySQL Cluster (NDB) An Introduc+on and Overview. Ma3hew Boehm April

InnoDB: Status, Architecture, and Latest Enhancements

MySQL Architecture Design Patterns for Performance, Scalability, and Availability

Architecture of a Real-Time Operational DBMS

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into

VOLTDB + HP VERTICA. page

Oracle TimesTen In-Memory Database 18.1

MySQL High Availability Solutions. Alex Poritskiy Percona

Jargons, Concepts, Scope and Systems. Key Value Stores, Document Stores, Extensible Record Stores. Overview of different scalable relational systems

MySQL Replication Update

Everything You Need to Know About MySQL Group Replication

WLS Neue Optionen braucht das Land

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

Copyright 2011, Oracle and/or its affiliates. All rights reserved.

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 8

Aurora, RDS, or On-Prem, Which is right for you

Heckaton. SQL Server's Memory Optimized OLTP Engine

SQL Gone Wild: Taming Bad SQL the Easy Way (or the Hard Way) Sergey Koltakov Product Manager, Database Manageability

IMS Adoption Fueled by the Open IMS Core Project and MySQL

MySQL Group Replication. Bogdan Kecman MySQL Principal Technical Engineer

<Insert Picture Here> QCon: London 2009 Data Grid Design Patterns

What's New in MySQL 5.7?

Pimp My Data Grid. Brian Oliver Senior Principal Solutions Architect <Insert Picture Here>

GridGain and Apache Ignite In-Memory Performance with Durability of Disk

Migrating to MySQL. Ted Wennmark, consultant and cluster specialist. Copyright 2014, Oracle and/or its its affiliates. All All rights reserved.

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Database Level 100. Rohit Rahi November Copyright 2018, Oracle and/or its affiliates. All rights reserved.

Oracle NoSQL Database Enterprise Edition, Version 18.1

CIT 668: System Architecture. Amazon Web Services

Design Patterns for Large- Scale Data Management. Robert Hodges OSCON 2013

Using the SDACK Architecture to Build a Big Data Product. Yu-hsin Yeh (Evans Ye) Apache Big Data NA 2016 Vancouver

WebSphere Application Server, Version 5. What s New?

MongoDB and Mysql: Which one is a better fit for me? Room 204-2:20PM-3:10PM

1 Dulcian, Inc., 2001 All rights reserved. Oracle9i Data Warehouse Review. Agenda

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Oracle MySQL Free vs. commercial

Using the MySQL Document Store

Choosing a MySQL High Availability Solution. Marcos Albe, Percona Inc. Live Webinar June 2017

Application-Tier In-Memory Analytics Best Practices and Use Cases

Various MySQL High Availability (HA) Solutions

MySQL Reference Architectures for Massively Scalable Web Infrastructure

Oracle NoSQL Database at OOW 2017

Welcome to Virtual Developer Day MySQL!

Building a Scalable Architecture for Web Apps - Part I (Lessons Directi)

<Insert Picture Here> Looking at Performance - What s new in MySQL Workbench 6.2

DEMYSTIFYING BIG DATA WITH RIAK USE CASES. Martin Schneider Basho Technologies!

Microsoft Azure BLOB Storage

SAP IQ Software16, Edge Edition. The Affordable High Performance Analytical Database Engine

Oracle NoSQL Database Enterprise Edition, Version 18.1

Mysql Cluster Could Not Acquire Global Schema Lock

Introduction to MySQL InnoDB Cluster

Application Container Cloud

Oracle TimesTen Scaleout: Revolutionizing In-Memory Transaction Processing

Consolidate and Prepare for Cloud Efficiencies Oracle Database 12c Oracle Multitenant Option

MySQL Architecture and Components Guide

Upgrading to MySQL 8.0+: a More Automated Upgrade Experience. Dmitry Lenev, Software Developer Oracle/MySQL, November 2018

HP NonStop Database Solution

Data-and-Compute Intensive Processing: Middle-tier or Database? Trade-Offs and Case Study. Kuassi Mensah Marcelo Ochoa Oracle

Delegates must have a working knowledge of MariaDB or MySQL Database Administration.

Data Management in Application Servers. Dean Jacobs BEA Systems

MQ High Availability and Disaster Recovery Implementation scenarios

InnoDB: What s new in 8.0

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved. reserved. Insert Information Protection Policy Classification from Slide 8

The Right Choice for DR: Data Guard, Stretch Clusters, or Remote Mirroring. Ashish Ray Group Product Manager Oracle Corporation

MySQL Database Administrator Training NIIT, Gurgaon India 31 August-10 September 2015

SQL Server SQL Server 2008 and 2008 R2. SQL Server SQL Server 2014 Currently supporting all versions July 9, 2019 July 9, 2024

PostgreSQL Cluster. Mar.16th, Postgres XC Write Scalable Cluster

MariaDB 10.3 vs MySQL 8.0. Tyler Duzan, Product Manager Percona

NOSQL DATABASE CLOUD SERVICE. Flexible Data Models. Zero Administration. Automatic Scaling.

Developing Microsoft Azure Solutions: Course Agenda

CO MySQL for Database Administrators

New Oracle NoSQL Database APIs that Speed Insertion and Retrieval

What s New for Oracle Database 11gR2 on Windows?

Course Outline. Lesson 2, Azure Portals, describes the two current portals that are available for managing Azure subscriptions and services.

Safe Harbor Statement

Copyright 2018, Oracle and/or its affiliates. All rights reserved.

MySQL Cluster An Introduction

Improvements in MySQL 5.5 and 5.6. Peter Zaitsev Percona Live NYC May 26,2011

Achieving Horizontal Scalability. Alain Houf Sales Engineer

Jitterbit is comprised of two components: Jitterbit Integration Environment

Zero Data Loss Recovery Appliance DOAG Konferenz 2014, Nürnberg

How In-memory Database Technology and IBM soliddb Complement IBM DB2 for Extreme Speed

Transcription:

<Insert Picture Here> MySQL Cluster for Real Time, HA Services Bill Papp (bill.papp@oracle.com) Principal MySQL Sales Consultant Oracle

Agenda Overview of MySQL Cluster Design Goals, Evolution, Workloads, Users Architecture and Core Technology Deep Dive, New Features & Capabilities MySQL Cluster 7.1 MySQL Cluster Manager Resources to Get Started <Insert Picture Here>

MySQL Cluster Goals High Performance: Write Scalability & Low Latency 99.999% Availability Low TCO

MySQL Cluster - Key Advantages High Throughput Reads & Writes Carrier-Grade Availability Distributed, Parallel architecture Transactional, ACID-compliant relational database Shared-nothing design, synchronous data replication Sub-second failover & self-healing recovery Real-Time Responsiveness Data structures optimized for RAM. Real-time extensions Predictable low latency, bounded access times On-Line, Linear Scalability Incrementally scale out, scale up and scale on-line Linearly scale with distribution awareness Low TCO, Open platform GPL & Commercial editions, scale on COTS Flexible APIs: SQL, C++, Java, OpenJPA, LDAP & HTTP

MySQL Cluster Highlights Distributed Hash Table backed by an ACID Relational Model Shared-Nothing Architecture, scale-out on commodity hardware Implemented as a pluggable storage engine for the MySQL Server with additional direct access via embedded APIs. Automatic or user configurable data partitioning across nodes Synchronous data redundancy

MySQL Cluster Highlights (cont.) Sub-second fail-over & self-healing recovery Geographic replication Data stored in main-memory or on disk (configurable percolumn) Logging and check pointing of in-memory data to disk Online operations (i.e. add-nodes, schema updates, maintenance, etc)

MySQL Cluster Users & Applications HA, Transactional Services: Web & Telecoms Telecoms Subscriber Databases (HLR/HSS) Service Delivery Platforms VoIP, IPTV & VoD Mobile Content Delivery On-Line app stores and portals IP Management Payment Gateways Web User profile management Session stores ecommerce On-Line Gaming Application Servers http://www.mysql.com/customers/cluster/

MySQL Cluster Architecture Parallel Database with no SPOF: High Read & Write Performance & 99.999% uptime Clients MySQL Cluster Application Nodes MySQL Cluster Mgmt MySQL Cluster Mgmt MySQL Cluster Data Nodes

Example Configuration mysql client 7. mysqld 8. mysqld 1. ndb_mgmd 2. ndb_mgmd agent agent 192.168.0.10 192.168.0.11 3. ndbd 4. ndbd 5. ndbd 6. ndbd agent agent 192.168.0.12 n. mysqld n. ndb_mgmd n. ndbd agent 192.168.0.13 MySQL Server (ID=n) Management Node (ID=n) Data Node (ID=n) MySQL Cluster Manager agent MySQL Cluster Manager agent runs on each physical host No central process for Cluster Manager agents co-operate, each one responsible for its local nodes Agents are responsible for managing all nodes in the cluster Management responsibilities Starting, stopping & restarting nodes Configuration changes Upgrades Host & Node status reporting Recovering failed nodes

Creating & Starting a Cluster mysql client 1. Define the site: Mysql> create site --hosts=192.168.0.10,192.168.0.11, -> 192.168.0.12,192.168.0.13 mysite; 7. mysqld 8. mysqld 1. ndb_mgmd 2. ndb_mgmd agent agent 192.168.0.10 192.168.0.11 3. ndbd 4. ndbd 5. ndbd 6. ndbd agent agent 192.168.0.12 192.168.0.13 2. Expand the MySQL Cluster tar-ball(s) from mysql.com to known directory 3. Define the package(s): Mysql> add package --basedir=/usr/local/mysql_6_3_26 6.3; Mysql> add package --basedir=/usr/local/mysql_7_0_7 7.0; Note that the basedir should match the directory used in Step 2. 4. Create the Cluster Mysql> create cluster --package=6.3 -> --processhosts=ndb_mgmd@192.168.0.10,ndb_mgmd@192.168.0.11, -> ndbd@192.168.0.12,ndbd@192.168.0.13, ndbd@192.168.0.12, -> ndbd@192.168.0.13,mysqld@192.168.9.10,mysqld@192.168.9.11 -> mycluster; This is where you define what nodes/processes make up the Cluster and where they should run 5. Start the Cluster: Mysql> start cluster mycluster;

Upgrade Cluster mysql client 7. mysqld 8. mysqld 1. ndb_mgmd 2. ndb_mgmd agent agent 192.168.0.10 192.168.0.11 3. ndbd 4. ndbd 5. ndbd 6. ndbd agent agent 192.168.0.12 192.168.0.13 Upgrade from MySQL Cluster 6.3.26 to 7.0.7: mysql> upgrade cluster --package=7.0 mycluster; Automatically upgrades each node and restarts the process in the correct order to avoid any loss of service Without MySQL Cluster Manager, the administrator must stop each process in turn, start the process with the new version and wait for the node to restart before moving onto the next one

Out of the Box Scalability: Data Partitioning Data partitioned across Data Nodes Rows are divided into partitions, based on a hash of all or part of the primary key Each Data Node holds primary fragment for 1 partition Also stores secondary fragment of another partition Records larger than 8KB stored as BLOBs

Shared-Nothing Architecture for High Availability Synchronous Replication within Node Group

Node Failure Detection & Self-Healing Recovery

On-Line Scaling & Maintenance 1. New node group added 2. Data is re-partitioned 3. Redundant data is deleted 4. Distribution is switched to share load with new node group Can also update schema online Upgrade hardware & software with no downtime Perform back-ups on-line

Geographic Replication Cluster 1 MyISAM Synchronous replication Asynchronous replication Cluster 2 MyISAM InnoDB Synchronous replication within a Cluster node group for HA Bi-Direction asynchronous replication to remote Cluster for geographic redundancy Asynchronous replication to non-cluster databases for specialised activities such as report generation Mix and match replication types

High Throughput, Low Latency Transactional Performance DBT2 Benchmark, 4-MySQL Cluster Data Nodes 300000 Transactions Per Minute 250000 200000 MySQL Cluster 7. 0 150000 MySQL Cluster 6. 3 100000 50000 0 1 4 8 12 16 20 24 28 32 36 40 Number of MySQL Server Nodes http://www.mysql.com/why-mysql/benchmarks/mysql-cluster/ MySQL Cluster delivered: 250k TPM, 125k operations per second Average 3ms response time 4.3x higher throughput than previous MySQL Cluster 6.3 release

MySQL Cluster vs MySQL MEMORY: 30x Higher Throughput / 1/3rd the Latency on a single node Table level locking inhibits MEMORY scalability beyond a single client connection Check-pointing & logging enabled, MySQL Cluster still delivers durability 4 socket server, 64GB RAM, running Linux

MySQL Cluster CGE 7.1 Key Enhancements Reducing Cost of Operations Simplified Management & Monitoring: NDBINFO MySQL Cluster Manager (part of CGE only) Faster Restarts Delivering up to 10x higher Java Throughput MySQL Cluster Connector for Java: Native Java API OpenJPA Plug-In

Real-Time Metrics w/ ndbinfo mysql> use ndbinfo mysql> show tables; +-------------------+ Tables_in_ndbinfo +-------------------+ blocks config_params counters logbuffers logspaces memoryusage nodes resources transporters +-------------------+ New database (ndbinfo) which presents real-time metric data in the form of tables Exposes new information together with providing a simpler, more consistent way to access existing data Examples include: Resource usage (memory, buffers) Event counters (such as number of READ operations since last restart) Data node status and connection status

Real-Time Metrics w/ ndbinfo (cont.) Example 1: Check memory usage/availability mysql> select * from memoryusage; +---------+--------------+------+------+ node_id DATA_MEMORY used max +---------+--------------+------+------+ 3 DATA_MEMORY 594 2560 4 DATA_MEMORY 594 2560 3 INDEX_MEMORY 124 2336 4 INDEX_MEMORY 124 2336 +---------+--------------+------+------+ Note that there is a DATA_MEMORY and INDEX_MEMORY row for each data node in the cluster If the Cluster is nearing the configured limit then increase the DataMemory and/or IndexMemory parameters in config.ini and then perform a rolling restart

Real-Time Metrics w/ ndbinfo (cont.) Example 2: Check how many table scans performed on each data node since the last restart mysql> select node_id as 'data node', val as 'Table Scans' from counters where counter_name='table_scans'; +-----------+-------------+ data node Table Scans +-----------+-------------+ 3 3 4 4 +-----------+-------------+ You might check this if your database performance is lower than anticipated If this figure is rising faster than you expected then examine your application to understand why there are so many table scans

MySQL Cluster 7.1: ndbinfo Example 3: Check if approaching the point at which the undo log completely fills up between local checkpoints (which could result in delayed transactions or even a database halt if not addressed): mysql> select node_id as 'data node', total as 'configured undo log buffer size', used as 'used buffer space' from logbuffers where log_type='dd-undo ; +-----------+---------------------------------+-------------------+ data node configured undo log buffer size used buffer space +-----------+---------------------------------+-------------------+ 3 2096128 0 4 2096128 0 +-----------+---------------------------------+-------------------+ If log buffer is almost full then increase size of log buffer

MySQL Cluster Connector for Java New Domain Object Model Persistence API (ClusterJ) : Java API High performance, low latency Feature rich Network JPA interface built upon this new Java layer: Java Persistence API compliant Implemented as an OpenJPA plugin Data Nodes Uses ClusterJ where possible, reverts to JDBC for some operations Higher performance than JDBC More natural for most Java designers Easier Cluster adoption for web applications

ClusterJPA Removes ClusterJ limitations: Persistent classes Relationships Joins in queries Lazy loading Table and index creation from object model Implemented as an OpenJPA plugin Better JPA performance for insert, update, delete

Performance

Beyond 7.1: SPJ Push Down Joins mysqld Data Nodes SPJ A linked operation is formed by the MySQL Server from the SQL query and sent to the data nodes For a linked operation, first part of query can be a scan but should result in primary key lookups for the next part More complex queries could be sent as multiple linked operations Reduces latency and increases throughput for complex joins Qualifies MySQL Cluster for new classes of applications mysqld Data Nodes Also possible directly through NDB API Up to 42x performance gain in PoC! The existence, content and timing of future releases described here is included for information only and may be changed at Oracles discretion.

MySQL Enterprise Monitor 2.3 (pre GA)

MySQL Cluster Manager 1.0 Features Automated Management Cluster-Wide Management Process Management On-Line Operations (Upgrades / Reconfiguration) Monitoring Status Monitoring & Recovery HA Operations Disk Persistence Configuration Consistency HA Agent Operation

MySQL Cluster Manager Current Development Projects 33 31 mysqld Data Node Mgmt Node 34 32 mysqld Mgmt Node Data Node 33 mysqld 31 Data Node mysqld 32 Mgmt Node 34 Data Node 35 mysqld Data Node mysqld 36 Mgmt Node Data Node On-line add-node mysql> add hosts --hosts=192.168.0.35,192.168.0.36 mysite; mysql> add package --basedir=/usr/local/mysql_7_0_7 hosts=192.168.0.35,192.168.0.36 7.0; mysql> add process --processhosts=mysqld@192.168.0.33,mysqld@192.168.0.34,ndbd @192.168.0.35,ndbd@192.168.0.36 mycluster; mysql> start process --added mycluster; Restart optimizations Fewer nodes restarted on some parameter changes

Application: Service Delivery Platform Roaming platform to support 7m roaming subscribers per day FIFA World Cup 2010 Database supports AAA, routing, billing, messaging, signalling, payment processing MySQL Cluster 7.1 delivered 1k TPS on 1TB data with carrier-grade availability Key business benefits Local carriers to monetize new subscribers Users enjoy local pricing with full functionality of their home network Reduced deployment time by 75% MySQL Cluster 7.1 gave us the perfect combination of extreme levels of transaction throughput, low latency & carrier-grade availability. We also reduced TCO by being able to scale out on commodity server blades and eliminate costly shared storage - Phani Naik, Head of Technology at Pyro Group 32

Shopatron: ecommerce Platform Applications Ecommerce back-end, user authentication, order data & fulfilment, payment data & inventory tracking. Supports several thousand queries per second Key business benefits Scale quickly and at low cost to meet demand Self-healing architecture, reducing TCO Why MySQL? Low cost scalability High read and write throughput Extreme availability Since deploying MySQL Cluster as our ecommerce database, we have had continuous uptime with linear scalability enabling us to exceed our most stringent SLAs Sean Collier, CIO & COO, Shopatron Inc 33

Resources to Get Started MySQL Cluster Quick Start Guides http://www.mysql.com/products/database/cluster/get-started.html#quickstart MySQL Cluster 7.1, Architecture and New Features http://www.mysql.com/why-mysql/white-papers/mysql_wp_cluster7_architecture.php MySQL Cluster on the Web http://www.mysql.com/products/database/cluster/

The preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle s products remains at the sole discretion of Oracle.

<Insert Picture Here>