Chapter 16

The Whale: Onboarding an Enterprise Juggernaut

Subhash Choudhary · 5 min read

Our public performance tests and the story of the Shark Tank effect started making waves in the Indian D2C community. Our message was clear and backed by data: Dukaan was faster than Shopify. This bold claim acted like a magnet, attracting not just the small sellers we had started with, but also much bigger fish.

One day, Suumit got a call that made us all stop in our tracks. It was from the leadership team at Wow Skin Science, one of the largest and most successful D2C brands in India. They were a 1000-crore-a-year behemoth. They had seen our claims, and they were intrigued, but deeply skeptical. Their challenge was simple: "Prove it."

This was the beginning of a new chapter, one that would force us to move beyond a one-size-fits-all platform and build a true enterprise-grade solution.

Part 1: The Challenge and the "Oh Shit" Moment

The team at Wow Skin Science was sharp. They agreed to a one-week trial. They wouldn't move their whole store, but they would run a small, targeted campaign to a landing page hosted on Dukaan. They wanted to see our edge network in action with their own real-world traffic.

For that week, our entire team was on high alert. We watched the dashboards as their campaign traffic came in. And our platform performed flawlessly. The pages loaded in the blink of an eye, the user experience was fluid, and our performance claims were validated with their own data. They were impressed.

A week later, they called back.

"We're convinced," their Head of Technology said. "The performance is incredible. We want to migrate our entire operation-our full catalog, our millions of customers, our entire 1000 crore/year business-to Dukaan."

The initial reaction in our team Slack was pure euphoria. This was the ultimate validation of everything we had built. Landing a client of this magnitude would change the trajectory of our company overnight.

Then, the euphoria was replaced by a quiet, collective "Oh, shit..." moment of terror.

The scale of Wow Skin Science was unlike anything we had ever handled. Their order volume was projected to be 20 times greater than the current total volume of all our other 5 million stores combined. A single one of their new product launches would generate more traffic than the Jain Shikanji Shark Tank spike.

We were staring at a whale, and we had to figure out how to get it into our boat without sinking the entire fleet.

Identifying the Problem: The "Noisy Neighbor"

Our global edge network was designed to handle massive read traffic. But the write traffic-the new orders, the customer signups, the inventory updates-all eventually had to be processed by our single, central master PostgreSQL database in Mumbai.

Until now, this was fine. Our millions of small sellers created a predictable, distributed load. But Wow Skin Science was different. They were a single entity that could generate an apocalyptic amount of write traffic in a very short period of time.

This created the classic "noisy neighbor" problem.

Conversely, a viral moment from one of our millions of smaller stores could, in theory, cause a tiny slowdown that would impact Wow's critical operations. For a brand of their size, this shared risk was a non-starter. We couldn't put the whale in the same fish tank as everyone else. We had to build them their own, private ocean. This led us to our first real implementation of database sharding.

Part 2: The Enterprise Fortress

The architectural solution was clear: we had to isolate them completely. We couldn't just give them more powerful servers; we had to give them their own, dedicated infrastructure, starting with the database.

Technical Deep Dive: What is Database Sharding?

We had already scaled our database reads using replicas. But sharding is a technique for scaling database writes.

In technical terms, sharding is a type of horizontal partitioning. Instead of just having one master database, you have multiple master databases, and a routing layer in your application decides which database to talk to for any given request.

Our Implementation: A Shard per Enterprise

We designed a simple but incredibly powerful sharding strategy.

This required a significant change in our application's core logic. We had to build a "shard router" into our code. Before our application executed any database query, it would first perform a simple check:

This logic was implemented across our entire codebase, ensuring that the data and the workload for our enterprise clients and our public sellers would be completely isolated from each other, from the moment the request first hit our application.

The Benefits of the Fortress

This architecture solved the "noisy neighbor" problem perfectly.