AWS attempts to spread a whole extra second across its servers over a period of 24 hours to minimise UTC disruption
The last minute of June 30, 2015, will be 61 seconds long, as time scientists International Earth Rotation and Reference Systems (IERS) announced that we are just over one month away from a leap second. The extra second is implemented compensate for variation in the rotation of the Earth.
But how do computer systems deal with this extra second? Some systems can only handle up to the ‘:60’ second mark, causing mass malfunctions afterwards as they go out of synchronisation with ‘standardised civil time’.
Amazon Web Services plans to deal with the issue by actually making the entire day slightly longer for its servers, spreading out the extra second through the 12 hours either side of June 30th’s UTC 00:00:00.
On a blog post, Mingxue Zhao, Senior Product Manager at AWS, explained: “The AWS Management Console and backend systems will NOT implement the leap second. Instead, we will spread the one extra second over a 24-hour period surrounding the leap second by making each second slightly longer. During these 24 hours, AWS clocks may be up to 0.5 second behind or ahead of the standard civil time.”
It’s not just Amazon worried about the leap second either. Despite the occurrence having passed us by 25 times since 1972 (and the leap second taking place on June 30th 2012), the financial markets are getting scared, worried that the mini-Y2K will wreck stock systems.
AWS explained how at 11:59:59 AM June 30th, 2015, AWS clocks will be synchronised to UTC as normal. Then, starting from 12:00:01 PM, Amazon clocks will make each of their seconds 1/86400 longer to fall behind UTC. “The gap gradually increases to up to 1/2 second,” said Zhao. Then at 23:59:60 UTC, when the leap second is ‘injected’, AWS clocks end up being only half a second ahead of UTC. For the next 12 hours, Amazon’s slightly longer second means it keeps falling behind, but with the gap now closing towards the new UTC. Then at 12:00:00 PM July 1st, 2015, the gap shrinks to zero and AWS clocks synchronise to UTC again.
During 2012’s leap second event, websites such as LinkedIn, Reddit and Gawker all experienced technical difficulties, leading to issues in Java-based applications and servers running on Linux. These were using the Network Time Protocol (NTP), a networking protocol for clock synchronisation between computer systems used since 1985. But Amazon said it is leaving the time management of its EC2 instances under user control. “AWS does not manage instance clocks. An instance clock can be affected by many factors,” said the blog post.
“Depending on these factors, it may implement or skip the leap second. It may also be isolated and not synchronise to an external time system. If you need your EC2 instance clocks to be predictable, you can use NTP to synchronize your clocks to time servers of your choice.