Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Talk about Percona XtraDB Cluster

Talk about Percona XtraDB Cluster

Speaker: Gea-Suan Lin (@gslin), KKBOX Technology
Topic: Talk about Percona XtraDB Cluster
Conference: OSDC.tw 2013 (in Taipei, Taiwan)

Gea-Suan Lin

April 19, 2013
Tweet

More Decks by Gea-Suan Lin

Other Decks in Technology

Transcript

  1. Talk about Percona
    XtraDB Cluster
    Gea-Suan Lin

    View full-size slide

  2. github.com/KKBOX/
    OSDC.tw.2013

    View full-size slide

  3. Percona XtraDB
    Cluster (PXC)

    View full-size slide

  4. Galera Cluster

    View full-size slide

  5. Synchronous
    Replication

    View full-size slide

  6. No Replication Lag

    View full-size slide

  7. Active-Active
    Multi-Master

    View full-size slide

  8. Higher Hardware
    Usage

    View full-size slide

  9. DELETE on no-PK
    table may break
    consistency

    View full-size slide

  10. Perfer to InnoDB

    View full-size slide

  11. Hardware Suggestion

    View full-size slide

  12. Two same powerful
    servers for database

    View full-size slide

  13. One dedicated small
    server for
    backup & garbd

    View full-size slide

  14. Software Suggestion

    View full-size slide

  15. Debian (x86_64)

    View full-size slide

  16. Install Percona PGP Key

    View full-size slide

  17. # gpg \
    --keyserver hkp://keys.gnupg.net \
    --recv-keys 1C4CBDCDCD2EFD2A

    View full-size slide

  18. Setup APT Repository

    View full-size slide

  19. deb http://repo.percona.com/apt
    squeeze main
    deb-src http://repo.percona.com/apt
    squeeze main

    View full-size slide

  20. # apt-get update

    View full-size slide

  21. Install Percona XtraDB
    Cluster

    View full-size slide

  22. # apt-get install \
    percona-xtradb-cluster-server-5.5

    View full-size slide

  23. Install Percona Toolkit

    View full-size slide

  24. # apt-get install percona-toolkit

    View full-size slide

  25. Setup /etc/mysql/my.cnf

    View full-size slide

  26. [mysqld_safe]
    wsrep_cluster_address =
    gcomm://10.1.1.1:4567,
    gcomm://10.1.1.2:4567,
    gcomm://10.1.1.3:4567,
    gcomm://

    View full-size slide

  27. [mysqld]
    binlog_format = ROW
    server_id = 12345
    wsrep_cluster_name = XXX
    wsrep_provider = /usr/lib64/libgalera_smm.so
    wsrep_provider_options = “gcache.size=1G”
    wsrep_slave_threads = 8
    wsrep_sst_auth = “mysqlusername:mysqlpassword”
    wsrep_sst_method = xtrabackup

    View full-size slide

  28. $ /usr/bin/garbd \
    -d \
    -a gcomm://10.1.1.1:4567 \
    -g XXX \
    -l /tmp/garbd-XXX.log

    View full-size slide

  29. Any Question ?

    View full-size slide