• No results found

Solving Large-Scale Database Administration with Tungsten

N/A
N/A
Protected

Academic year: 2021

Share "Solving Large-Scale Database Administration with Tungsten"

Copied!
47
0
0

Loading.... (view fulltext now)

Full text

(1)

Solving Large-Scale Database

Administration with Tungsten

Neil Armitage, Sr. Software Engineer Robert Hodges, CEO

(2)

Introducing Continuent

The leading provider of clustering and replication for open source DBMS

Our Product: Continuent Tungsten

Clustering - Commercial-grade HA, performance scaling and data management for MySQL

Replication - Flexible, high-performance data movement

(3)

Quick Continuent Facts

Largest Tungsten clustering installation

processes about 500M transactions each day

Tungsten Replicator was application of the year at the 2011 MySQL User Conference

Continuent is well known in the MySQL

community for its clustering and replication

(4)
(5)
(6)

MySQL is a Great OLTP Database

But how do I...

Handle DBMS failures?

Perform maintenance and upgrades without taking applications o!ine?

Load balance SQL across replicas?

Create a disaster recovery site?

(7)
(8)

Introducing Tungsten Clustering

Tungsten clusters combine o"-the-shelf open source DBMS servers into data services with:

24x7 data access

Scaling of load on replicas

Simple management commands ...without app changes or data migration

apache /php

GonzoPortal.com

(9)

Doesn’t Replication Do This Already?

Application Libmysqlclient.a Application Libmysqlclient.a Replicator Db2 Replicator Db3 Db1 Replicator

(10)

Replication Limitations

Replication alone cannot enable constant access to data...

What happens if the master fails?

What happens if a slave is lagging too far behind to be usable?

How do I maintain the DBMS without stopping apps?

(11)

From Replicating to Clustering

Application Tungsten Connector Application Tungsten Connector Replicator Db2 Replicator Db3 Db1 Replicator

Slave

Master

Slave

Manager Manager Manager

Monitor

ing and Contr

ol

Monitor

ing and Contr

ol

(12)

Basic Cluster Operations

Switch -- Promote a slave node to master

Shun -- Kick node out of cluster

Welcome -- Return node to cluster

Backup -- Run a backup

Restore -- [Re-]provision a node

Recover -- Return a broken node to slave

(13)

Automatic Failover

Application Tungsten Connector

(14)

Automatic Failover

Application Tungsten Connector 1. Detect non-responsive master

(15)

Automatic Failover

Application Tungsten Connector

3. Select most advanced slave and wait for pending transactions to apply

(16)

Automatic Failover

Application Tungsten Connector

4. Promote to master, reconfigure slave(s), and re-enable connections

(17)

Automatic Failover

Application Tungsten Connector

(18)

Rolling SQL Schema Upgrade

Final Upgrade Switch

Slave Upgrade Slave Upgrade • Shun slave 1, run upgrade, and return to cluster. Discard and recover on failure • Upgrade old master. Cluster schema is now fully upgraded • Repeat for additional slave(s) • Switch master to promote an upgraded slave

(19)

Backup, Recovery, and Restore

Backups

/cluster  >  datasource  DB1  backup

Recover

/cluster  >  datasource  DB2  recover

Restore

/cluster  >  datasource  DB2  restore

Out-of-box support for mysqldump/

(20)
(21)

Tungsten Connector Basics

Any MySQL/PostgreSQL client can connect

Initiates connections using JDBC

App

Native protocol COM_QUERY COM_INIT_DB COM_DROP_DB Connector

(22)

Tungsten Connector Basics

Pass-through operation after connection

Full transparency & low overhead for clients

App

Protocol packet COM_QUERY select * from t Connector Protocol packet

(23)

Simple Read/Write Splitting

Very fast, easy-to-understand scaling model

Transactions go to master

Auto-commit SELECTs go to slaves, if available, but...

Reads potentially outdated data

Ephemeral SQL objects won’t be available

(24)

SmartScale Session Load Balancing

App

Connect/Write Connector Transaction History Log Slave replay position Session x Session y Master DBMS

(25)

SmartScale Session Load Balancing

App

Read Connector Transaction History Log Slave replay position Session x Session y Slave DBMS Master DBMS Slave DBMS

(26)

