mysql 網路參考架構

57
MySQL 網路參考架構 在網路上創新的最佳實踐 杜修文 [email protected] Principle Sales Consultant Oracle MySQL 全球事業部

Upload: -

Post on 08-Jul-2015

667 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: MySQL 網路參考架構

MySQL 網路參考架構在網路上創新的最佳實踐

杜修文 [email protected] Sales ConsultantOracle MySQL 全球事業部

Page 2: MySQL 網路參考架構

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

免責聲明

以下僅供說明我們的產品的一般性方向。只是為您提供更多的資訊,不可合併到任何合約。不能當成承諾要交付任何產品、代碼或功能,也不能當作在做採購決策時的依據。甲骨文公司對其產品的開發、發行、和任何功能况特性推出的時間保留所有的權利。

Page 3: MySQL 網路參考架構

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

議程

網路創新的需求

參考架構– 規模和架構– 實施技術– 最佳實踐

對硬體的需求

作業面的最佳實踐

資源

Page 4: MySQL 網路參考架構

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

2x DATA GROWTH EVERY 14 MONTHS

6.7BN MOBILE SUBS IN 2012

1.2 BILLION iOS & ANDROID APPS DOWNLOADED PER WEEK

85% HANDSETS SHIPPED WITH A BROWSER

$1TR BY 2014

$700BN IN 2011

2.4BN USERS

$1.7TR GLOBAL CONTRIBUTION

70+ NEW DOMAINS EVERY 60 SECONDS

350m TWEETS PER DAY

875k TPM DURING US PRESIDENTIAL ELECTION

1BN+ USERS

20M APPS PER DAY

72 HOURS UPLOADED EVERY MINUTE

Page 5: MySQL 網路參考架構

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

對基礎架構的需求

靈活,開放和彈性簡化和能重複運用低延遲擴充性和可用性堅不可催的安全性低總成本

Page 6: MySQL 網路參考架構

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

MySQL: 促成網路和雲端運算

Page 7: MySQL 網路參考架構

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

MySQL 網路參考架構

對於網路和行動服創新的最佳實踐– 快速應市– 開放,靈活和高調適性– Reduced Cost, Risk & Complexity 降低成本,

風險和複雜性

運行於本地或雲端

Page 8: MySQL 網路參考架構

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

參架架構 : 設計模式 線上零售業

– 小型,中型和大型 : 資料庫導入和規模– 用戶證和對話管理– 內容管理– 電子商務– 分析和大資料整合

社群網路– 極大型資料庫

建議的硬體 Operational Best Practices 營運的最佳實踐

Page 9: MySQL 網路參考架構

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

參考架構的規模Social Network

Small Medium Large Extra Large

Queries/Second <500 <5,000 10,000+ 25,000+

Transactions/Second <100 <1,000 10,000+ 25,000+

Concurrent Read Users

<100 <5,000 10,000+ 25,000+

Concurrent Write Users

<10 <100 1,000+ 2,500+

Database Size

Sessions <2 GB <10 GB 20+ GB 40+ GB

eCommerce <2 GB <50 GB 50+ GB 200+ GB

Analytics (Multi-Structured Data) <10 GB <1TB 10+ TB 100+ TB

Content Management (Meta-Data) <10 GB <500 GB 1+ TB 2+ TB

Page 10: MySQL 網路參考架構

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

參考架構

Page 11: MySQL 網路參考架構

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

小型 : 網路參考架構Social Network

Small Medium Large Extra Large

Queries/Second <500 <5,000 10,000+ 25,000+

Transactions/Second <100 <1,000 10,000+ 25,000+

Concurrent Read Users

<100 <5,000 10,000+ 25,000+

Concurrent Write Users

<10 <100 1,000+ 2,500+

Database Size

Sessions <2 GB <10 GB 20+ GB 40+ GB

eCommerce <2 GB <50 GB 50+ GB 200+ GB

Analytics (Multi-Structured Data) <10 GB <1TB 10+ TB 100+ TB

Content Management (Meta-Data) <10 GB <500 GB 1+ TB 2+ TB

Page 12: MySQL 網路參考架構

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

小型 : 網路參考架構 單一伺服器支持 :

– 使用使和對話管理– 電子商務– 內容管理

MySQL 複製– 分析和備份

如果流量增加,先將對話管理分到新增的伺服器

