Chapter 14

The Shark Tank Effect: A Trial by Fire

Subhash Choudhary · 4 min read

In the Indian startup ecosystem, there is no greater, more terrifying, and more coveted event than the "Shark Tank Effect." When a small business is featured on the massively popular TV show Shark Tank India, their website traffic doesn't just increase; it experiences a near-vertical surge of hundreds of thousands of curious viewers in a matter of minutes. It is the ultimate trial by fire for any e-commerce platform.

We thought our new Kubernetes cluster was ready for it. The truth is, no centralized system ever could be.

Part 1: The Impossible Spike

It was a quiet Thursday evening. The on-call engineer was handling a few minor alerts. At 9:45 PM, the message dropped into our company Slack: "GUYS! JAIN SHIKANJI IS ON SHARK TANK RIGHT NOW!"

Everyone immediately opened our Grafana monitoring dashboard. We were all looking at the same graph: "Concurrent Users." The line, which had been hovering around a few hundred, suddenly became a vertical wall. It shot past 10,000, then 30,000, then 50,000, peaking at an astonishing 80,000 concurrent users.

A nervous silence fell over Slack. In our heads, we were all doing the math. Our storefront-service was running on 10 Pods. Even with our best optimizations, there was no way those 10 Pods could handle 80,000 simultaneous users. We were all watching the "Pod Count" graph, waiting for our Horizontal Pod Autoscaler to kick in and start its heroic scaling.

But a strange thing was happening. The user traffic was at an impossible peak, yet the CPU on our 10 Pods in Mumbai was only slightly elevated. The HPA, seeing that the CPU wasn't hitting its 70% crisis threshold, was barely adding any new Pods. The site remained lightning fast. There were no alerts. Nothing was breaking.

A senior engineer broke the silence in Slack: "I don't understand. The math doesn't add up. How are 10 pods serving 80,000 concurrents without melting? The HPA hasn't even had time to react yet. What is going on?"

He was right. We all felt it. The fortress was holding, but not for the reason we thought. We had survived, but it felt like we had accidentally discovered a secret superpower we didn't know we possessed.

Technical Deep Dive: The Limits of Reactive Autoscaling

To understand the mystery of that night, you first need to understand why our planned defense, the HPA, would have failed.

A typical autoscaling loop, like the one used by Kubernetes HPA, is reactive. It doesn't anticipate traffic; it reacts to its effects. The process has several steps, and each step takes time:

The total time from the initial traffic spike to new Pods actually serving users can easily be two to five minutes.

Why the HPA Fails Against a "Flash Flood"

The "Shark Tank Effect" is not a rising tide; it is a tsunami. The traffic goes from near-zero to its absolute peak in less than 60 seconds.

By the time the HPA could have scaled our cluster from 10 Pods to the 150 it would have needed, the initial, crushing wave of 80,000 users would have already overwhelmed and crashed the original 10 Pods a dozen times over.

So, if the HPA was too slow to be the hero, what saved us?

The reason we survived was not because our central Kubernetes cluster in Mumbai scaled in time. It survived because the vast majority of that 80,000-user load never even reached our central cluster.

It was absorbed and served by a highly scalable, massively distributed edge network we had already built for a completely different reason: the quest for ludicrous speed. This network acted like a global shock absorber, distributing the force of the tsunami across dozens of smaller locations before it could ever reach our main city. The story of how and why we built that network is the next chapter in our journey.

The Jain Shikanji incident was a watershed moment for us. It was an accidental discovery of our platform's hidden power. But that power wasn't an accident at all. It was the direct result of a deliberate and obsessive quest we had embarked on months earlier. A quest to solve a problem that had nothing to do with traffic spikes, and everything to do with our biggest global competitor.

This is the story of how we declared war on Shopify, and how we decided to make speed our single most important feature.