Hi
one of my inmediate goals is get some way to monitor lag on replication. I read some howtos about lag replication, and of most common solutions is to compare timestamps.
Excuse me but I don’t understand exactly how this can be work.
For example, one solution is create a table on master and load it with timestamps of server (by sh,php script, whatever). Then in slave we will connect against MASTER, we’ll get records and then we’ll compare with SLAVE timestamp.
But…the timestamp of both servers always will be the same, or not? I mean, if we have both servers with system date syncronized by some service, dates will be the same.
Excuses for a poor knowledge of this (
If someone can bring me a little light will be wellcome.
Thanks!
UPDATE:
After talking with a partner, we have noticed maybe is don’t necessary to have a table and php script on MASTER. My partner have told me that we can get the current timestamp of MASTER doing query directly against MASTER with “Select Now()”. With this procedure, we don’t need the table and cron on MASTER. Are you agree?