In VoltDB, differences in system clocks do not directly impact database latency since each partition operates indpendently. However, there are several database activities that need to be globally managed, such as when the database starts or failed nodes rejoin the cluster. For these activities, differences in clock time can impact — or, if the skew is large enough, even interrupt — proper operation.
That is why it is important to ensure a stable and consistent view of time within a VoltDB cluster using a time synchronization service such as NTP or chrony. This chapter presents some best practices for configuring and managing time using NTP.
If you are familiar with NTP or another service and have a preferred method for using it, you may want to read only Section 11.1, “The Importance of Time” and Section 11.2.2, “Troubleshooting Issues with Time”. If you are not familiar with NTP, this chapter suggests an approach that has proven to provide useful results in most situations.
The following sections explain:
Why time is important to a VoltDB cluster
How to use NTP to manage time across the cluster
Special considerations when using VoltDB in a hosted or cloud environment
Because certain operations require coordination between the server nodes, it is important that they agree on what time it is. When the database process starts, VoltDB determines the maximum amount of skew (that is, the difference in clock time) between the individual nodes in the cluster. If the skew is greater than 200 milliseconds (2/10ths of a second), the VoltDB cluster refuses start.