Shift to Ruby helped Twitter survive election night

People sent more than 31 million election-related tweets on Tuesday, says Twitter – and the Fail Whale was nowhere to be seen.

The company credits this to its recent move from Ruby to Java for its backend software.

“Over time, we have been working to build an infrastructure that can withstand an ever-increasing load. For example, we’ve been steadily optimizing the Ruby runtime,” says Mazen Rawashdeh, VP of infrastructure operations engineering.

“And, as part of our ongoing migration away from Ruby, we’ve reconfigured the service so traffic from our mobile clients hits the Java Virtual Machine (JVM) stack, avoiding the Ruby stack altogether.”

The company’s released a set of stats for our delectation, including the fact that at 327,452 tweets per minute, this was the highest volume of election-related chitter-chatter in the company’s six years of existence.

At its highest, the rate hit 15,107 tweets per second at 8:20pm PT. This, rather reassuringly, shows that the election attracted more attention than New Year’s Eve, at 6,939 tweets per second; the end of a soccer game, at 7,196 – or even Beyonce’s pregnancy announcement, which hit 8,868 tweets per second.

The pattern of usage, too, was different, with most spikes in the past generally short-lived.

“Those spikes tended to last seconds, maybe minutes at most. Now, rather than brief spikes, we are seeing sustained peaks for hours,” says  Rawashdeh. “We also saw this during the NBA Finals, Olympics Closing Ceremonies, VMAs, and Hip-Hop Awards.”

And they didn’t all come from Donald Trump.