SlideShare une entreprise Scribd logo
1  sur  20
Télécharger pour lire hors ligne
MySQL Proxy:
a MySQL toolbox
Architecture and
Concepts of Misuse

Jan Kneschke
MySQL Enterprise Tools
mailto: jan@mysql.com
What is MySQL Proxy

   Started Feb 2007
    Current: MySQL Proxy 0.7.0
   Source available on launchpad.net
    $ bzr branch lp:mysql-proxy
   Foundation of the MEM 2.0 Agent
   Fully support for MySQL Enterprise
    Customers
   2 (+ 1) Developers, 1 QA
How it looks for a bird

    Inspecting traffic
     Logging, auditing
    Routing connections and queries
    Rewriting queries
    Injection queries
     “Be a good man in the middle”
How it looks for a frog


                  MySQL Proxy

                Lua Scripting layer

         Proxy Plugin        Admin Plugin

         Network Core (libmysql-proxy)

      libmysql libevent libmysql      liblua
      -chassis           -proto
The libs - chassis

    Command Line Interface
    Config-File support
    Logging (event-log, syslog, stderr,
     logfiles)
    Plugin Loading
    Threading
The libs - Protocols

   Documented …
    http://forge.mysql.com/wiki/MySQL_Internals_Clie
   MySQL Client Protocol
    Binary Logs
     MyISAM Row Format for RBR
   Hides the “creativity” of the
    implementation
What you don't want to know

   How to encode a 1234 (0x04d2) ?
    In resultsets: 04 31 32 33 34
    In Prepared depends on type: d2 04 00 00
    In the rest of the protocol: 02 d2 04
   Protocol is using a random mix of those
    encodings
Proof of Concept

   mysql-binlog-dump
    Similar to mysqlbinlog
    First implementation of RBR decoding
   mysql-myisam-dump
    Decodes .frm and .myd files
    Uncovers a little gem: screens
Let's wrap it

    Lua
     Small and fast
     Easy to read and write
     Easy to embed
    All the libs are nicely wrapped
The core – libmysql-proxy

   Protocol live-cycle (auth, old-auth, query)
   Provides the plugin hooks
   Global Lua scope
   Network interface
   MySQL Protocol encoding/decoding
Lua iterator for binlogs

    Expose binlog events into lua
    Reading and writing

  local binlog = require(“mysql.binlog”)
  local f = binlog.open(“jan-binlog.log”)
  for event in f:next() do
    if event.type == “QUERY_EVENT” then
      print(event.query.query)
    end
  end
Filtering

    Filter statements from a binlog
    Remove or rewrite Queries
            INSERT INTO answers
              VALUES ( 42, “the Answer” )
            UPDATE answers
              SET answer = “Thanks for the Fish”
              WHERE id = 2
            ALTER TABLE answers
              ADD INDEX (answer);
            DROP TABLE answers;
Merging binlogs

   independent Masters like shards
   Merge on timestamp
Druckbetankung

   Use RBR to push data into a server
   RBR is already in the native format
   mysql-data-source
    Convert input data to a live RBR-binlog-stream
   mysqld
    CHANGE MASTER TO … our data-source
    START SLAVE
Slave Accelerator

   Problem: Replication is synchronized,
    single thread
   Solution: move replication out of the
    slave
    Don't pull, push
    Parallel connections
mysql-slave-accel

   Read data from master
   Maintain slave-state centrally
   Rules to detect if data is independent
    e.g. one connection per schema
   Works transparently for SBR, tricky for
    RBR
Master Failover - Classic

   Master on stand-by
   On failure, CHANGE MASTER on
    all slaves
   Promote the best slave
Automatic Master Failover
mysql-master-failover

   Track active and passive master
   Only forward data received from both
    masters
   Track matching binlog-file and -position
   Active dies
    Trigger switch over
    Slaves get a continuos binlog stream
   States
    Synched, Single, Out-of-Sync
Thanks

   Code is on launchpad.net
    http://launchpad.net/mysql-proxy/
   Questions to: jan@mysql.com
   weigon in #mysql-proxy on
    irc.freenode.net

Contenu connexe

Tendances

Tendances (20)

LiquiBase
LiquiBaseLiquiBase
LiquiBase
 
A brief introduction to PostgreSQL
A brief introduction to PostgreSQLA brief introduction to PostgreSQL
A brief introduction to PostgreSQL
 
Database Change Management as a Service
Database Change Management as a ServiceDatabase Change Management as a Service
Database Change Management as a Service
 
Liquibase
LiquibaseLiquibase
Liquibase
 
