문제

I would like to know how is it possible to test the lack time of master salve replication. For instance when a master has a record updated and a slave is replicating, how would it be possible to test the time interval within the replication process? Is there any software used or am i supposed to add in a column that is timestamp in my database?

I would not want to add in the timestamp column in the database because the system is already developed and i would not want to go through the entire codes to change the insert/update sql statements and amend the sql statement. My goal is to set up the replication and measure the time interval.

Advance thanks!

도움이 되었습니까?

해결책

SHOW SLAVE STATUS on the slave will tell you how far behind it is.

The "correct" way to test the replication delay, however, is to continually poll the slave, and then fire a query on the master. The time it takes for the slave to receive the record is the replication delay.

In most setups, the lag is on the order of milliseconds.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top