The War on Shopify: Performance as a Feature
By this point, Dukaan was a well-known name in the Indian market. We were growing fast. But to attract larger sellers and expand internationally, we were constantly being measured against the global titan of e-commerce: Shopify.
Suumit, my co-founder, was obsessed. He would spend his days and nights signing up for Shopify trials, analyzing their stores, and talking to merchants who used both platforms. He was searching for a weakness, a crack in their armor.
One night, he called me, buzzing with the energy of a general who has just found the enemy's secret weakness.
"Subhash, I've found it," he said, his voice a low, excited hum. "I know how we can win. Their stores are slow here. Really slow. A typical Shopify store takes three, sometimes four seconds to load for a customer in India."
He was right. Shopify's infrastructure was primarily based in North America. For their core market, it was fast. But for a customer in Delhi or Bangalore, every request had to make a journey halfway across the world and back.
"This is our opening," Suumit continued. "We can't out-feature them right now, they have a 10-year head start. But we can be faster. Not just a little faster. What if we could be instantly fast, everywhere in the world? That's a feature no one can ignore."
That conversation changed everything. Our company's mission shifted. We were no longer just building an easy-to-use e-commerce platform. We were on a quest to build the fastest e-commerce experience on the planet. To do that, I first had to understand the fundamental physics of our new enemy: latency.
Technical Deep Dive: The Physics of the Internet
Why was a Shopify store hosted in the US slow in India? The answer has less to do with server power and more to do with the laws of physics.
Concept: Latency is the Real Bottleneck
When you measure how long a website takes to load, you're measuring two things:
- Processing Time: How long the server takes to think, query the database, and build the page.
- Network Time: How long it takes for your request to travel to the server, and for the server's response to travel back to you.
We had spent all our time so far optimizing the processing time. But the network time is governed by a hard, unbreakable physical limit: the speed of light.
Data on the internet travels through fiber optic cables at roughly two-thirds the speed of light. The distance from Mumbai, India, to a data center in Virginia, USA (a major hosting hub), is about 13,000 kilometers. A round trip for a single packet of data is 26,000 km.
Let's do the math:
- Speed of light in fiber: ~200,000 km/second
- Round Trip Distance: 26,000 km
- Minimum Theoretical Time: 26,000 km / 200,000 km/s = 0.13 seconds or 130 milliseconds (ms).
This is the Round Trip Time (RTT). 130ms is the absolute fastest a single conversation between your browser in India and a server in the US can ever be.
But loading a secure webpage isn't one conversation; it's a series of them that must happen in order:
- DNS Lookup: "What's the IP address for this domain?" (1 Round Trip)
- TCP Handshake: "Hello server, I'd like to start a connection." (1 Round Trip)
- TLS Handshake: "Let's establish a secure, encrypted connection." (2 Round Trips)
- HTTP Request: "Okay, now please send me the actual webpage." (1 Round Trip)
Just to get the first byte of the HTML page, a user in India had to wait for at least 5 round trips.
5 round trips * 130ms/trip = 650ms
This meant a Shopify store hosted in the US was guaranteed to have at least a 650ms delay for an Indian user before anything even started to appear on the screen. And that's before accounting for network congestion and the time it takes to download all the images, CSS, and JavaScript files. The 3-4 second load times were inevitable. It was a tax imposed by physics.
We couldn't make the speed of light faster. We couldn't move our users closer to Shopify's servers. So, we decided to do the only other thing possible.
We would move our servers closer to our users. Everywhere. At the same time. We were about to enter the world of Edge Computing.
Part 2: The Evidence and the Smoking Gun
We had a theory, rooted in the laws of physics, that our biggest competitor had a critical weakness. But a theory isn't enough. To justify a massive engineering effort and a company-wide shift in strategy, we needed cold, hard data. We needed to prove it.
So, we went public. In a series of posts on X (formerly Twitter), I laid out our argument for the entire world to see. I made a bold, direct claim: "Shopify has a SERIOUS performance problem."
The Evidence: The Top Indian Brands
We didn't just make claims; we showed our work. We took four of the top, most respected D2C brands in India, all running on Shopify, and put them to the test: boAt, Bummer, Urbanmonkey, and Hammer.
We ran their homepages through standard performance analysis tools from an Indian test location. The results were clear and consistent: slow load times, poor performance scores, and a sluggish user experience.
Our public campaign started to get attention, and it even drew a response from Shopify's own Director of Performance Engineering, Colin Bendell. He dismissed our findings, attributing the slowness to a common scapegoat: "Shouldn't be these days, most common issue is 3P content" (third-party content).
He was suggesting the problem wasn't Shopify's platform, but the seller's own apps, analytics scripts, and marketing tags. It was a plausible explanation, and it put the blame back on the merchants. But we knew he was wrong, and we were determined to prove it.
The Smoking Gun: The Canada vs. India Test
To disprove the "3P content" theory, we designed a simple but devastating experiment. We took the same stores-boAt and Bummer-and ran the performance tests again. But this time, we ran two tests for each store side-by-side, changing only a single variable:
- Test A: Location set to India.
- Test B: Location set to Canada, Shopify's home turf.
The results were night and day. As I showed in my tweet, Bummer's store in Canada was no longer a bummer-it was fast. The boAt store flew. The third-party content-the scripts, the apps, the widgets-was identical in both tests. The only thing that changed was the physical location of the user.
This was our smoking gun. The problem wasn't the sellers' apps. The problem was Shopify's core infrastructure. It was fast in Canada and slow in India.
#### **Technical Deep Dive: TTFB is the Smoking Gun**
The crucial metric that exposed the truth was the TTFB, or Time to First Byte.
TTFB is a pure measure of a server's responsiveness and the network latency between the user and that server. It's the time that passes from the moment your browser asks for a webpage to the moment it receives the very first byte of the HTML document. This measurement happens before your browser starts downloading large images or executing any of that heavy third-party JavaScript.
Our tests revealed the shocking truth from my tweets:
- The TTFB was 7x higher for boAt in India compared to Canada.
- The TTFB was 3x higher for Bummer in India compared to Canada.
As I demonstrated publicly, if you opened the boAt website in India and looked at the "Network" tab in your browser's developer tools, you would see the main document request taking over 1.06 seconds. A one-second wait, just for the server to send back the first tiny piece of a 98KB text file!
This was the "speed of light tax" in action. That one-second delay was the undeniable proof of a journey across the globe. It proved that Shopify's core architecture was centralized in North America. They didn't have the "right" technology to serve a global audience with the performance they deserved.
Concept: What is Edge Computing?
We had found the crack in Goliath's armor. The problem was distance. The solution, therefore, had to be to eliminate that distance.
You can't beat the speed of light. But you can cheat. You can shorten the race.
This is the core principle of Edge Computing.
Edge computing is an architectural approach that, instead of processing data in a centralized cloud (like a single data center in North America), moves the computation and data storage as close to the physical location of the user as possible.
Instead of one giant, central brain in one country, you build a network of smaller, synchronized "mini-brains" (or edge nodes) in dozens of cities all over the world. When a user in India tries to access your service, they don't talk to the main brain in America. They talk to the local mini-brain in Mumbai or Delhi.
Shopify's architecture was centralized. Ours would be distributed. They forced the user to travel to the server.
We would bring the server to the user. This was the foundational idea behind the Dukaan Global Edge Network.
Excellent. This is a crucial part of the story. The public battle with Shopify and the success of our edge network didn't just validate our work-it attracted a whole new class of attention, leading to a new, even bigger scaling challenge.
Here is the story of how we onboarded our first enterprise juggernaut, and how it forced us to evolve our database architecture once again. This new chapter will fit perfectly after our deep dive into the edge network.