MongoDB WiredTiger Internals: Journey To Transactions
MongoDB WiredTiger Internals: Journey To TransactionsMongoDB WiredTiger Internals: Journey To Transactions
MongoDB WiredTiger Internals: Journey To Transactions
 
Li liq liqui liquibase
Li liq liqui liquibaseLi liq liqui liquibase
Li liq liqui liquibase
 
MariaDB 10.5 binary install (바이너리 설치)
MariaDB 10.5 binary install (바이너리 설치)MariaDB 10.5 binary install (바이너리 설치)
MariaDB 10.5 binary install (바이너리 설치)
 
Open Source World June '21 -- JSON Within a Relational Database
Open Source World June '21 -- JSON Within a Relational DatabaseOpen Source World June '21 -- JSON Within a Relational Database
Open Source World June '21 -- JSON Within a Relational Database
 
LuSql: (Quickly and easily) Getting your data from your DBMS into Lucene
LuSql: (Quickly and easily) Getting your data from your DBMS into LuceneLuSql: (Quickly and easily) Getting your data from your DBMS into Lucene
LuSql: (Quickly and easily) Getting your data from your DBMS into Lucene
 
Liquibase
LiquibaseLiquibase
Liquibase
 
Liquibase – a time machine for your data
Liquibase – a time machine for your dataLiquibase – a time machine for your data
Liquibase – a time machine for your data
 
Agile Database Development with Liquibase
Agile Database Development with LiquibaseAgile Database Development with Liquibase
Agile Database Development with Liquibase
 
PostgreSQL- An Introduction
PostgreSQL- An IntroductionPostgreSQL- An Introduction
PostgreSQL- An Introduction
 
Introduction to apache zoo keeper
Introduction to apache zoo keeper Introduction to apache zoo keeper
Introduction to apache zoo keeper
 
SQLite 3
SQLite 3SQLite 3
SQLite 3
 
RMLL 2014 - LDAP Synchronization Connector
RMLL 2014 - LDAP Synchronization ConnectorRMLL 2014 - LDAP Synchronization Connector
RMLL 2014 - LDAP Synchronization Connector
 
djatoka for djummies
djatoka for djummiesdjatoka for djummies
djatoka for djummies
 
Dropwizard
DropwizardDropwizard
Dropwizard
 
SQLite: Light, Open Source Relational Database Management System
SQLite: Light, Open Source Relational Database Management SystemSQLite: Light, Open Source Relational Database Management System
SQLite: Light, Open Source Relational Database Management System
 
Power tools in Java
Power tools in JavaPower tools in Java
Power tools in Java
 

En vedette

High Availability with MySQL
High Availability with MySQLHigh Availability with MySQL
High Availability with MySQL
Thava Alagu
 
Methods of Sharding MySQL
Methods of Sharding MySQLMethods of Sharding MySQL
Methods of Sharding MySQL
Laine Campbell
 

En vedette (20)

High Availability with MySQL
High Availability with MySQLHigh Availability with MySQL
High Availability with MySQL
 
MySQL Fabric: High Availability using Python/Connector
MySQL Fabric: High Availability using Python/ConnectorMySQL Fabric: High Availability using Python/Connector
MySQL Fabric: High Availability using Python/Connector
 
MySQL highav Availability
MySQL highav AvailabilityMySQL highav Availability
MySQL highav Availability
 
ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!
ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!
ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!
 
MySQL Proxy. From Architecture to Implementation
MySQL Proxy. From Architecture to ImplementationMySQL Proxy. From Architecture to Implementation
MySQL Proxy. From Architecture to Implementation
 
DIY: A distributed database cluster, or: MySQL Cluster
DIY: A distributed database cluster, or: MySQL ClusterDIY: A distributed database cluster, or: MySQL Cluster
DIY: A distributed database cluster, or: MySQL Cluster
 
MySQL Proxy tutorial
MySQL Proxy tutorialMySQL Proxy tutorial
MySQL Proxy tutorial
 
MySQL HA Solutions
MySQL HA SolutionsMySQL HA Solutions
MySQL HA Solutions
 
MySQL Proxy. A powerful, flexible MySQL toolbox.
MySQL Proxy. A powerful, flexible MySQL toolbox.MySQL Proxy. A powerful, flexible MySQL toolbox.
MySQL Proxy. A powerful, flexible MySQL toolbox.
 
MySQL High Availability Deep Dive
MySQL High Availability Deep DiveMySQL High Availability Deep Dive
MySQL High Availability Deep Dive
 
