PANIC NOW: Twitter Will Run Out Of Numbers In 2078
">Wikimedia CommonsAn oddly geeky announcement by Twitter caught our eye: Developer advocate Arne Roomann-Kurrik told programmers who build apps on top of the service that the company is moving from 32-bit to 64-bit user IDs. Hidden in the announcement's Web address was a jokey label: Roomann-Kurrik called it the "IDpocalypse."
What's the dire fate that Twitter is trying to avoid? Why does it need so many user IDs? After all, a computer can express almost 4.3 billion different numbers in the space of 32 bits.
We dug into this, and the reasons are interesting.
Twitter already moved to 64-bit IDs for tweets in 2009, and it's essentially adopting the same system, called Snowflake, for assigning IDs to users now.
Massive, real-time systems like Twitter need to have multiple database servers assigning IDs without coordinating with each other, as that would slow things down. (That's known as "sharding.") So within the 64 bits, some bits are dedicated to a timestamp, some to a machine ID, and some to a "sequence number" that helps make sure the ID is unique.
Instagram, the photo-sharing service, has a very similar system—it even considered adopting Twitter's Snowflake, but opted for a different approach.
So the bottom line is that Twitter isn't actually using all 64 bits to define a person—a certain percentage go to overhead because of the way its software is designed. Nevertheless, there will be plenty of IDs to go around—billions, certainly.
Here's what we're worried about now: Twitter's Snowflake is designed around an "epoch" of 69 years, according to its specs. So what happens in 2078 when the Twitter epoch expires, Mayan-calendar-style?
That's the real IDpocalypse.
We posed this question to Twitter's Roomann-Kurrik. His response:
We have a lot of time to worry about this. Might as well start now.