Amazon RDS MySQL and Master-master Replication

I cannot find it from the documentation, but it seems that Master-Master replication is not supported at this time. Is it correct?

+4
source share
5 answers

It is right. RDS does not currently support Master-Master replication, so horizontal scaling for recording is not easy if you need it. However, RDS does support the ability to create multiple read-only “slave” RDS instances, so you can scale horizontally for reading.

RDS replication questions are often asked here.

http://aws.amazon.com/rds/faqs/#replication

+9

, Master-Master RDS MySql Engine. . : 1) . 2) , . 3) , .

Master1

grant replication slave on *.* to 'admin'@'%' identified by 'admin';
Query OK, 0 rows affected (0.00 sec)

; + ---------------------------- + ---------- + --------- ----- + ------------------ + ------------------- + | | | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set | + ---------------------------- + ---------- + --------- ----- + ------------------ + ------------------- + | mysql-bin-changelog.000007 | 120 | |
| | + ---------------------------- + ---------- + --------- ----- + ------------------ + ------------------- + 1 ( 0,00 )

Master2

mysql> call mysql.rds_set_external_master('master1.endpoint.amazonaws.com',3306,'admin','admin','**mysql-bin-changelog.000007**',**120**,0);
Query OK, 0 rows affected (0.05 sec)

mysql> call mysql.rds_start_replication;
+-------------------------+
| Message                 |
+-------------------------+
| Slave running normally. |
+-------------------------+
1 row in set (1.01 sec)

mysql -u admin123 -padmin123 -h master2.endpoint.amazonaws.com -e "show slave status\G;" | grep Running
             Slave_IO_Running: Yes
            Slave_SQL_Running: Yes
      Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it

=============================================== =======================

Master2

grant replication slave on *.* to 'admin'@'%' identified by 'admin';
Query OK, 0 rows affected (0.00 sec)

show master status;
+----------------------------+----------+--------------+------------------+-------------------+
| File                       | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+----------------------------+----------+--------------+------------------+-------------------+
| **mysql-bin-changelog.000007** |      **120** |              |                  |                   |
+----------------------------+----------+--------------+------------------+-------------------+
1 row in set (0.00 sec)

Master1

mysql> call mysql.rds_set_external_master('master2.endpoint.amazonaws.com',3306,'admin','admin','**mysql-bin-changelog.000007**',**120**,0);
Query OK, 0 rows affected (0.05 sec)

mysql> call mysql.rds_start_replication;
+-------------------------+
| Message                 |
+-------------------------+
| Slave running normally. |
+-------------------------+
1 row in set (1.01 sec)

mysql -u admin123 -padmin123 -h master1.endpoint.amazonaws.com -e "show slave status\G;" | grep Running
             Slave_IO_Running: Yes
            Slave_SQL_Running: Yes
      Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
+1

, .

https://aws.amazon.com/about-aws/whats-new/2017/11/sign-up-for-the-preview-of-amazon-aurora-multi-master/

: 29 2017 .

Amazon Aurora Multi-Master / - . , , Read Replicas .

Aurora . - , , AZ, . Aurora 15 , , . 200 000 / r4.16xlarge. , -. Aurora, MySQL, , .

Amazon Aurora - , .

+1
0

Source: https://habr.com/ru/post/1529877/


All Articles