MySQL? Load? Clustering! Balancing! PECL/mysqlnd_ms 1.4
MySQL? Load? Clustering! Balancing! PECL/mysqlnd_ms 1.4MySQL? Load? Clustering! Balancing! PECL/mysqlnd_ms 1.4
MySQL? Load? Clustering! Balancing! PECL/mysqlnd_ms 1.4
 
MySQL 5.6 Global Transaction IDs - Use case: (session) consistency
MySQL 5.6 Global Transaction IDs - Use case: (session) consistencyMySQL 5.6 Global Transaction IDs - Use case: (session) consistency
MySQL 5.6 Global Transaction IDs - Use case: (session) consistency
 
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL High Availability and Disaster Recovery with Continuent, a VMware companyMySQL High Availability and Disaster Recovery with Continuent, a VMware company
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
 
High-Availability using MySQL Fabric
High-Availability using MySQL FabricHigh-Availability using MySQL Fabric
High-Availability using MySQL Fabric
 
MySQL Replication: What’s New in MySQL 5.7 and Beyond
MySQL Replication: What’s New in MySQL 5.7 and BeyondMySQL Replication: What’s New in MySQL 5.7 and Beyond
MySQL Replication: What’s New in MySQL 5.7 and Beyond
 
Using MySQL Fabric for High Availability and Scaling Out
Using MySQL Fabric for High Availability and Scaling OutUsing MySQL Fabric for High Availability and Scaling Out
Using MySQL Fabric for High Availability and Scaling Out
 
ProxySQL - High Performance and HA Proxy for MySQL
ProxySQL - High Performance and HA Proxy for MySQLProxySQL - High Performance and HA Proxy for MySQL
ProxySQL - High Performance and HA Proxy for MySQL
 
Methods of Sharding MySQL
Methods of Sharding MySQLMethods of Sharding MySQL
Methods of Sharding MySQL
 
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB ClusterMySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
 
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High AvailabilityBest practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High Availability
 

Similaire à MySQL Proxy: Architecture and concepts of misuse

2012 replication
2012 replication2012 replication
2012 replication
sqlhjalp
 
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best PracticesOracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Sven Sandberg
 
Download presentation
Download presentationDownload presentation
Download presentation
webhostingguy
 
Mysql proxy presentation_yahoo
Mysql proxy presentation_yahooMysql proxy presentation_yahoo
Mysql proxy presentation_yahoo
Chris Westin
 

Similaire à MySQL Proxy: Architecture and concepts of misuse (20)

2012 replication
2012 replication2012 replication
2012 replication
 
MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017
 
2012 scale replication
2012 scale replication2012 scale replication
2012 scale replication
 
ConFoo MySQL Replication Evolution : From Simple to Group Replication
ConFoo  MySQL Replication Evolution : From Simple to Group ReplicationConFoo  MySQL Replication Evolution : From Simple to Group Replication
ConFoo MySQL Replication Evolution : From Simple to Group Replication
 
Squeak DBX
Squeak DBXSqueak DBX
Squeak DBX
 
MySQL Replication Overview -- PHPTek 2016
MySQL Replication Overview -- PHPTek 2016MySQL Replication Overview -- PHPTek 2016
MySQL Replication Overview -- PHPTek 2016
 
MySQL 101 PHPTek 2017
MySQL 101 PHPTek 2017MySQL 101 PHPTek 2017
MySQL 101 PHPTek 2017
 
MySQL HA with PaceMaker
MySQL HA with  PaceMakerMySQL HA with  PaceMaker
MySQL HA with PaceMaker
 
Oss4b - pxc introduction
Oss4b   - pxc introductionOss4b   - pxc introduction
Oss4b - pxc introduction
 
My sql crashcourse_intro_kdl
My sql crashcourse_intro_kdlMy sql crashcourse_intro_kdl
My sql crashcourse_intro_kdl
 
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best PracticesOracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
 
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & ClusterMySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
 
HandsOn ProxySQL Tutorial - PLSC18
HandsOn ProxySQL Tutorial - PLSC18HandsOn ProxySQL Tutorial - PLSC18
HandsOn ProxySQL Tutorial - PLSC18
 
MySQL Replication Alternative: Pros and Cons
MySQL Replication Alternative: Pros and ConsMySQL Replication Alternative: Pros and Cons
MySQL Replication Alternative: Pros and Cons
 
Download presentation
Download presentationDownload presentation
Download presentation
 
MySQL Cluster Scaling to a Billion Queries
MySQL Cluster Scaling to a Billion QueriesMySQL Cluster Scaling to a Billion Queries
MySQL Cluster Scaling to a Billion Queries
 