擴充力有限建議由中型架構開始

Page 13: MySQL 網路參考架構

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

MySQL 預設的儲存引擎InnoDB

資料完整性 : 完全符合 ACID 的要求 , 失敗回復 , 外鍵 高度併行操作 : 鎖定範圍限於一筆記錄 , MVCC 向上擴充 : 充份利用 48 個線程的機器 , 橫向擴充 : MySQL 複製 彈性 : 線上 DDL, 全文檢索 , SQL 和 NoSQL APIs, 備份和回復緩

存池 工具和監看 : Performance_Schema, MySQL Enterprise Monitor

Page 14: MySQL 網路參考架構

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

MySQL 稽核 API– 使用戶能增加稽核 MySQL 企業稽核提供立即可用的政策稽核

開啟即可用的在全部或指定 MySQL 伺服器的連線,登入,查詢活動日誌 用戶自行定義政策,篩選和日誌輪轉 動態開啟,關閉:不需重開資料庫 以 XML 為主的稽核串流符合 Oracle 的稽核規格 -based audit stream

per Oracle audit specification

使 MySQL 的應用系統能符合法令的要求HIPAA, Sarbanes-Oxley, PCI, 等 .

New!MySQL 企業稽核為 MySQL 的應用系統帶來政策為主的稽核

Page 15: MySQL 網路參考架構

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

2. 用戶 Joe 連上來並使用 Server1

MySQL 企業稽核流

1. DBA 在 Server1 開啟Server1

3. Joe 的連線,查詢日誌

Page 16: MySQL 網路參考架構

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

MySQL 認證 API – 開啟額外的用戶認證- MySQL 企業安控提供立即可用的認證模組

PAM (Pluggable Authentication Modules)- 使用外部認證方法- 標準介面 (Unix, LDAP, Kerberos, 及其他 )- proxied and non-proxied users 有代理用戶和沒有代理用戶 Windows- 使用 Windows 內建的服務- 認證己登入 Windows 的用戶 (Windows Active Directory)

使 MySQL 整合現有的安控架構且符合標準作業程序

MySQL 企業安控外部認證

Page 17: MySQL 網路參考架構

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

InnoDB 的線上 , 高效備份 ( 可編據本的介面 ) 全量,增量,部份備份 (附帶壓縮 ) 指時回復,可選擇全部或部份回復 企業顧問在備份時監看和警示 Metadata on status, progress, history

不限資料庫的大小 跨平台

- Windows, Linux, Unix MEB Backup Files

MEB Backup Files

MySQL Database Files

MySQL Database Files

mysqlbackupmysqlbackup

確保 快速,線上備份和回復 您的本地及在雲端的 MySQL 應用系統

MySQL 企業備份

Page 18: MySQL 網路參考架構

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

中型 : 網路參考架構Social Network

Small Medium Large Extra Large

Queries/Second <500 <5,000 10,000+ 25,000+

Transactions/Second <100 <1,000 10,000+ 25,000+

Concurrent Read Users

<100 <5,000 10,000+ 25,000+

Concurrent Write Users

<10 <100 1,000+ 2,500+

Database Size

Sessions <2 GB <10 GB 20+ GB 40+ GB

eCommerce <2 GB <50 GB 50+ GB 200+ GB

Analytics (Multi-Structured Data) <10 GB <1TB 10+ TB 100+ TB

Content Management (Meta-Data)

<10 GB <500 GB 1+ TB 2+ TB

Page 19: MySQL 網路參考架構

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

中型 : 網路參考架構

Page 20: MySQL 網路參考架構

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

最佳實踐 - 概要中型網路參考架構

伺服器比 : 每個 MySQL 伺服器對應 10 個應用伺服器– PHP 的比 Java 的多– 當應用伺服器增加時增加更多的從服務器

在對話和內容管理元件佈署快取層– Memcached 或 Redis 是最常見的– Reads fulfilled from cache, relieving load on the source database

servers自快取滿足讀,減輕– NoSQL Memcached APIs can enable compression of caching and data

layers

Page 21: MySQL 網路參考架構

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

最佳實踐 – 內容管理中型網路參考架構

各從資料庫可處理約 5,000 個同時的使用主資料庫掛 20 個從資料庫

– 更多的從資料庫要用更大的環境