SmartScale Session Load Balancing

App

Read Connector Transaction History Log Slave replay position Session x Master DBMS

(27)

Tungsten DBMS Array Connectivity

App

Read/Write Connector cluster3 login cluster1 login cluster2 login

(28)

Deployment on App Server Hosts

App Server

+ Connector + ConnectorApp Server App Server

+ Connector + ConnectorApp Server App Server

(29)

Deployment on Dedicated Hosts

App Server App Server

App Server App Server App Server

(30)

Deployment on Dedicated Hosts

App Server App Server

App Server App Server App Server

(31)
(32)

Disaster Recovery Sites

Updates go to primary site master

DR site receives updates in real time

Simple command promotion

Tungsten connectors can route to primary and DR sites

No application changes required

Simplest way to protect against region/site failures

(33)

Tungsten Composite Data Services

App Server

+ Connector + ConnectorApp Server

Master Slave

San Jose New York

(34)

Switching and failover

Planned switch

/sj_nyc  >  switch  to  nyc

Failover

/cluster  >  failover

(35)

Multi-Master Replication

Updates on 2+ sites (active-active mode)

Enables geographic distribution of data

No failover necessary if network fails or site becomes unavailable

Not all applications can handle multi-master

Applications must avoid con#icts

Careful testing required

(36)

Simple Multi-Master Con$guration

NYC Replicator Frankfurt

fra (master) nyc (slave) Replicator

fra (slave) nyc (master)

(37)

Complex Multi-Master Topologies

Star

Replication

All

Masters

(38)

Fan-In Replication

Multiple masters feed into a single slave

Use case: Aggregate data for reporting

Consolidate data from multiple servers into one server

Moving shards

(39)
(40)
(41)

Problem: Real-Time Order Ful$llment

Real-Time Replication

MySQL

Web-Facing Sales Purchase Ordering

Oracle

PHP/ Perl Java/ JBoss 3M Order Items 1-2M transactions daily

(42)

How Does Tungsten Do That?

MySQL Tungsten Master

Replicator

Oracle

Service oracle

MySQLExtractor Special Filters

* Transform enum to string

binlog_format=row

Tungsten Slave Replicator Service oracle

Special Filters

* Ignore extra tables

* Map names to upper case * Optimize updates to remove unchanged columns

MySQL Binlog

(43)

Batch Loading to Data Warehouses

Csv File CsvFile Csv File

. . .

London Replicator Service batch Vertica Data Warehouse Transaction History Log MySQL Master THL

(44)

Possibilities for Analytics...

OLTP Data

MySQL Master

Complex, near real-time reporting Light-weight, real-time operational status Web-facing mini-data marts for

(45)
(46)

How Do I Obtain Tungsten?

Register at Continuent to get downloads for Oracle replication:

http://www.continuent.com/downloads/software

Documentation is available on Continuent website

MySQL replication is available from Tungsten Replicator project on code.google.com

(47)

Continuent Web Page:

http://www.continuent.com

Tungsten Replicator 2.0:

http://code.google.com/p/tungsten-replicator

Our Blogs: http://scale-out-blog.blogspot.com http://datacharmer.org/blog http://www.continuent.com/news/blogs 560 S. Winchester Blvd., Suite 500 San Jose, CA 95128 Tel +1 (866) 998-3642 Fax +1 (408) 668-1009 e-mail: [email protected]

References

Related documents

This increasing diversity calls for both school and classroom leaders to acquire new knowledge and skills to address the needs of all students because, for too long,

 Requests routed to Tomcat instances based purely on load balancing algorithm  HTTP sessions will not work. Adding HTTP

The general result that emerges from this analysis of non-housing inflation is that, because the price of luxuries has risen faster than the price of necessities over the

(1) The proposed model connects the water saturation profile of two-phase flow with the fractal structural param- eters (e.g. relative roughness, tortuosity fractal dimension,

Treatment combination effects due to number of extractions and particle size on resulting DDGS color parameters Hunter L showed increased brightness with increased extractions;

Professional Certified Marketer, a prestigious distinction only top-level marketing professionals earn from the American Marketing Association, February 2011. SCIP

Al Rajhi Capital or its officers or one or more of its affiliates (including research analysts) may have a financial interest in securities of the issuer(s) or related