MySQL Architecture and Technology Luca Olivari MySQL Sales Consulting Manager, EMEA Introduction to MySQL Industry Leaders Rely on MySQL

Web & Enterprise OEM & ISVs

Cloud Who is Using MySQL – The Top 20 Websites 1. Google 11. Twitter 2. Facebook 12. Yahoo JP 3. Youtube 13. Google IN 4. Yahoo 14. Taobao 5. Windows Live 15. Google DE 6. Wikipedia 16. Google HK 7. Baidu 17. Wordpress 8. Blogger 18. Amazon.com 9. MSN 19. Google UK 10. QQ 20. Sina

...and many more: Flickr, Second Life, Craigslist, Slashdot, LiveJournal, Digg, Del.icio.us, Pricegrabber.com, Weather.com etc. MySQL is Everywhere

MULTIPLE PLATFORMS MultipleMULTIPLE Languages LANGUAGES

C C++ C# The Industry’s Most Complete LAMP Stack Ease of Use for Rapid Results. Support Across the LAMP Stack. Easy Integration with Existing Infrastructure.

Oracle Linux and VM L

Glassfish and Apache A

MySQL M

PHP, Perl, Python, P/J Java

For Internal Use Only -- Oracle Confidential & Proprietary Oracle’s Investments in MySQL

Make MySQL a Better MySQL • #1 Open Source Database for Web Applications Develop, Promote and Support MySQL • Improve engineering, consulting and support MySQL Community Edition • Source and binary GPL releases MySQL Focus Areas • Web, Embedded & Telecom • LAMP • Windows MySQL Architecture and Technology © 2010 – Proprietary and Confidential Pluggable Storage Engines Architecture

MySQL Server Connectors Clients and Apps Native C API, JDBC, ODBC, .Net, PHP, Ruby, Python, VB, Perl

Enterprise Management Services and Utilities Connection Pool Backup & Recovery Authentication – Thread Reuse – Connection Limits – Check Memory – Caches Security Replication Cluster SQL Interface Parser Optimizer Caches Partitioning DDL, DML, Stored Query Translation, Access Paths, Global and Engine Instance Manager Procedures, Views, Object Privileges Statistics Specific Caches and Information_Schema Triggers, Etc.. Buffers MySQL Workbench

Pluggable Storage Engines Memory, Index and Storage Management

InnoDB MyISAM Cluster Etc… Partners Community More..

Filesystems, Files and Logs Redo, Undo, Data, Index, Binary, Error, Query and Slow

MySQL 5 – All the Right Features

PERFORMANCE RELIABILITY EASE OF USE

• Stored Procedures • Stored procedure • Instance Manager • Query Optimizations • SQL Mode • Information Schema • Archive Engine 5 • Triggers 5 • Cursors 5 • InnoDB storage • Views • Enhanced GUI Tools • Precision Math • Migration Toolkit • Table/Index Partitioning • Distributed Transactions • MySQL Workbench • Full-Text Improvements • Increased object support • Archive Improvements • Faster DDLs • Row-Based Replication • XML/XPath Support • Parallel Data Import 5.1 • Federated Engine Txn 5.1 • Task Scheduler 5.1 • New Load Testing Utility • Row-Based Binary Log • Storage Engine Plug-in • MyISAM Memory Option Analysis API • New Diagnostics MySQL 5.5 – Now GA! • InnoDB is default – ACID Transactions, FKs, Crash Recovery

• Improved Availability – Semi-synchronous Replication – Replication Heartbeat

• Improved Usability – SIGNAL/RESIGNAL – More Partitioning Options – PERFORMANCE_SCHEMA

• Better Instrumentation/Diagnostics – InnoDB stats in 5.5 PERFORMANCE_SCHEMA

• MySQL 5.5 is Faster! – More than 10x improvement in recovery times – 369% Performance Gain on Linux (r/w) – 1561% performance gain on Windows (r/w) MySQL Editions MySQL Editions: Features

