
In 2014, a simple counting glitch known as the “Gangnam Style bug” forced YouTube to completely rewrite its core software architecture—because the site’s engineers had used a 32-bit integer to count video views, never imagining a single music video would surpass 2.1 billion views and completely max out the platform’s counter.
In 2014, a simple counting glitch known as the “Gangnam Style bug” forced YouTube to completely rewrite its core software architecture—because the site’s engineers had used a 32-bit integer to count video views, never imagining a single music video would surpass 2.1 billion views and completely max out the platform’s counter.

In December 2014, YouTube posted a short, mildly sheepish news that delighted developers around the planet.
“We never ever before reckoned a video clip would understandably be shadowed in numbers greater than a 32-particle integer,” it read, “but that was in the past we delighted Psy.”
The video clip in perturb was “Gangnam Layout,” the foregone 2012 hit by South Korean artist Psy — the one with the horse-riding dance that usurped the totality planet for a year. It owned become the most-shadowed video clip in YouTube’s history. And also it owned simply done something unquestionably no video clip owned ever before done in the past: it owned run applicable into the mathematical ceiling of how the internet site counted pertains to.
The counter owned, rather literally, run out of numbers.
The digit 2,147,483,647
To become aware what occurred, you ultimatum one fact about how computer systems storefront numbers — the super same fact that defines a startling digit of renowned software caprices.
As shortly as a developer arranges a place to storefront a digit, they have to make a choice ahead of time how much void to enact on it. One prevalent selection is a “32-particle integer” — a digit saved utilising 32 binary numbers. It’s beneficial and auxiliary than significant enough for most purposes. Yet it owns a hard ceiling. The biggest worth a perfunctory signed 32-particle integer can hold is selectively 2,147,483,647 — simply over 2.1 billion.
That digit is not arbitrary. It drops out of the math of 32 binary numbers the super same means 999,999 is the ceiling of a 6-digit odometer. Matter one past it, and there’s unquestionably no place to slumped the next off digit. The counter can’t go any greater.
As shortly as YouTube’s designers first put up the regard counter, they opted a 32-particle integer. It was a effortlessly easy to understand verdict. 2 billion is an excessive digit of pertains to. In the early days of YouTube, the pointer that a singular video clip might be shadowed auxiliary than two billion times would understandably have seemed sarcastic — auxiliary than as shortly as for every two humans that have ever before owned net access. Why solicit auxiliary void for a digit unquestionably no video clip might ever before plausibly reach?
After that “Gangnam Layout” reached it.
The video clip that poverty-stricken the ceiling
“Gangnam Layout” was not a ordinary viral hit. It was a international phenomenon of a kind the net owned sincerely never ever before watched in the past.
Launched in July 2012, it became the first YouTube video clip ever before to reach one billion pertains to. It kit Guinness Earth Documents. It was shadowed, re-shadowed, parodied, and played at weddings and underscoring off pods across the planet. The pertains to stored unborn, year after year, long after most viral video clips would understandably have faded — and they collected together, non-stop, towards a digit nobody at YouTube owned ever before all detected for.
In late 2014, the matter climbed to 2,147,483,647 — the exact maximum a 32-particle integer can hold. And also there it distressed versus the edge of what the system might stand for.
This is the super same integral quirk behind other renowned software stories — the Pac-Male “kill brandish” at degree 256, in which an 8-particle digit runs out of void. “Gangnam Layout” was the super same pointer, simply at a substantially larger scale: an 8-particle digit apexes out at 255, a 32-particle digit at 2.1 billion. Psy owned simply grossed a video clip progressive enough to position the ceiling that virtually nothing else on the net might reach.
The mend was less center than the tale cases
Correct here’s in which the progressive iteration of the tale regularly tends to exaggerate points. It’s oftentimes claimed that “Gangnam Layout” obliged YouTube to rebuild its software in a panic. That’s not rather what occurred.
The mend was real, but included. YouTube revamped the regard counter from a 32-particle integer to a 64-particle one. A 64-particle integer utilises 64 binary numbers instead of 32, and that increasing of numbers doesn’t merely double the ceiling — it boosts it astronomically. The brand-progressive maximum is 9,223,372,036,854,775,807. That’s about 9.2 quintillion — 9 billion billion.
To slumped that in point ofview: at the brand-progressive outskirt, a video clip might shelf up a billion pertains to every singular day for over 25 million years in the past sprinting out of void. The ceiling owns, for all valuable purposes, been outlying entirely.
And also it wasn’t a frantic emergency. Google afterwards oriented press correspondents that its designers owned watched the milestone unborn months ahead of time and owned in consonance updated the system to design for it. The provable “in the past we delighted Psy” news was a particle of fun, not a confession of cataclysm. The counter was revamped; YouTube stored sprinting; virtually nobody discovered any disturbance at all.
Guinness Earth Documents even conferred “Gangnam Layout” an police title for the party: the first YouTube video clip to phone call for a 64-particle counter.
Why a counting outskirt is well worth remembering
It would understandably be rudimentary to reward this as a throwaway particle of trivia. Yet it captures something sincerely real about how innovation avails put up.
Every system ever before grossed contains quiet guesses about how significant points will avail. How most pertains to a video clip might retrieve. How most numbers a year might ultimatum. How most debtors might indicator up. Most of those guesses are judicious, and most of them hold for years. The 32-particle counter wasn’t a creep — it was a effortlessly easy to understand selection that simply got defeated by a fact nobody might have forecasted as shortly as it was grossed.
“Gangnam Layout” didn’t reprieve YouTube because YouTube was improperly put up. It hit the outskirt because Psy did something sincerely unprecedented — grossed a singular piece of web content so around the world, durably progressive that it pressed past a outskirt the designers owned every component to think was guard.
The ceiling is much greater presently. A video clip would understandably ultimatum 9.2 quintillion pertains to to position it again — a digit so significant that, stymying something detailed stranger than “Gangnam Layout,” unquestionably no piece of web content ever before will.
Yet then again, that’s virtually selectively what they claimed the last time.
Collected with AI assistance. Weighed by the Earn Modern technology Easier content team in the past publication. Go to our content system and about page.
Around this short post
This short post is for basic explanation and representation. It is not specialist pointers. For your information situation, call a enlightened specialist. Content system →