gequiros wrote:Actually i got mine getting time from 0.pool.npt.org, all the 6 servers from there... and all at 5 mins diff each other
and i am doing that at least once every 6 hours
using an static IP to match / get time from or even random, i still get it off sync
Either way, the issue is, even if i only set time on database and all others get time from it, database still get off sync by 10 seconds every week (sometimes more)
For you, which is the most reliable way to keep it sync ? the one you use ?
1) use the proper settings for the ntp protocol. At no time after the first "time set" does this include "setting the time" again. Each time you do this, you delete all the sync data and syncing has to start again. Look up the ntp protocol and let the sync do its job without setting any more.
2) it is NOT important that the servers have the correct time. It IS important that they have the SAME time. So having one local server at your facility act as the Master is the best way to go. That one server would reach out to "the world" and get the correct time, and it would then share the correct time with the other servers in the cluster. There's an "iburst" protocol that allows the other servers to "trust" your primary server and sync quickly even after reboot.
3) I don't recommend "pool" based NTP as this is an attack vector for hackers. Try to find a government NTP site as close to your physical/ISP location as possible. And remember: having the exact time is not nearly as important as all servers having the same time. So an NTP server on the other side of the continent is fine. Being off by a quarter second makes no difference. And having several government servers spread out geographically means that an internet outage in one part of the country won't kill your NTP link, plus having more servers makes the correct time more likely (although, as I said, not very important).
4) The primary reason for external NTP is more of a "sanity check" to avoid your system becoming off by too much. Most NTP syncing will work as long as your system is not off by more than a minute or so, it'll squeeze your server back to the real time without damaging anything. But if your system manages to get off by 5 minutes or more, sync will fail and you'll need to set ... which should never happen, honestly, if sync is set up and you don't lose internet.