Mysql Proxy Presentation Yahoo
Mysql Proxy Presentation YahooMysql Proxy Presentation Yahoo
Mysql Proxy Presentation Yahoo
 
Mysql proxy presentation_yahoo
Mysql proxy presentation_yahooMysql proxy presentation_yahoo
Mysql proxy presentation_yahoo
 
MySQL Shell for Database Engineers
MySQL Shell for Database EngineersMySQL Shell for Database Engineers
MySQL Shell for Database Engineers
 
How to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScaleHow to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScale
 

Dernier

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 

Dernier (20)

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 

MySQL Proxy: Architecture and concepts of misuse

  • 1. MySQL Proxy: a MySQL toolbox Architecture and Concepts of Misuse Jan Kneschke MySQL Enterprise Tools mailto: jan@mysql.com
  • 2. What is MySQL Proxy  Started Feb 2007  Current: MySQL Proxy 0.7.0  Source available on launchpad.net $ bzr branch lp:mysql-proxy  Foundation of the MEM 2.0 Agent  Fully support for MySQL Enterprise Customers  2 (+ 1) Developers, 1 QA
  • 3. How it looks for a bird  Inspecting traffic  Logging, auditing  Routing connections and queries  Rewriting queries  Injection queries  “Be a good man in the middle”
  • 4. How it looks for a frog MySQL Proxy Lua Scripting layer Proxy Plugin Admin Plugin Network Core (libmysql-proxy) libmysql libevent libmysql liblua -chassis -proto
  • 5. The libs - chassis  Command Line Interface  Config-File support  Logging (event-log, syslog, stderr, logfiles)  Plugin Loading  Threading
  • 6. The libs - Protocols  Documented …  http://forge.mysql.com/wiki/MySQL_Internals_Clie  MySQL Client Protocol  Binary Logs  MyISAM Row Format for RBR  Hides the “creativity” of the implementation
  • 7. What you don't want to know  How to encode a 1234 (0x04d2) ?  In resultsets: 04 31 32 33 34  In Prepared depends on type: d2 04 00 00  In the rest of the protocol: 02 d2 04  Protocol is using a random mix of those encodings
  • 8. Proof of Concept  mysql-binlog-dump  Similar to mysqlbinlog  First implementation of RBR decoding  mysql-myisam-dump  Decodes .frm and .myd files  Uncovers a little gem: screens
  • 9. Let's wrap it  Lua  Small and fast  Easy to read and write  Easy to embed  All the libs are nicely wrapped
  • 10. The core – libmysql-proxy  Protocol live-cycle (auth, old-auth, query)  Provides the plugin hooks  Global Lua scope  Network interface  MySQL Protocol encoding/decoding
  • 11. Lua iterator for binlogs  Expose binlog events into lua  Reading and writing local binlog = require(“mysql.binlog”) local f = binlog.open(“jan-binlog.log”) for event in f:next() do if event.type == “QUERY_EVENT” then print(event.query.query) end end
  • 12. Filtering  Filter statements from a binlog  Remove or rewrite Queries INSERT INTO answers VALUES ( 42, “the Answer” ) UPDATE answers SET answer = “Thanks for the Fish” WHERE id = 2 ALTER TABLE answers ADD INDEX (answer); DROP TABLE answers;
  • 13. Merging binlogs  independent Masters like shards  Merge on timestamp
  • 14. Druckbetankung  Use RBR to push data into a server  RBR is already in the native format  mysql-data-source  Convert input data to a live RBR-binlog-stream  mysqld  CHANGE MASTER TO … our data-source  START SLAVE
  • 15. Slave Accelerator  Problem: Replication is synchronized, single thread  Solution: move replication out of the slave  Don't pull, push  Parallel connections
  • 16. mysql-slave-accel  Read data from master  Maintain slave-state centrally  Rules to detect if data is independent  e.g. one connection per schema  Works transparently for SBR, tricky for RBR
  • 17. Master Failover - Classic  Master on stand-by  On failure, CHANGE MASTER on all slaves  Promote the best slave
  • 19. mysql-master-failover  Track active and passive master  Only forward data received from both masters  Track matching binlog-file and -position  Active dies  Trigger switch over  Slaves get a continuos binlog stream  States  Synched, Single, Out-of-Sync
  • 20. Thanks  Code is on launchpad.net  http://launchpad.net/mysql-proxy/  Questions to: jan@mysql.com  weigon in #mysql-proxy on irc.freenode.net