MySQL 複製支援高可用和擴充 內容資產的定義資訊由 MySQL 管理 分散式檔案系統 / CDN / 雲端平台 (i.e. S3) 支在以

下平台上的資產援實體存儲– 高品質的 SAN ( 以冗餘支援高可用 )

– 分散在平價伺服器節點

XOR

Page 22: MySQL 網路參考架構

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

最佳實踐 – 互動和電子商務中型網路參考架構

互動和電子商務– 互動資料最多在一個特定的區段留一小時 , 輪著使用區段,過期的資料就刪除

透過Memccached 的 NoSQL API 使用 InnoDB 可以用來擴充互動管理的處理能量

– 電子商務的高可用 半同步複製或叢集 (DRBD, 共用存儲 , 等 .)

若網路的流量增加,將互動管理移到 MySQL Cluster 以持久性的互動資料支援即時個人化的用戶經驗

– 99.999% 可用度及存於記憶體的資料管理可減少對 DRBD 和快取的需求

– 資料頡取於分析性資料庫,逐步複製到大資料系統以便分析

Page 23: MySQL 網路參考架構

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

MySQL高可用解決方案

Page 24: MySQL 網路參考架構

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

MySQL 複製自『主』抄資料到『從』

– 冗餘的資料為高可用提供基礎– 以分散查詢到叢集中不同的資料庫達到擴展容量 r

Web / App Servers

Writes & Reads Reads

Page 25: MySQL 網路參考架構

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

高可用和擴充性MySQL 複製

在資訊中心之內和之間橫向擴充 自我療癒和不受失敗影響 支援多種架構

– Master/Slave, Cascading, Circular

預設是非同步,半同步是另一種選項 複製工具以快速推進資料 支持監看和最佳實踐

Relay Log

Page 26: MySQL 網路參考架構

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

• Multi-Threaded Slaves • Binary Log Group Commit • Optimized Row-Based Replication

PERFORMANCE

• Global Transaction Identifiers • Replication Failover & Admin Utilities • Crash Safe Slaves & Binlogs

FAILOVER & RECOVERY

• Replication Event Checksums

DATA INTEGRITY

• Replication Utilities • Time-Delayed Replication • Remote Binlog Backup • Informational Log Events • Server UUIDs

DEV/OPS AGILITY

MySQL 5.6: 進化的複製

Page 27: MySQL 網路參考架構

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

• 較嚴的資料持久性,完整性限制– 共用存儲將資料變化在資料庫開關機間提供持久性– 叢集軟體管理資料的取用– 應用系統及資料自動固障移轉– 和 MySQL 複製一起佈署以從資料庫做橫向擴充

• 認證和支持的解決方案• Oracle VM Template• Windows Failover Clustering• Oracle Solaris Cluster

VIP

Clients

共用硬碟叢集支持高可用

Page 28: MySQL 網路參考架構

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 28Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012

以無共用的叢集支持高可用

DRBD + Clustering– 架在分散的存儲上,非 SAN

– Synchronous replication eliminates risk of data loss 分散式複製,沒有資料

開發源碼 , 成熟且經過考驗經 Oracle認證,且完全支持

– DRBD 整合到 Oracle Linux Unbreakable Enterprise Kernel R2

– 以 Pacemaker 和 Corosync 支持叢集 /固障回復– 透過 ULN channel 更新到系統

Page 29: MySQL 網路參考架構

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

MySQL 預設線程處理 – 絕佳的效能,當用戶數增加時具有一定的擴充力 連線在整個過程中使用一個線程,同一線程接收該連線所有的指令

線程池 API ,使用戶能建立其自有的線程池線程池改進當用戶數增加時耗用效能 / 擴充力的狀況

線程池含數個可配置的線程組,各管理最多達 4096 個可重複使用的線程 線程可設優先順序,使更多的指令、工作負荷排序到有限的線程,使擴充性能進一步改善以因應併行連線數大量的增加

MySQL 企業容量擴增插件MySQL Thread Pool

Page 30: MySQL 網路參考架構

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

MySQL Enterprise Edition With Thread Pool

MySQL Community Server Without Thread Pool

線程池可使擴充性增加 60倍

MySQL 5.6.11 Oracle Linux 6.3, Unbreakable Kernel 2.6.32

