-
Notifications
You must be signed in to change notification settings - Fork 0
Syncing configuration guide
Basically, a RDS cluster must have at least one master node and an infinite number of minion nodes (usually one or two). When the user makes some action (create/destroy/edit…) on the master node using RDS CLI this action is pushed into RDS Sync master. RDS Sync minions periodically pull master for made actions and apply these actions to their state.
You can use your minion as a standby fail-over (no read nor write commands) or use it for reading data. Also, when you use your minion as a standby you could distribute load through a cluster saving data to rdb files only on minion and disable saving data on master.
Basic RDS cluster architecture
RDS cluster architecture with Sentinels
1. Generate authentication token
Authentication token used for minions authentication on the master node. You can generate a new token using the next command:
sudo rds gen-token
2. Add master configuration
Open file /etc/rds.knf
on the master node with your favourite editor and go to the [replication]
section. Update the next properties:
-
role
tomaster
; -
master-ip
to a machine IP address; -
auth-token
insert previously generated token.
3. Add minion configuration
Open file /etc/rds.knf
on the minion node with your favourite editor and go to [replication]
section. Update the next properties:
-
role
tominion
; -
master-ip
to master node IP address; -
auth-token
insert previously generated token.
4. Start RDS Sync daemon on the master node
Start daemon using the next command:
sudo systemctl start rds-sync
Open the daemon log file /opt/rds/log/rds-sync.log
and check it for errors or warnings. If it has some, fix it and try to start the daemon again.
5. StartRDS Sync daemon on the minion node
Start daemon using the next command:
sudo systemctl start rds-sync
Open the daemon log file /opt/rds/log/rds-sync.log
and check it for errors or warnings. If it has some, fix it and try to start the daemon again.
6. Check the replication status
Check the replication status on master or minion node using the next CLI command:
sudo rds replication
It will show information about master and all connected minion nodes.