MySQL Editions Features MySQL Standard MySQL Enterprise MySQL Edition Edition CGE Edition MySQL Database ✔ ✔ ✔ MySQL Connectors ✔ ✔ ✔ MySQL Replication ✔ ✔ ✔ MySQL Partitioning ✔ ✔ MySQL Workbench SE ✔ ✔ ✔ Storage Engine: MyISAM ✔ ✔ ✔ Storage Engine: InnoDB ✔ ✔ ✔ Storage Engine: NDB ✔ MySQL Enterprise Monitor ✔ ✔ MySQL Enterprise Backup ✔ ✔ MySQL Enterprise Security ✔ ✔ MySQL Enterprise Scalability ✔ ✔ MySQL Enterprise High Availability ✔ ✔ MySQL Cluster Manager ✔ MySQL Cluster Geo-Replication ✔ Oracle Products Certification ✔(1) ✔ ✔

(1) Standard Edition is Certified with Oracle Linux, VM and Solaris Only MySQL Editions: Support

MySQL Editions Oracle Premier Support MySQL Standard MySQL Enterprise MySQL CGE Edition Edition Edition

24x7 Support ✔ ✔ ✔

Unlimited Support Incidents ✔ ✔ ✔

Knowledge Base ✔ ✔ ✔

Maintenance Releases, Bug Fixes, Patches, ✔ ✔ ✔ Updates

MySQL Consultative Support ✔ ✔ ✔ http://mysql.com/products MySQL Enterprise Monitor A Virtual MySQL DBA Assistant!

• Single, consolidated view into entire MySQL environment • Automated, rules-based monitoring and alerts (SMTP, SNMP enabled) • Query capture, monitoring, analysis and tuning, correlated with Monitor graphs • Visual monitoring of “hot” applications and servers • Real-time Replication Monitor with auto-discovery of master-slave topologies • Integrated with MyOracle Support

MySQL Enterprise Advisors 150+ rules designed to enforce MySQL Best Practices

ADMINISTRATION SECURITY UPGRADE CUSTOM

• Helps DBA better • Protects MySQL • Monitors and • Built by DBA to manage database Servers Advises Bugs that Enforce Organization processes • Uncovers Security affect current specific best • Suggests loopholes installation practices improvements for • Provides update path • Create New or Tailor smoother operations to correcting MySQL Advisors to MRU/QSP fit needs

REPLICATION MEMORY PERFORMANCE SCHEMA

• Makes suggestions • Ensures optimum • Makes suggestions • Helps DBA design for improving use of memory for improving better databases replication design • Minimizes disk database speed • Uncovers Security • Identifies potential access for read • Identifies potential loopholes replication intensive systems. performance bottlenecks bottlenecks

MySQL Replication Monitor

• Makes it easier to scale out with MySQL • Auto-detects and groups master/slave relationships • Saves DBA time collecting master/slave status info from command line

MySQL Query Analyzer

• Trace, monitor & analyze MySQL query activity for specific servers, users, and applications. – Show “worst” queries – Bad exec time or count; bad row size or count; – Capture/show – problem query examples – Show Query Explain

MySQL Enterprise Backup

• Formerly “InnoDB Hot Backup” • Online, non-locking backup & recovery – Tables, Indexes – Server, database, or object-level • Logical and physical backups • Full or incremental backups • Point-in-time recovery • Compressed backups • Also provides backup & recovery for MyISAM • Cross-Platform (Windows, Linux, Unix) MySQL Enterprise Scalability MySQL Thread Pool gives 20x Better Scalability (RW)

• MySQL default thread-handling – excellent performance, can limit scalability as connections grow • MySQL Thread Pool improves sustained performance/scale as user connections grow

• Thread Pool API MySQL 5.5 Sysbench OLTP Read/Write

8.000

7.000

6.000

5.000

4.000

3.000

2.000

Transactions Second Per 1.000

0 8 16 32 64 128 256 512 1.024 1.536 2.048 2.560 3.072 3.584 4.096 Simultaneous Database Connections MySQL Enterprise Security MySQL External Authentication

• PAM (Pluggable Authentication Modules) – Access external authentication methods – Standard interface (Unix, LDAP, others) – Proxied and non-proxied users • Windows – Access native Windows services – Authenticate users already logged into Windows (Windows Active Directory) • Pluggable Authentication API