4 sockets, 24 cores, 48 ThreadsIntel(R) Xeon® E7540 2GHz CPUs512GB DDR RAM

當開啟線程池時

Page 31: MySQL 網路參考架構

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

大型 : 網路參考架構Social Network

Small Medium Large Extra Large

Queries/Second <500 <5,000 10,000+ 25,000+

Transactions/Second <100 <1,000 10,000+ 25,000+

Concurrent Read Users

<100 <5,000 10,000+ 25,000+

Concurrent Write Users

<10 <100 1,000+ 2,500+

Database Size

Sessions <2 GB <10 GB 20+ GB 40+ GB

eCommerce <2 GB <50 GB 50+ GB 200+ GB

Analytics (Multi-Structured Data) <10 GB <1TB 10+ TB 100+ TB

Content Management (Meta-Data) <10 GB <500 GB 1+ TB 2+ TB

Page 32: MySQL 網路參考架構

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

大型 : 網路參考架構Session Management eCommerce

MySQL Master

Content Management

Slave 1

MySQL MasterAnalytics

MySQL

Enterprise Monitor

Slave 2 Slave 3Slave 4Slave 5

Slave 6 Slave 7 Slave 8Slave 9Slave 10

Slave N

Slave 2

Node Group 2

F2F4

Nod

e 3

Nod

e 4

F2F4

Node Group 1

F1F3

No

de 3

No

de 4

F1F3

MySQL Cluster Data Nodes

MySQL Servers

Node Group 2

F2F4

No

de 3

No

de 4

F2F4

Node Group 1

F1F3

No

de 3

No

de 4

F1F3

MySQL Cluster Data Nodes

MySQL Servers

Slave 1 Slave 3

Data Refine

MySQL

Enterprise Backup

Memcache / Application Servers

Distributed Storage

XOR

Page 33: MySQL 網路參考架構

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

MySQL Cluster: 簡介

•自動拆分 , 多主• 符合 ACID, OLTP + 即時分析

高容量 , 讀 + 寫

•無共用 , 無單點固障•自行療癒 + 線上維護作業

99.999% 的可用率

• 開放源碼 + 商業版本•普通的硬體 + 管理、監看工具

低總擁有成本

• 鍵 /值+複雜、關聯式查詢• SQL + Memcached + JavaScript + Java + JPA + HTTP/REST & C++

SQL + NoSQL

•優化存於記憶體+磁碟為主的資料• 可預測的低延遲,限定取用時間

即時

Page 34: MySQL 網路參考架構

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

MySQL Cluster 架構

MySQL Cluster Data Nodes

Clients

Application Layer

Management

Data Layer

Page 35: MySQL 網路參考架構

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

MySQL 和 Hadoop 在網路的應用

Users

Browsing

RecommendationsProfile,

Purchase History

Web Logs:Pages Viewed

Comments Posted

Social media updatesPreferences

Brands “Liked”

Recommendations

Telephony Stream

Page 36: MySQL 網路參考架構

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

ORGANIZEANALYZE

DECIDE

Applier

MySQL 在 Big Data 的生命週期

ACQUIRE

BI Solutions

Page 37: MySQL 網路參考架構

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

新 : MySQL Applier for Hadoop

即時將 MySQL 事件的資料流傳到Hadoop

 支援朝向事件發生到分析只需一念之間

透過 libhdfs 程式庫取用二元日誌,寫到HDFS

各資料庫的表對映到 Hive 資料倉儲目錄 使 Hadoop 工具生態系統和 MySQL 資料

能整合 參閱 dev.mysql.com 的文章 實驗環境可自以下網址下載

– labs.mysql.com

Page 38: MySQL 網路參考架構

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

比傳統方式快 10倍以上取用InnoDB 或 MySQL Cluster

不需解析 SQL 快速查看和資料注入

仍能確保 ACID 對複雜的查詢仍可以 SQL進行 和線上 DDL結合以支援架構的演進

MySQL 的 NoSQL介面

Page 39: MySQL 網路參考架構

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

超大型 : 社區網參考架構Social Network

Small Medium Large Extra Large

Queries/Second <500 <5,000 10,000+ 25,000+

Transactions/Second <100 <1,000 10,000+ 25,000+

Concurrent Read Users

<100 <5,000 10,000+ 25,000+

Concurrent Write Users

<10 <100 1,000+ 2,500+

