How Cloudflare Uses Lava Lamps to Encrypt the Internet
Cloudflare's San Francisco office has a wall of 100 lava lamps generating entropy for SSL/TLS encryption. Here's why computers can't be truly random.
Written by AI. Dev Kapoor
February 28, 2026

Photo: The PrimeTime / YouTube
In Cloudflare's San Francisco headquarters, there's a wall of 100 lava lamps doing something that sounds absurd: helping to encrypt a significant portion of internet traffic. Visitors can walk up to the lobby, stand in front of the glowing, undulating display, and become—briefly—part of the cryptographic infrastructure securing millions of websites.
This isn't performance art. It's a solution to one of computing's most persistent problems: computers are terrible at randomness.
The Problem: Computers Are Predictable by Design
Programmer and streamer ThePrimeagen recently walked through Cloudflare's lava lamp setup in a video that crystallizes why this matters. The core issue is deceptively simple: "Ultimately, a computer breaks down to just a series of if statements," he explains. Even sophisticated systems—large language models, complex algorithms—are deterministic at their foundation. Given the same input, they produce the same output. That predictability is exactly what makes them useful for most tasks.
But for encryption, predictability is poison.
Every SSL/TLS connection—the secure channels that protect your banking transactions, your Signal messages, your medical records in transit—depends on encryption keys that must be genuinely unpredictable. If an attacker can guess or predict the key, they can decrypt the data. The standard solution is pseudo-random number generators (PRNGs), which use algorithms to produce sequences that look random but are ultimately deterministic.
And deterministic means vulnerable.
When Predictable Randomness Breaks Bad
ThePrimeagen demonstrates this vulnerability live in his video, using just a few outputs from JavaScript's Math.random() function to predict subsequent values with perfect accuracy. "Now I'm sure there's a bunch of you right now like, 'Nah, that guy probably cheated. There's just it ain't possible to predict this kind of randomness,'" he says. "Well, it actually turns out no. A lot of random number generators you use are actually quite predictable."
The real-world consequences show up in places like casinos. A team of Russian hackers famously exploited predictable PRNGs in slot machines, streaming video of gameplay back to St. Petersburg where analysts reverse-engineered the machines' random number generation. They'd watch the game unfold, calculate the exact moment when the odds shifted favorably, then send a vibration to the player's phone—accounting for half a second of transmission lag plus 250 milliseconds of human reaction time. The result: roughly $250,000 per week from machines scattered globally, all because their randomness could be predicted.
Scale that vulnerability to internet encryption, and you're looking at a catastrophic scenario. If someone could predict Cloudflare's random number generation, they could potentially decrypt portions of global internet traffic—not through brute force, but through pattern recognition.
Enter the Lava Lamps
Cloudflare's solution is elegantly analog. A camera continuously photographs the wall of 100 lava lamps. Each lamp contains wax that, once heated, flows upward in constantly shifting patterns—sometimes blob-like, sometimes tubular, always different. The camera captures every pixel: luminosity variations, color saturation shifts, the interplay of light and shadow. When someone walks in front of the display, they become part of that captured chaos.
All of this visual data feeds into what's called a cryptographically secure pseudo-random number generator (CSPRNG)—a PRNG that meets stricter standards for unpredictability. The lava lamp imagery provides entropy: genuine disorder harvested from the physical world.
But Cloudflare doesn't rely solely on lava lamps. The system combines this visual entropy with randomness from two separate Linux machines (which gather their own entropy from system events—disk timing variations, network packet intervals, thermal noise). This layered approach means that even if someone covered the cameras, the system would continue generating sufficiently unpredictable data.
"So that means even if the cameras were to go down, they would actually continue to produce very random nature," ThePrimeagen notes. "You wouldn't be able to go, okay, the cameras are down for the next 20 minutes. We can guess."
Physical Chaos at Scale
What's particularly interesting is how Cloudflare's other offices implement the same principle through different physical systems. The London office photographs a double pendulum—a pendulum attached to another pendulum, creating mathematically chaotic motion that's impossible to predict beyond a few seconds. Singapore measures radioactive decay from a uranium pellet, exploiting quantum randomness at the atomic level.
Each approach captures something genuinely unpredictable from the physical world. "The real world is unpredictable whereas computers are just simply predictable," as ThePrimeagen puts it.
This isn't even a new idea. Silicon Graphics built a similar system called LavaRand back in 1996, though their patent has since expired. What Cloudflare brought was scale and operational redundancy—multiple entropy sources, multiple locations, systems designed to keep functioning even if individual components fail.
What This Reveals About Infrastructure
The lava lamp wall is often treated as quirky tech company decor—like Google's dinosaur skeleton or Amazon's Day 1 building. But it's actually infrastructure, doing real cryptographic work 24/7. The fact that it sits in a public lobby where anyone can see it and influence it isn't a security flaw; it's additional entropy.
This creates an odd situation where the most secure randomness generation happens in one of the most transparent ways possible. There's no black box here, no proprietary algorithm. Just a camera, some wax, and the fundamental unpredictability of physical systems.
It also highlights a tension in how we build secure systems. We've spent decades optimizing computers to be more deterministic, more reliable, more predictable. Then we need to bolt on physical randomness generators because that very predictability becomes a vulnerability in cryptographic contexts.
The question isn't whether Cloudflare's approach is clever—it demonstrably works. The question is what it says about the foundations of our secure infrastructure that we need to harvest chaos from lava lamps to make encryption trustworthy. And whether, as cryptographic demands increase and quantum computing threatens current encryption methods, we'll need even more creative sources of physical entropy.
For now, those lava lamps keep bubbling. And every time the wax shifts, another imperceptible contribution to keeping the internet secure.
—Dev Kapoor
Watch the Original Video
Cloudflare’s Lavalamp Obsession
The PrimeTime
10m 27sAbout This Source
The PrimeTime
The PrimeTime is a prominent YouTube channel in the technology space, amassing over 1,010,000 subscribers since its debut in August 2025. It serves as a hub for tech enthusiasts eager to explore the latest in AI, cybersecurity, and software development. The channel is celebrated for delivering insightful content on the forefront of technological innovation.
Read full source profileMore Like This
Musk's Digital Optimus: AGI Vision Meets Project Chaos
Elon Musk announces Digital Optimus AI to automate office work, but leaked reports reveal the project collapsed at xAI. What's really happening?
Cloudflare Just AI-Cloned Next.js and Open Source Is Shook
Cloudflare used AI to recreate Next.js in a week. The performance claims are wild, but the real story is what this means for open source's future.
Quantum Computing Finally Found Its Killer App: Breaking Stuff
Google just moved up the timeline for quantum computers to break encryption to 2029. After decades of promises, code-breaking is what quantum actually does.
Dozzle: The Docker Log Viewer That Does Less (On Purpose)
Dozzle is a 7MB tool that streams Docker logs to your browser. No storage, no database, no complexity. Better Stack shows why that's the point.