Mysql
Mysql
Kenny Gryp
productions
Table of Contents
Group Replication
MySQL Shell (AdminAPI)
MySQL Group Replication
MySQL Router
Best Practices
Limitations
Production?
MySQL Group Replication
MySQL InnoDB Cluster
MySQL Group Replication
Developed by Oracle
Generally Available in MySQL 5.7.17 on December 2016
MySQL InnoDB Cluster as Solution
Async GR
Error Log:
Id: 25
User: root
Host: localhost
db: NULL
Command: Query
Time: 131
State: checking permissions
Info: create database node2
Usability
mysql> show processlist\G
Id: 25
User: root
Host: localhost
db: NULL
Command: Query
Time: 131
State: checking permissions
Info: create database node2
no Quorum
gr_unreachable_majority_timeout=0 by default
:(
Usability
Features:
Bug:
Bug:
Use ProxySQL!
Best Practices
Best Practices - Architecture
Uneven amount of nodes
Not recommended for WAN
=> important timeouts are not con gurable yet
Use an intelligent Load Balancer
=> #84729 Impossible to block reads on partitioned nodes
Best Practices - Con guration Settings
hostname=RESOLVABLE
super_read_only=ON
group_replication_unreachable_majority_timeout=20
log_error_verbosity=3
group_replication_ssl_mode=REQUIRED
disabled_storage_engines="MyISAM,BLACKHOLE,FEDERATED,
ARCHIVE,MEMORY"
group_replication_auto_increment_increment=1
Best Practices - Con guration Settings
hostname=RESOLVABLE
super_read_only=ON
group_replication_unreachable_majority_timeout=20
log_error_verbosity=3
group_replication_ssl_mode=REQUIRED
disabled_storage_engines="MyISAM,BLACKHOLE,FEDERATED,
ARCHIVE,MEMORY"
group_replication_auto_increment_increment=1
group_replication_transaction_size_limit=150000000
group_replication_group_seeds=<ALL_NODES!>
group_replication_single_primary_mode=ON
group_replication_bootstrap_group=OFF
group_replication_allow_local_disjoint_gtids_join=OFF
Best Practices
hostname=VALID_RESOLVABLE_HOSTNAME
super_read_only=ON
Using mysqlsh with < 8.0.11 does not persist con guration
and GR does not start on boot
=> writeable single mysql node when restarted
Best Practices
gr_unreachable_majority_timeout=20
log_error_verbosity=3
gr_ssl_mode=REQUIRED
DISABLED (default)
Similar to client ssl-mode=REQUIRED
mysqlsh (py): dba.create_cluster('maurage',
(memberSslMode='REQUIRED'))
Best Practices
disabled_storage_engines=
"MyISAM,BLACKHOLE,FEDERATED,
ARCHIVE,MEMORY"
gr_auto_increment_increment=1
Default 7
Single-Primary/Writer is recommended
No need for >1
Best Practices
gr_transaction_size_limit=150000000
gr_group_seeds=<ALL_NODES!>
< 8.0.11: with mysqlsh con gured cluster does not properly
con gure seeds causing nodes not to rejoin #90438
Con gure IP Addresses, not hostnames #90483
Best Practices
gr_single_primary_mode=ON
gr_bootstrap_group=OFF
gr_allow_local_disjoint_gtids_join=OFF
GET_LOCK()
binlog_format=STATEMENT
Large transactions
SELECT FOR UPDATE (#85998)
IPv6 (#90217)
Non InnoDB Storage Engines
Consistent reads on all nodes
No PK on all tables
Production Ready?
Production Ready?
Good
Bad
Ugly
Best Practices!
Test thoroughly!
Ready For Production? (2018-04)
Ready For Production? (2018-04)
bottled end of 2016
Ready For Production? (2018-04)
bottled end of 2016
delicious gem, still youthful
Ready For Production? (2018-04)
bottled end of 2016
delicious gem, still youthful
already very enjoyable for
connoisseurs
Ready For Production? (2018-04)
bottled end of 2016
delicious gem, still youthful
already very enjoyable for
connoisseurs
great legs
Ready For Production? (2018-04)
bottled end of 2016
delicious gem, still youthful
already very enjoyable for
connoisseurs
great legs
nice structure
Ready For Production? (2018-04)
bottled end of 2016
delicious gem, still youthful
already very enjoyable for
connoisseurs
great legs
nice structure
needs some decanting to
become top-knotch
Ready For Production? (2018-04)
bottled end of 2016
delicious gem, still youthful
already very enjoyable for
connoisseurs
great legs
nice structure
needs some decanting to
become top-knotch
KG: 90 points