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)

8327d09b0bd5ac97409aa10f927b3c30?s=128

Gea-Suan Lin

April 19, 2013
Tweet

Transcript

  1. Talk about Percona XtraDB Cluster Gea-Suan Lin

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

  3. Percona XtraDB Cluster (PXC)

  4. Oracle

  5. MySQL

  6. Codership

  7. Galera Cluster

  8. Percona

  9. Patches

  10. Pros

  11. Synchronous Replication

  12. No Replication Lag

  13. Active-Active Multi-Master

  14. Higher Hardware Usage

  15. Cons

  16. DELETE on no-PK table may break consistency

  17. Perfer to InnoDB

  18. Hardware Suggestion

  19. Two same powerful servers for database

  20. One dedicated small server for backup & garbd

  21. Software Suggestion

  22. Debian (x86_64)

  23. Setup

  24. Install Percona PGP Key

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

  26. Setup APT Repository

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

  28. Update APT

  29. # apt-get update

  30. Install Percona XtraDB Cluster

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

  32. Install Percona Toolkit

  33. # apt-get install percona-toolkit

  34. Setup /etc/mysql/my.cnf

  35. See GitHub

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

  37. [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
  38. Setup garbd

  39. $ /usr/bin/garbd \ -d \ -a gcomm://10.1.1.1:4567 \ -g XXX

    \ -l /tmp/garbd-XXX.log
  40. Live Demo ?

  41. Any Question ?