Más contenido relacionado La actualidad más candente (20) Similar a MySQL HA Solutions (20) MySQL HA Solutions1. Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
3. Safe Harbor Statement
The following 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
decision. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole
discretion of Oracle.
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
4. Program § Causes, Effects and Impacts of Downtime
Agenda § Methodology to Select Right HA Solution
§ Guided Tour of MySQL HA Solutions
§ Operational Best Practices
5. 2.1BN USERS
8X DATA GROWTH IN 5 YRS 955M USERS
40% DATA GROWTH 70+ NEW DOMAINS EVERY 60 SECONDS 20M APPS PER DAY
PER YEAR
60 HOURS
UPLOADED EVERY
MINUTE
$1TR BY 2014
350m TWEETS PER
DAY $700BN IN 2011
5.9BN MOBILE SUBS IN 2011
1 BILLION iOS & ANDROID APPS 85% HANDSETS SHIPPED
DOWNLOADED PER WEEK WITH A BROWSER
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
6. Driving new Database Demands
ELASTIC SCALABILITY REAL TIME USER EXPERIENCE
ROCK SOLID RELIABILITY RAPID SERVICE INNOVATION
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
7. Industry Leaders Rely on MySQL
Web & Enterprise OEM & ISVs
Cloud
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
8. The Lowdown on Downtime….
Failures Disasters Maintenance Operator / User
CAUSE
EFFECT
IMPACT
Revenue Customer Sat Employee Regulatory
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. September 29th, 2012
9. HA Considerations
• SLA requirements to support business objectives
• Operational capabilities
• Service agility & time to market
• Budgetary constraints
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. September 29th, 2012
10. Not Everything Needs 99.999% Uptime
• Recovery Time Objective
– Maximum length of downtime before there is break in “business continuity”
• Recovery Point Objective
– Point in time to which data must be recovered when service is re-established
• Tier 1, Mission-critical services
• Tier 2, Business-critical services
• Tier 3, Task-critical services
• Tier 4, Non-critical services
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. September 29th, 2012
11. Mapping Uptime to Availability
Shared-Nothing,
Geo-Replicated
Cost & Complexity
Clusters
Clustered &
Virtualized Systems
Replicated Systems
SPs & Web & eCommerce
Line of Cloud Telecoms
Business Services Military
#" #" . #" #" #" !"
35 days 4 days 8 hours 50 mins 5 mins
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. September 29th, 2012
12. MySQL HA
Operational Complexity
Solutions
Replication
SPs & Web & eCommerce
Line of Cloud Telecoms
Business Services Military
#" #" . #" #" #" !"
35 days 4 days 8 hours 50 mins 5 mins
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. September 29th, 2012
13. Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
14. Why Replicate?
• Duplicates database from a “master” to a “slave”
– Redundant copies of the data provide foundation for High Availability
– Scale out by distributing queries across the replication cluster
Web / App Servers
Writes & Reads Reads
Master
Slaves
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. September 29th, 2012
15. Replication Workflow
Binary Relay
Log Log
Session Dump I/O SQL
Master Slave
Database Database
• Session thread: processes queries from
the application – writes data to master • I/O thread: receives replication events and
database & associated events to binary stores them in slave’s relay log
log • SQL thread: reads replication events from
• Dump thread: reads events from binary log slave’s relay log and applies them to slave
database
and sends them to a slave
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
16. Current Generation of MySQL Replication
Pros Cons
§ Simple to configure § Asynchronous: risk of of data loss
§ Heterogeneous § Semi-Synchronous is configurable
§ Low TCO – no shared storage § No automated failover or
§ Configure over LAN and WAN switchover
§ Fast failover § Performance overhead to master
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
17. MySQL 5.6: Evolving Replication
PERFORMANCE
• Multi-Threaded Slaves
• Binary Log Group Commit
• Optimized Row-Based Replication
FAILOVER & RECOVERY
• Global Transaction Identifiers
• Replication Failover & Admin Utilities
• Crash Safe Slaves & Binlogs
DATA INTEGRITY
• Replication Event Checksums
DEV/OPS AGILITY
• Replication Utilities
• Time-Delayed Replication
• Remote Binlog Backup
• Informational Log Events
• Server UUIDs
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. September 29th, 2012
18. Global Transaction Identifiers
• Simple to track & compare replication across the cluster
– Unique identifier for each transaction written to the Binlog
• Automatically identify the most up-to-date slave for failover
• Deploy n-tier replication hierarchies
Master
GTID=123456
GTID=123456
GTID=123456 GTID=123456
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
19. Replication HA Utilities
• Enabling self-healing replication topologies
• Automated failover & recovery
– mysqlfailover Utility
Failed
Master • Switchover & administration
– mysqlrpladmin Utility
Promoted Monitoring HA Utilities
Master
• Delivers HA within the core MySQL
distribution
Slaves
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
20. Evaluate MySQL 5.6RC TODAY
dev.mysql.com/downloads/mysql
Select Development Release tab
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
21. Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
22. Clustering Overview
• Tightly coupled clusters of servers/storage providing service to an
application
– Use heartbeating and management software to monitor hardware, OS,
database and network
– Node failures detected and failover automatically initiated to redundant
systems
– Implements Virtual IP (VIP) so failover is transparent to the application
• Couple with Virtualization for higher agility
– Migrate between servers with load balancing
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. September 29th, 2012
23. Oracle Certified Solutions
Oracle
VM
Solaris
Windows
DRBD
Template
Cluster Cluster
Auto-‐Failover
&
Migra1on
✔
✔
✔
✔
Zero
Data
Loss
✔
✔
✔
✔
Ac1ve
/
Passive
✔
✔
✔
✔
Pla:orm
Support
Linux
Solaris
Windows
Linux
Shared
Storage
✔
✔
✔
✖
Single
Vendor
Support
✔
✔
✖
✔
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. September 29th, 2012
24. Oracle VM Template for MySQL
Integrated & Tested OS, VM and Database Stack
Oracle VM Oracle VM
• Oracle Linux Automatic Fault
Detection &
Recovery
• Oracle VM
Secure Live
• Oracle VM Manager Migration (SSL)
• Oracle Cluster File System 2 (OCFS2) Oracle VM Server Pool
Oracle VM
• MySQL Database 5.5 (Enterprise Edition) Manager
Pre-Installed & Pre-Configured Oracle
VM
Servers
Full Integration & QA Testing ocfs2
Single Point of Support iSCSI / FC-AL
hEp://mysql.com/why-‐mysql/white-‐papers/mysql_wp_oracle-‐vm-‐template-‐for-‐mee.php
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
25. Oracle VM Template for MySQL
Protecting Against Planned and Unplanned Downtime
VM VM VM VM VM
X
VM VM VM
Planned VM Server Pool Browser VM Server Pool Failures
SSL Migration HA Auto Restart • Server, VM or
Events: database failure
• Maintenance or
Oracle VM Servers
m Oracle VM Manager m
X
Oracle VM Servers • HA Auto-restart in
upgrades pool
• Secure Live Migration • Automatic failure
• Zero interruption SAN, iSCSI SAN, iSCSI detection & recovery
Pool Masters assure Secure
Migration or HA restarts
complete in the event of a
Manager outage
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
26. Oracle Linux and DRBD Stack
• Based on distributed storage, not a SAN
– Synchronous replication eliminates risk of data
loss
• Open source, mature & proven
• Certified and fully supported by Oracle
– DRBD integrated into Oracle Linux Unbreakable
Enterprise Kernel R2
– Pacemaker and Corosync for clustering / failover
– Updates to stack via ULN channel
• Whitepaper:
– http://www.mysql.com/why-mysql/white-papers/
mysql_wp_drbd.php
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
27. Windows Server Failover Clustering
• Native Windows HA clustering with MySQL
• Failures & Planned Maintenance Slave App App App
• Quorum (3rd vote), data (InnoDB + schema) & binaries
(optional) stored in shared storage (iSCSI & FCAL)
• Loss of service = couple of seconds + InnoDB recovery time
– App sees temporary loss of connection and reconnects on same Virtual IP
IP address
– Replication slave recovers automatically
• Cluster managed through MS Failover Cluster Management
snap-in GUI
• No new software/scripts required
Vote Data Bin
Download the Guide: http://bit.ly/w3rSoP
** Technical support for Windows Server Failover Clustering must be sourced from Microsoft.
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
28. Oracle Solaris Clustering
!
• Kernel based heartbeating and monitoring
• SPARC and x86. Solaris Virtualization-aware
• MySQL agent included with Oracle Solaris Cluster
• Learn more: http://www.oracle.com/technetwork/server-storage/solaris-cluster/overview/index.html
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. September 29th, 2012
29. 3rd Party HA Solutions
• Oracle supports MySQL on open source and commercial
HA technologies
– Support for HA mechanisms from respective communities or
vendors
• Symantec Veritas Cluster
• Red Hat Cluster Suite
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. September 29th, 2012
30. Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
31. Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
32. Who’s Using MySQL Cluster?
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. September 29th, 2012
33. MySQL Cluster Architecture:
High Performance
Clients
Applica1on
Layer
Data Layer
Management
Management
MySQL Cluster Data Nodes
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
34. MySQL Cluster Architecture:
Extreme Resilience
Clients
Applica1on
Layer
Data Layer
Management
Management
MySQL Cluster Data Nodes
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
35. Multi-Data Availability
Geographic Replication
• DR and Data Locality
• Replicate complete clusters
across data centers
– Fully active/active
– No passive resources
Geographic
Replication • Split individual clusters across
data centers
– Synchronous replication &
auto-failover between sites
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. September 29th, 2012
36. Handling Scheduled Maintenance
On-Line Operations
Scale
Backup
Evolve
Upgrade
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. September 29th, 2012
37. SLAs
Platforms
Application requirements (storage engines)
Performance expectations vs tolerance to data loss
Skill sets
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
38. Certified MySQL HA Solutions
MySQL
5.6
Oracle
VM
Solaris
Windows
MySQL
ReplicaAon DRBD
Template
Cluster Cluster Cluster
Auto-‐Failover
&
Migra1on
✔
✔
✔
✔
✔
✔
No
Data
Loss
@
Failover
Semi-‐Sync
✔
✔
✔
✔
✔
Pla:orm
Support
All
Linux
Solaris
Windows
Linux
All
Master
+
Ac1ve/ Ac1ve/ Ac1ve/ Ac1ve/ Mul1-‐
Clustering
Mode
Slaves
Passive
Passive
Passive
Passive
Master
Shared
Storage
✖
✔
✔
✔
✖
✖
Availability
Design
99.9%
99.99%
99.99%
99.95%
99.99%
99.999%
Single
Vendor
Support
✔
✔
✔
✖
✔
✔
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. September 29th, 2012
39. Operational Best Practices
Training
Consul1ng
24
x
7
x
365
Global
Support
Database
Management
&
Monitoring
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
40. MySQL Enterprise Edition
Highest Levels of Security, Performance and Availability
Oracle Premier
Lifetime Support
MySQL Enterprise Oracle Product
Security Certifications/Integrations
MySQL Enterprise MySQL Enterprise
Audit Monitor/Query Analyzer
MySQL Enterprise MySQL Enterprise
Scalability Backup
MySQL Enterprise
High Availability MySQL Workbench
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
41. MySQL Enterprise Monitor
• Web-based, global view of MySQL/
Cluster applications (on-premise
and Cloud deployments)
• Automated, rules-based monitoring
and alerts (SMTP, SNMP enabled)
• Query capture, monitoring, analysis
and tuning, correlated with Monitor
graphs
• Real-time Replication Monitor with
auto-discovery of master-slave
topologies
• Integrated with Oracle Support A Virtual MySQL DevOps + Admin!
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
42. MySQL Enterprise Backup
§ Online Backup for InnoDB (scriptable interface)
§ Full, Incremental, Partial Backups (with compression)
§ Point in Time, Full, Partial Recovery options
§ Parallel, multi-threaded backup/recovery operations
§ Metadata on status, progress, history mysqlbackup
§ Unlimited Database Size
§ Cross-Platform MEB Backup MySQL
Files Database Files
- Windows, Linux, Unix
§ Certified with Oracle Secure Backup
Ensures quick, online backup and recovery of your on premise and Cloud
based MySQL applications.
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
43. Oracle Premier Support for MySQL
Rely on The Experts - Get Unique Benefits
• Straight from the Source
• Largest Team of MySQL Experts
• Backed by MySQL Developers
• Forward Compatible Hot Fixes Only From
• MySQL Maintenance Releases Oracle
• MySQL Support in 29 Languages
• 24/7/365 "The MySQL support service has been
essential in helping us with troubleshooting
• Unlimited Incidents and providing recommendations for the
production cluster, Thanks."
• Knowledge Base
• MySQL Consultative Support -- Carlos Morales – Playfulplay.com
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
44. Next Steps
Learn More
HA Solutions
Guide
http://bit.ly/NB8up1
Evaluate MySQL 5.6 Book a Workshop
Download Today High Availability
Jumpstart
http://dev.mysql.com/ http://www.mysql.com/
downloads/mysql/ consulting/
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
Copyright 2011 Oracle Corporation
46. Design Goals
HIGH SCALE, • Auto-Sharding, Multi-Master
READS + WRITES • ACID Compliant, OLTP + Real-Time Analytics
99.999% • Shared nothing, no Single Point of Failure
AVAILABILITY • Self Healing + On-Line Operations
• High Load, Real Time Performance
REAL-TIME
• Predictable Low-Latency, Bounded Access Time
• Key/Value + Complex, Relational Queries
SQL + NoSQL
• SQL + Memcached + Java + JPA + HTTP/REST + C++
• Open Source + Commercial Editions
LOW TCO
• Commodity hardware + Management, Monitoring Tools
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. September 29th, 2012
47. Mapping Applications to HA Technology
89&3.4:;(,9$)<=/
+&,&-&*./ 1#2*,.3.4/5/
!""#$%&'()* >.(:0."#$%&,.4/
0."#$%&'() 6$3,2&#$7.4
1#2*,.3
!"#$%%&'(&)*)+',-./0 ))))))))))))))))123)
4&55.$/)6,/,0&%&/7 ))))))))))))))))123)
85&')9:7;&/<(,<$/)*)9(($:/</0 )))))))))))))))))123)
=&&-5>)?@$05>)A.B.5
CD+E )))))))))))))))))123)
F,7,)A,'&;$:5&*?G
#$/7&/7)6,/,0&%&/7
#H6
#$@@,I$',<$/
E,(B,0&-)4$JK,'&
L&7K$'B)G/M',57':(7:'&)
#$'&)+&@($)9NN5)1ODH*O44*4FEP3)
1: Replication used in combination with cluster or virtualization – based HA
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. September 29th, 2012
48. Reasons for Unplanned Downtime
Products 20%
People 40%
Process 40%
http://www.gartner.com/DisplayDocument?id=334197
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012
49. MySQL Expert Advisors
Administration
MySQL Cluster Performance
• Monitors and Advises on
• Monitors and Advises on Optimal Configuration • Monitors and Advises
status/ performance of on Optimal
MySQL Cluster Data Performance Variable
Nodes. Settings
Custom Replication
• Built by DBA to Enforce
Organization specific • Monitors and Advises on
best practices. Master/Slave Latency.
Upgrade Security
• Monitors and Advises on • Monitors and Advises
Bugs/Upgrades that affect on Unplanned Security
current installation Changes/Loopholes
Backup/Recovery Schema Memory Usage
• Monitors and Advises on • Monitors and Advises
backup/recovery
• Monitors and advises
on Unplanned Schema on optimal memory/
operations. Change cache settings
140+ Rules, 60+ MySQL, OS specific Graphs
160+ Rules, 40+ MySQL, OS specific Graphs
Copyright © 2012, Oracle and / or its affiliates. All rights reserved. September 29th, 2012