I've built my own digital signage solution based around the Raspberry Pi. Basically all of the Pi's are scattered around one city in the midwest (for now), and they ask for hourly updates from a VPS that happens to be physically located in Dallas. The actual displaying by the Pi is done via a webapp in chromium that opens on boot, and uses javascript to cycle through content at defined intervals.
As an example, say two of these displays are in the same location, each changing the image on the screen every 4 seconds. And assume for the hour starting at 15:00, they are given the same list of content to cycle through by the server. When 15:00 rolls around, both display content item A, wait 4 seconds, display content item B, etc. before coming back around to A again.
As the raspberry pi has no real time clock chip, both would be getting all of their time information via NTP. ntp.conf tells me:
"pool.ntp.org maps to about 1000 low-stratum NTP servers. Your server will pick a different set every time it starts up."
And this works well almost all of the time, as these two screens would appear to be perfectly synchronized,changing to the same thing at the same time, but every now and then I catch them de-synced for a little while.
My theory is that since they are selecting different NTP servers from the pool (and maybe some of these are far away etc.), they are getting different enough time updates for one to think it is 15:00:005 and the other to think it is 15:00:00.
Finally arriving at the question (sorry), would it be worth it for me to set up my Dallas server as the only NTP server for all my scattered Pi's? Even if the Dallas server is wrong by a few seconds, at least they would all be synchronized, ignoring the fact that one Pi's data may take a different route to Dallas than another's, therefore making the time update slightly incorrect. To clarify, I don't care if the Pi thinks it's 15:00:005 when it's actually 15:00:00, I just want them ALL to think it's 15:00:005.
Maybe I'm worrying about it too much, or underestimating the accuracy of 3-4 low-stratum NTP servers even if they are far away. Thought it would at least be an interesting question. Thanks in advance!
答案 0 :(得分:2)
取决于您的错误窗口(看起来非常狭窄)