Database Size

Sessions <2 GB <10 GB 20+ GB 40+ GB

eCommerce <2 GB <50 GB 50+ GB 200+ GB

Analytics (Multi-Structured Data) <10 GB <1TB 10+ TB 100+ TB

Content Management (Meta-Data) <10 GB <500 GB 1+ TB 2+ TB

Page 40: MySQL 網路參考架構

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

超大型 : 社區網參考架構

Lookup

Authentication

MySQL Master

Analytics

MySQL

Enterprise Monitor

Slave 2

Node Group 2

F2F4

No

de 3

No

de 4

F2F4

Node Group 1

F1F3

No

de 3

No

de 4

F1F3

MySQL Cluster Data Nodes

MySQL Servers

Slave 1 Slave 3

Data Refine

MySQL

Enterprise Backup

Node Group 2

F2F4

No

de 3

No

de 4

F2F4

Node Group 1

F1F3

No

de 3

No

de 4

F1F3

MySQL Cluster Data Nodes

MySQL Servers

App /Memcache

Servers

Central DatabasesCustomers

1% – 33%

Slave 1

Slave 2

Slave N

Customers

34% – 66%

Slave 1

Slave 2

Slave N

Customers

67% – 100%

Slave 1

Slave 2

Slave N

Shards

Page 41: MySQL 網路參考架構

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

最佳做法 社區網參考架構

引進資料庫拆分– Implemented at the application layer for scaling very high volume of writes

– Data divided into smaller sets, distributed across low-cost hardware

– Shards based on Hash of a single column – ie. User ID “Functional” sharding also an option

拆分資料庫只用於小比例的工作負荷– MySQL 的向上擴充,加上主從複製可支持非常大的應用!– 大多數的網路和行動工作負荷仍是讀佔大多數,即記錄在更新前都在讀– MySQL Cluster 支援自動資料庫拆分 + 在拆分資料庫間的 JOINs

Page 42: MySQL 網路參考架構

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

拆分的實施Master

Slave

Clie

nts

Slaves

Shards

Reads

Writes

Partitioning Logic

11 22 33 44 55

Page 43: MySQL 網路參考架構

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

硬體建議

Page 44: MySQL 網路參考架構

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

最多達 64 個 x86-64位元 CPU 線程 (MySQL 5.6 以上的版本 ) 。 建議的 RAM至少要大於“最熱的” ( 最常使用的 ) 資料集。 Linux, Oracle Solaris 或 Microsoft Windows 作業系統。至少 4 個 SSDs 或 HDDs. 8 – 16驅動器可增加 I/O密集應用系統的效能 。

– 硬體 RAID 加上電池支持的快取。– 建議 RAID 10 . RAID 5 在讀很密集時會耗用資源。

兩個網路介面卡和兩個電源供應單元以做冗餘備援。

完美的 MySQL 伺服器

Page 45: MySQL 網路參考架構

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

MySQL Cluster 硬體的選擇 - SQL層

• 4 - 24 x86-64位元的 CPU 線程• 最少 4GB 的 RAM

• 記憶體在這一層並不那麼重要• 由要處理的連線數和緩存的大小決定 .

• 2 兩個網路介面卡和 2 個電源供應單元• Linux, Solaris 或 Windows 作業系統 .

Page 46: MySQL 網路參考架構

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

MySQL Cluster Hardware 的選擇 - Data層

• 最多達 64 個 x86-64位元 CPU 線程• 使用高頻率 : 使訊息的處理更快

•每個資料節點的 RAM 加入叢集 ( 存於記憶體中的資料 ) 資料庫大小 * 複製份數 * 1.25 / 資料節點個數

• 50GB database * 2 replicas * 1.25 / 2 data nodes = 64GB of RAM • 非索引欄位可存於磁碟上,減少對 RAM 的需求

• 2 x NICs 和 2 x PSUs• 在參考架構手冊中對網路的配備有詳細的探討

Page 47: MySQL 網路參考架構

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

入門等級 中等 高階

1 個 SATA 7200 RPM• 大多是讀• 沒有冗餘(但其他資料節點是鏡像的 )

1 個 SAS 10K RPM 或 SSD• 重大的負荷(每秒可能數百萬 Byte)• 無冗餘 (但是其他資料節點是鏡像 )

