a13 mysql & nosql~best of both world~ by philip antoniades & ryusuke kajiyama
TRANSCRIPT
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 1
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 2
MySQL & NoSQL MySQL Global Business Unit
Senior Director, MySQL Sales Consulting WW Philip Antoniades
Sales Consulting Manager, JAPAC 梶山 隆輔 / Ryusuke Kajiyama
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 3
以下の事項は、弊社の一般的な製品の方向性に関する概要を説明するものです。また、情報提供を唯一の目的とするものであり、いかなる契約にも組み込むことはできません。以下の事項は、マテリアルやコード、機能を提供することをコミットメント(確約)するものではないため、購買決定を行う際の判断材料になさらないで下さい。オラクル製品に関して記載されている機能の開発、リリースおよび時期については、弊社の裁量により決定されます。
Oracleは、米国オラクル・コーポレーション及びその子会社、関連会社の米国及びその他の国における登録商標または商標です。他社名又は製品名は、それぞれ各社の商標である場合があります。
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 4
The world's most popular open source database 世界でもっとも普及しているオープンソース データベース
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 5
DELIVERING MORE BETTER PRODUCTS FASTER ORACLE DRIVES
MySQL INNOVATION
DELIVERING MORE BETTER PRODUCTS FASTER
MAKING MySQL BETTER EVERY DAY
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 6
PRODUCT PORTFOLIO
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 6
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 7 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 7
COMPONENTS
50 Product Categories
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 8 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 8
Web, Mobile, Embedded On Premise & in the Cloud
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 9
Oracle Database & MySQL
より多くのお客様の要件にお応えするために MySQLはWebにおけるデファクトスタンダード MySQLとOracleの両方を運用されるお客様にもより多くのメリット
Complementary 「補完関係」
Web and Cloud computing is not a ‘one size fits all’ model
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 10
MySQL Enterprise Monitor 2.2 MySQL Cluster 7.1 MySQL Cluster Manager 1.0 MySQL Workbench 5.2 MySQL Database 5.5 MySQL Enterprise Backup 3.5 MySQL Enterprise Monitor 2.3 MySQL Cluster Manager 1.1
DRIVING MySQL INNOVATION
All GA!
MySQL Enterprise Backup 3.7 Oracle VM Template for MySQL Enterprise Edition MySQL Enterprise Oracle Certifications MySQL Windows Installer MySQL Enterprise Security MySQL Enterprise Scalability
MySQL Database 5.6 DMR* MySQL Cluster 7.2 DMR
MySQL Labs! (“early and often”)
All GA!
MySQL Cluster 7.2 MySQL Cluster Manager 1.4 MySQL Utilities 1.0.6 MySQL Migration Wizard MySQL Enterprise Backup 3.8 MySQL Enterprise Audit MySQL Cluster 7.3 DMR MySQL Database 5.6 RC
A BETTER MySQL
*Development Milestone Release
2010 2011 2012
All GA!
Available Now!
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 11
MySQL 5.6 GA
オプティマイザ: パフォーマンス&スケーラビリティ
パフォーマンス・スキーマ: より詳細な統計情報
InnoDB: トランザクション・スループットの向上
レプリケーション: さらなる可用性とデータの整合性
「NotOnlySQL」オプション: さらなる柔軟性
ダウンロードはこちらから! dev.mysql.com/downloads/mysql/
New!
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 12
MySQL: Powering the Web & the Cloud
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 13
Aadhaar - インド版国民総背番号制度
国民全員のID番号と生体認証情報を管理 トランザクショナルな処理は全て商用版MySQLを利用 統計分析や不正検出にはHadoopを利用 2013年1月現在で約2億6,000万ID発行済み 将来的には1日3,000億件のID照合、約25PB
アーキテクトによるプレゼンテーション: http://goo.gl/AXmQs OSS導入の経緯を紹介したニュース記事: http://goo.gl/AmEO9
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 14
MySQL Enterprise Edition 最高レベルのスケーラビリティ、セキュリティおよび稼働時間
Oracle Premier Support
MySQL Enterprise Oracle Certifications/Integrations
MySQL Enterprise High Availability
MySQL Enterprise Security
MySQL Enterprise Scalability
MySQL Enterprise Backup
MySQL Enterprise Monitor/Query Analyzer
MySQL Workbench
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 15
MySQL 5.6 GA
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 16
MySQL 5.6 GA
オプティマイザ: パフォーマンス&スケーラビリティ
パフォーマンス・スキーマ: より詳細な統計情報
InnoDB: トランザクション・スループットの向上
レプリケーション: さらなる可用性とデータの整合性
「NotOnlySQL」オプション: さらなる柔軟性
ダウンロードはこちらから! dev.mysql.com/downloads/mysql/
New!
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 17
MySQLサーバ開発の優先課題
Web、クラウドインフラ、組み込みでの利用への最適化 プラグインによるアーキテクチャの簡素化
– メンテナンス効率および拡張性の向上 – さらなるNoSQLオプションの追加 (HTTP, JSON, JavaScript など)
リファクタリング – InnoDBのデータディクショナリ – オプティマイザ/パーサー/プロトコル
InnoDB – 主要な使い方の改良(参照専用、高速なリカバリ)、GIS – 全文検索の日本語対応 (中国語、韓国語も)
高可用性構成の簡素化、レプリケーション強化、シャーディング
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 18
WEB
ENTERPRISE
EMBEDDED
CLOUD
業界のトップ企業を支えるMySQL
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 19
コミュニティ版 MySQL Community Server MySQL Cluster (Community Edition) MySQL GUI管理ツール MySQLコネクタ (JDBC, ODBC, etc)
ドキュメント フォーラム
MySQLのコミュニティ版と商用版
商用版 Standard Edition Enterprise Edition MySQL Cluster Carrier Grade Edition
商用ライセンス (組み込み用) トレーニング プロフェッショナルサービス
技術サポートや管理機能、拡張機能を有償の商用版として提供
コミュニティ版ソフトウェアはGPLでソースコードも提供
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 20
MySQL Enterprise Edition MySQL Database • 高信頼性、高性能
• 運用の容易性
MySQL Enterprise Backup • 高速オンラインホットバックアップ • ポイントインタイムリカバリ
MySQL Enterprise Monitor • 全MySQLサーバの一括監視 • MySQL Query Analyzer
MySQL Workbench • データベース設計 & アプリ開発 • 管理ツール MySQL Administration
MySQL Enterprise Security • External Authentication 外部認証 • Audit Plugin 柔軟な監査ログ出力
MySQL Enterprise Scalability • Thread Pooling • 持続可能な高性能
Oracle Premier Support • 24x7, 無制限インシデント • コンサルテイティブサポート
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 21
MySQLの高可用性ソリューション MySQL 5.6
レプリケーション Oracle VM Template
Solaris Cluster
Windows Cluster DRBD MySQL
Cluster
自動フェールオーバー ✔ ✔ ✔ ✔ ✔ ✔
データロス無し Semi-Sync ✔ ✔ ✔ ✔ ✔
サポートOS All Linux Solaris Windows Linux All
クラスタモード Master + Slaves
Active/ Passive
Active/ Passive
Active/ Passive
Active/ Passive
Multi-Master
共有ディスク 不要 必要 必要 必要 不要 不要
可用性デザイン 99.9% 99.99% 99.99% 99.95% 99.99% 99.999%
単一ベンダサポート ✔ ✔ ✔ ✖ ✔ ✔
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 22
MySQL サポートの特徴
パフォーマンスチューニング
SQL&アプリケーションレビュー
物理サーバー単位課金
ソースコードレベルからのサポート
オラクルのライフタイムサポート
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 23
MySQL Enterprise Edition & Cluster CGEの評価
Oracle Software Delivery Cloud http://edelivery.oracle.com/
製品パックを選択: “MySQL Database”
30日間トライアル
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 24
RDBMSとNoSQLの役割?
NoSQL
シンプルなアクセス・パターン
パフォーマンスのために 一貫性を犠牲に
特別なデータ形式
シンプルな操作
RDBMS
結合を含む複雑なクエリー
ACID トランザクション
定義されたスキーマ
豊富なツール
あらゆる要件を満たす単一の ソリューションはない
組み合わせて最適化する スケーラビリティ
パフォーマンス
高可用性
使いやすさ
SQL/結合
ACID トランザクション
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 25
MySQL 5.6 InnoDB NoSQL API
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 26
MySQL 5.6: InnoDB
InnoDBに素早く、簡単にアクセス - Memcached API経由のアクセス - 既存のMemcachedクライアントを使用 - SQL変換をバイパス
NotOnlySQLアクセス – キー・バリュー操作用 – 複雑なクエリやJOIN、FKには
SQLを使用 実装
– mysqldにMemcachedをデーモン・プラグインとして統合
– ネイティブInnoDB APIをmemcachedプロトコルにマッピング
– 超低レイテンシ用の共有プロセス・スペース
RDBMSとNoSQLの両立
InnoDB Storage Engine
MySQL Server Memcached plugin
Application SQL
(MySQL Client) NoSQL (Memcached Protocol)
mysqld
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 27
NoSQL APIによる性能
0
10000
20000
30000
40000
50000
60000
70000
80000
8 32 128 512
TPS
Client Connections
MySQL 5.6: NoSQL Benchmarking
Memcached API
SQL
Customized Java-based App Test Harness Oracle Linux 6 Intel(R) Xeon(R) 2.0 x86_64 MySQL leveraging: - 8 available CPU threads - 2 GHz, 16GB RAM
Up to 9x Higher “SET / INSERT” Throughput blogs.oracle.com/mysqlinnodb/entry/new_enhancements_for_innodb_memcached
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 28
InnoDB as a NoSQL Database
A NoSQL product such as Memcached directly accesses InnoDB Simple commands, much smaller network transmit packages Persistent storage from InnoDB Index on the key column Full ACID compliance Bypass Optimizer and QP layer of MySQL Dual access of data (SQL and Memcached) Enabling binlog with innodb_api_enable_binlog Configuration Parameters
– daemon_memcached_r_batch_size – daemon_memcached_w_batch_size
InnoDB + Memcached
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 29
InnoDB memcached Plugin
Supported Platform – Linux, Solaris, and Mac OS X
Software Prerequisites – You must have libevent installed, since it is required by memcached
Setting Up Required Tables – run the configuration script scripts/innodb_memcached_config.sql
to install the necessary tables Installing the Daemon Plugin
mysql> install plugin daemon_memcached soname "libmemcached.so”;
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 30
InnoDB memcached Plugin
Configuration tables created by install script mysql> use innodb_memcache; Database changed mysql> show tables; +---------------------------+ | Tables_in_innodb_memcache | +---------------------------+ | cache_policies | | config_options | | containers | +---------------------------+ 3 rows in set (0.01 sec)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 31
InnoDB memcached Plugin
The mapping is done through specifying corresponding column values in containers table: mysql> desc containers; +------------------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +------------------------+--------------+------+-----+---------+-------+ | name | varchar(50) | NO | PRI | NULL | | | db_schema | varchar(250) | NO | | NULL | | | db_table | varchar(250) | NO | | NULL | | | key_columns | varchar(250) | NO | | NULL | | | value_columns | varchar(250) | YES | | NULL | | | flags | varchar(250) | NO | | 0 | | | cas_column | varchar(250) | YES | | NULL | | | expire_time_column | varchar(250) | YES | | NULL | | | unique_idx_name_on_key | varchar(250) | NO | | NULL | | +------------------------+--------------+------+-----+---------+-------+ 9 rows in set (0.02 sec)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 32
InnoDB memcached Plugin
Mapping to table can be added via SQL
To switch to table ”db1/tbl1", and get the value corresponding to “key_a” in "get @@new_mapping_name.key” format; prefix "@@" is required for signaling a mapped table change
The default delimiter that separates the "mapping name" and key value is ".”, which can be changed option in the "config_options" system table with name of "table_map_delimiter"
INSERT INTO containers VALUES ("setup_3", ”db1", ”tbl1", "c1", "c2", "c3", "c4", "c5", "idx");
get @@setup_3.key_a (OR simply, get @@setup_3)
INSERT INTO config_options VALUES("table_map_delimiter", “|");
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 33
MySQL Cluster NoSQL API
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 34
MySQL Cluster Active-Active型データベースクラスタ&トランザクション対応キーバリューストア
スケーラビリティ
パフォーマンス
高可用性 "
使いやすさ
SQL/結合 "
ACID トランザクション "
データ・ノード
ノード・グループ 1
F1
F3
F3
F1
ノー
ド 1
ノ
ード
2
ノード・グループ 2
F2
F4
F4
F2
ノー
ド 3
ノ
ード
4
アプリケーション・ノード
管理 ノード
管理 ノード
REST JPA
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 35
NoSQL C++ API, flexaSynch benchmark
30 x Intel E5-2600 Intel Servers, 2 socket, 64GB
ACID Transactions, with Synchronous Replication
0
5
10
15
20
25
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
Mill
ions
of U
PDAT
Es p
er S
econ
d
MySQL Cluster Data Nodes
1.2 Billion UPDATEs per Minute
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 36
Cluster 1
Synchronous replication
Cluster 2
InnoDB InnoDB InnoDB
Asynchronous replication
レプリケーションの柔軟性
Cluster ノードグループ間の同期 レプリケーションによる高可用性
遠隔地Clusterへの双方向非同期レプリケーションによる地理的冗長性
非Clusterデータベースへの非同期レプリケーション 例:レポート作成
要件に応じた最適なレプリケーション メソッド
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 37
MULTI-REGION AVAILABILITY
DR and Global Scale Replicate complete clusters
across regions – Fully active/active – No passive resources
Split individual clusters across availability zones
– Synchronous replication & auto-failover between sites
Geographic Replication
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 38
監視 & リカバリ
無停止 メンテナンス
管理作業 の自動化
低コストでより柔軟性をもった 高可用性データベース環境を構築&管理可能に
MySQL Cluster Manager
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 39
計画的メンテナンスへの対応 オンライン作業
クラスタのスケール (オンラインでノードの追加と削除)
テーブルの再パーティショニング サーバーおよびOSのアップグレード / パッチ適用 MySQL Clusterのアップグレード / パッチ適用 バックアップ スキーマをオンラインでリアルタイムに展開
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 40
スケーラビリティ "
パフォーマンス "
高可用性 "
使いやすさ "
SQL/結合 "
ACID トランザクション "
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 41
MySQL Cluster データへの NoSQL アクセス
Mix & Match! SQL および NoSQL インターフェースより同じデータへ同時に
アクセス
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 42
スキーマフリー・アプリケーション
アプリケーションの迅速な変更 – 新しいタイプのデータを
継続的に追加 – スキーマ拡張の時間が無い – スキーマ拡張の技術が無い – 初期段階は少数ユーザに公開 – 本番システムで継続的に追加
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 43
Cluster & Memcached – 設定済みスキーマ
<town:maidenhead,SL6>
prefix key value
<town:maidenhead,SL6>
key value
Prefix Table Key-col Val-col policy
town: addrs town code cluster
Container Table
town ... code ...
maidenhead ... SL6 ...
addrs Table
Application view
SQL view
http://clusterdb.com/u/memcached
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 44
API の柔軟性: SQL と NoSQL の組み合わせ
最適な 組み合わせ
データノード
NDB API
クライアント
Native memcached HTTP/REST
JDBC / ODBC PHP / PERL
Python / Ruby
• SQL: 複雑なリレーショナル・クエリ • HTTP / memcached: キー・バリュー型Webサービス • Java: エンタープライズ・アプリケーション • NDB API: リアルタイム・サービス
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 45
MySQL Cluster 7.3: Node.js NoSQL API
JavaScriptから MySQL Cluster に直接アクセス – JavaScript のオブジェクトとして
MySQL Cluster のデータを読み書き – SQL への変換不要
node.jsのモジュールとして実装 – MySQLCluster APIライブラリと
Webアプリケーションを統合
高性能&分散型のアプリケーションと 高性能&分散型のデータベースを統合
Early Access Feature
V8 JavaScript Engine
MySQL Cluster Node.js Module
MySQL Cluster Data Nodes
Clients
New!
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 46
MySQL & Hadoop
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 47
BI Solutions
ACQUIRE
ORGANIZE ANALYZE
DECIDE
Applier
MySQL in the Big Data Lifecycle
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 48
*Leading Hadoop Vendor
Download the MySQL Guide to Big Data: http://www.mysql.com/why-mysql/white-papers/mysql-and-hadoop-guide-to-big-data-integration/
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 49
MySQL Applier for Hadoop MySQLからHadoopへのリアルタイムストリーミング
バイナリログの内容をlibhdfsライブラリ経由でHDFSに書き込み
リアルタイムでのデータ分析を実現
Hadoop用各種ツールとMySQLデータの統合
http://labs.mysql.com/
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 50
Mapping Between MySQL and HDFS Schema
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 51
お知らせ
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 52
MySQLヘルスチェックプログラム
MySQLセールスコンサルタントが訪問し、Enterprise Monitorなどの導入&利用方法をデモ
開発環境やテスト環境などに実際に導入してMySQLやアプリケーションの稼働状況をチェック
詳しくは下記までお問い合わせください[email protected][Oracle Direct] 0120-155-096 ※音声案内に従って2番を選択してください。
参加企業募集中!
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 53
5.6 MySQL Server – GA InnoDBの改良やオプティマイザの刷新による性能&拡張性向上 レプリケーションの可用性向上 & NoSQLインタフェース追加
MySQL Cluster - GA JOIN性能の大幅な向上 ディザスタリカバリの信頼性の向上
MySQL Cluster - DMR MySQL 5.6統合、外部キーサポート Node.jp APIの追加、運用性能向上
7.2
7.3
5.7 MySQL Server – DMR リファクタリング & 各機能のプラグイン化 さらなるNoSQLインタフェース追加
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 54
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 55