In early versions of VoltDB, all transactions were globally coordinated, using system time to order and schedule each transaction. As a result, even small differences in clock time between nodes could impact latency in the system.
Starting with version 3.0, transactions are no longer globally coordinated and differences in system clocks no longer directly impact database latency. However, there are still some 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. 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 10.1, “The Importance of Time” and Section 10.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.