4 x SAS 10-15K RPM or SSDs• Heavy duty (many MB/s)• Disk redundancy (RAID1+0), hot swap

• REDO, LCP, BACKUP – written sequentually in small chunks (256KB) • If possible, use Odirect = 1

LCPREDOLOG

LCPREDOLOG LCP / REDOLOG

MySQL Cluster 硬體的選擇 :的磁碟子系統

Page 48: MySQL 網路參考架構

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

建議最小的配備 建議高階配備

2 個 SAS 一萬轉或 2 個 SSD

• 建議用高階配備處理讀寫較密集的工作負荷• (每秒 1000 個萬位元組 ) 的資料 ( 即內容派送平台 )

• 將 TABLESPACE 分到不同的磁碟有助讀的效能• Enable 再設備上開啟 WRITE_CACHE

TABLESPACE

LCPREDOLOGUNDOLOG

UNDOLOG

LCP(REDO LOG / UNDO LOG)

TABLESPACE 1

TABLESPACE 2

4 個 SAS 一萬五千轉或 SSD

(REDO LOG)(REDO LOG)

MySQL Cluster 硬體的選擇 :磁碟資料存儲

Page 49: MySQL 網路參考架構

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

營運的最佳做法

Page 50: MySQL 網路參考架構

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

Oracle Premier Lifetime Support

Oracle Product Certifications/Integrations

MySQL Enterprise High Availability

MySQL Enterprise Security

MySQL Enterprise Scalability

MySQL Enterprise Backup

MySQL Enterprise Monitor/Query Analyzer

MySQL Workbench

MySQL 企業版最高階的安控、效能和可用度

MySQL Enterprise Audit

Page 51: MySQL 網路參考架構

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

A Virtual MySQL DBA Assistant!

網頁為主,為 MySQL/Cluster 的應用提供全面的呈現 (現場和雲端佈署 )

自動化,以規則為主的監控和警示 ( 支持 SMTP, SNMP)

查詢截取、監看、分析和調整和監控圖關聯

即時複製監看具有自動回復主從架構

和 Oracle Support 整合

MySQL 企業監控

Page 52: MySQL 網路參考架構

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

Saves time writing, deploying, versioning, maintaining custom scripts. 10 Advisors, 160+ Rules, 60+ MySQL, OS specific Graphs

AdministrationMonitors and Advises on Optimal Start up and Run time Configuration

SecurityMonitors and Advises on Unplanned Security Changes/Loopholes

UpgradeMonitors and Advises on Bugs/Upgrades that affect current installation

ReplicationMonitors and Advises on Master/Slave Latency

Memory UsageMonitors and advises on optimal memory/cache settings

SchemaMonitors and Advises on Unplanned Schema Change

PerformanceMonitors and Advises

on Optimal Performance Variable Settings

Built by DBA to Enforce Organization specific best practices

Custom

MySQL ClusterMonitors and Advises on status/ performance of MySQL Cluster Data Nodes

BackupMonitors and Advises on Backup/Recovery processes

自動建議和警示

Page 53: MySQL 網路參考架構

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

不需 Slow Query Log, SHOW PROCESSLIST集中監看查詢 ;

提供完整的畫面整合查詢執行計數、時間、和筆數

視覺化“抓取列示”和監看圖關聯透過 Connector (PHP, JDBC,

.Net) 或 MySQL Proxy 支持

節省時間 自日誌自動執行解析。找出您無法自行找出的問題。

MySQL查詢分析器

Page 54: MySQL 網路參考架構

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

MySQL Cluster Manager強化開發操作的靈活性,降低下線時間

自行療癒管理自動化 高可用選項

• 開關一個或整個叢集的節點

• 在線擴充容量

• 在線調整架構

• 在線升級

• On-Line Backup & Restore 在線備份和回復

• 節點監看

• 自動回復

• 擴充到 SQL 和管理節點

• 整個叢集的配置的一致性

• 配置的持續性

• 高可用的代理器

Page 55: MySQL 網路參考架構

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

參考架構 - 總結

設計成支持網路創新的跳板

基於大多數成功的網路特性的觀查

擴充性和高可用最佳做法及可重複利用的技術

Page 57: MySQL 網路參考架構

<Insert Picture Here>

MySQL Web Reference ArchitecturesBuilding Massively Scalable Web Infrastructure