Integrates MySQL with existing security infrastructures and SOPs. MySQL Enterprise High Availability OVM Template for MySQL

Oracle VM Oracle VM Automatic Fault Detection & • Oracle Linux with the Recovery Unbreakable Enterprise Kernel Secure Live • Oracle VM Migration (SSL) • Oracle VM Manager Oracle VM Server Pool • Oracle Cluster File System 2 Oracle VM Manager (OCFS2) • MySQL Database (Enterprise Edition) Oracle VM Servers

• Pre-Installed & Pre- ocfs2 Configured SAN / iSCSI • Full Integration & QA Testing • Single Point of Support**

** Technical support for Oracle Linux and Oracle Virtual Machine requires Unbreakable Linux Network subscription.. MySQL Workbench – The MySQL IDE

• The Official MySQL GUI Application • Combines Three Major Feature Sets in One Tool – Design – Development – Administration • Cross platform and Native UI – Windows – Linux – Mac OSX

MySQL Workbench – Home Screen MySQL Support Services

• Self-help support service – Online knowledge base • Problem-resolution service – Seasoned support team – 24x7 email/phone access • Consultative support services – Remote troubleshooting service – Configuration and tuning services – Customer code review services Scalability and High Availability with MySQL High Availability Solutions Certified & Supported

Clustering & Geographical Redundancy

Oracle Clustering & Virtualization Clusterware

Replication 3rd Party Solutions Replication

ISPs & On-Line eCommerce Business Services Telecoms 9 9 . . 9 9 9 % 35 days 4 days 8 hours 50 mins 5 mins Replication Topologies A Flexible Way to Scale

Single Chain

Multiple Circular

Master Slave Partitioning

• Used to improve performance on large table • Available from 5.1 • Available on any storage engine • Supports range, hash, key, list, and composite methods • Useful for data warehousing, reporting, logging and many date/time-based tables • Partitions can be removed and added easily using DROP and ADD PARTITION in ALTER TABLE

Monthly-partitioned Table 5,10 6,07 6,08 6,09 6,10

Shared Disks Cluster (A/P - A/A)

VIP Clients

• Reliability • High Availability – Commonly used solution – Data handled by a SAN • Fault Tolerance or NAS and always – No single point of failure available with appropriate • Automatic fail-over hardware – Simplified Management

32 MySQL Cluster Architecture

JPA REST Application Nodes

Node Group 1 Node Group 2

Cluster F1 F2 Cluster

Mgmt F3 F4 Mgmt Node 1 Node

Synch Replication 3 Node

F3 F4

F1 F2 Node 4 Node Node 2 Node Data Nodes MySQL Cluster - Extreme Resilience

JPA REST Application Nodes

Node Group 1 Node Group 2

Cluster F1 F2 Cluster

Mgmt F3 F4 Mgmt Node 1 Node

Synch Replication 3 Node

F3 F4

F1 F2 Node 2 Node Data Nodes 4 Node Handling Scheduled Maintenance On-Line Operations

• Scale the cluster (add & remove nodes on-line) • Repartition tables • Upgrade / patch servers & OS • Upgrade / patch MySQL Cluster • Back-Up • Evolve the schema on-line, in real-time Automatic Data Sharding 4 Data Nodes and 2 Replicas

IDCol Col1 Col2 Col3 Col4 … Node Group 1 F1

1 1

Node Node F3

2 F1

3 F3 F1 4 F2 2 Node

5 Node Group 2 6 F3

F2

7 3 F4 Node Node

8 F4 F4 F2 Fn Primary Replica 4 Node Fn Secondary Replica Servicing the Most Performance-Intensive Workloads

Additional References

• MySQL Enterprise: http://www.mysql.com/products/enterprise/ • MySQL Enterprise Trial: http://www.mysql.com/trials/ • Community Downloads: http://dev.mysql.com/downloads • Documentation: http://dev.mysql.com/doc • Blogs: http://planet.mysql.com • Forums: http://forums.mysql.com search.mysql.com

Thank you! 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.