"The big thing about a sale is that it helps you generate a lot of data," says Ajit Narayanan, Myntra's CTO. "You hear a lot about the sales amount, and the revenue, but the consumer data has so much real value, to build a better experience for our users."
Myntra is focusing a lot on how artificial intelligence and machine learning can help build a better experience, and for this to work, it needs a lot of data from users. That's where big sales come into the picture, bringing in as much data in a single day, as the company would normally get over months.
For most e-commerce companies, Diwali is the big sale of the year. It involves a lot of advance planning to deal with the rush of people, and it serves as a proving ground for companies' infrastructure and technology. However, for companies in the fashion vertical - where the two major brands are now under a single umbrella, after Flipkart acquired Myntra in 2014, and then Myntra acquired Jabong this year - "end of season" is most important, and the next one is about to start in a week, at the beginning of January.
Gadgets 360 met with Myntra's CTO, Ajit Narayanan, to talk about how the company is preparing for the next big sale, and the role artificial intelligence and machine learning plays in this. We met at Myntra's office near Electronic City in Bengaluru - from the outside, it's your typical glass-fronted modern office building in the middle of nowhere, but once you walk in, the layout is such that the reception looks like it's outdoors, with park benches and shop windows for fashion brands on all sides. Myntra wants to make it very clear that, apart from being an e-commerce company, it sees itself as a fashion brand.
When it comes to its big sales though, Myntra - like everyone else in the game - needs to focus on the technology side of things, so that it can keep servicing customers despite sudden spikes in traffic. "At the highest point, the number of orders per minute goes up by 350 times. This is not sustained through the entire sale of course, but even so, you see something like a 25x increase in traffic."
That's a huge surge in comparison to, for example, the 10x surge Snapdeal observed during its recent sale. Of course, the relative size of the base audience is a factor as well, but from a technology perspective, it's the sudden spike that's often more challenging than the total volume.
(Also see: Myntra Moves Towards Profitability, With an Eye on Machine Learning)
"We've done this a few times now, and we realised that planning for this had to become a part of our process, it wasn't something that we could just start doing a couple of months in advance," says Narayanan. "The way we develop and test has changed. Today, we simulate this load using user agents, that are almost like bots. We take the user data we have, and use algorithms to work out how the expected volume of users will behave."
"So you can tell how many people will just browse around, how many people will add things to the cart but then stop, how many will go to the checkout," he adds, "you can chart out the funnel. Then we use the user agents to test out our compute power, our networking, and storage, among other things."
This testing is done on Myntra's live servers even as customers are shopping, because according to Narayanan, "simulation will only take you so far." Some of this can cause servers to fail, but at this point, there's not enough actual traffic that it can cause a major issue, and much of the testing occurs late at night so as to be less of a disruption to day to day business.
By doing this, Myntra is able to pinpoint weaknesses that need to be augmented, and areas where it needs to scale up - though Narayanan says that it's not about finding a brute force solution either. "Because afterwards, we would have to scale back," he says, adding that at the infrastructure level, Myntra will sometimes 'borrow' compute power from sister concern Flipkart.
"We learn from each other, so they've picked up some of our innovations, we've learned from them how to effectively apply the brakes," he adds.
This is done by a process that the company calls throttling. "Whenever there is too much load, we can basically create a queue," Narayanan explains. "Because the way the funnel is designed, you know that the largest number of people will be browsing, so the system is in place to handle that, then they will go to cart, and then to checkout. We can throttle at any point in the funnel, so if browsing is working fine, you will still be able to look at more items, but won't be able to purchase them for a few seconds."
To help reduce the dependence on throttling, Myntra has also introduced a new concept to its sale flow, called Price Reveal, which Flipkart might follow suit on. Essentially, it reveals the discounted prices of products a full day before the sales begin. This allows people to browse the catalogue, and identify the products they want, so that they can save them to wishlists, or bookmark the pages.
"Basically, it reduces the chaos on the moment of the sale, when we're getting slammed with users," Narayanan explains. "People can look around and there's no option to buy on that page, so there's no stress to it, just take it easy, plan out your shopping."
This way, when the time for the sale comes, at least one chunk of users will skip straight to the checkout line, reducing the spike on other areas. But this brings its own challenge.
"Typically, the funnel is widest right at the top, where people are browsing, right?" says Narayanan. "But with the price reveal, we're putting the pressure straight on the cart. So now we have to deal with this extra pressure."
Myntra has come up with an inserting solution that it will be trying for the first time during the upcoming sale - games. The idea is simple - offer people a chance to get ahead of the queue and shop before the sale officially starts, if they're willing to play a few games, such as a memory matching game.
"There are four games in all, which will go up soon, for the first time," says Narayanan. "The idea is that it helps people to engage with the brand, and by allowing some of the people to shop early, we can reduce the spikes, and spread them out more. Sustained traffic is not the problem, just those sudden spikes."
Of course, like Snapdeal, Myntra sees year round benefit from the innovations it brings in place. AI is one of the areas where this helps. "One of the first applications of artificial intelligence was in payments," explains Narayanan. "It takes into account the time, card you are using, and the amount you're transacting, and more data, to predict which payment gateway will have the highest success rate. This is a decision that requires such a large volume of data that you can't do it with manual intervention, it can only be done through AI."
And it's paid off at other points already. During Cyclone Vardah, many digital payments, which were routed through Chennai, couldn't be completed. Myntra didn't even notice at first, Narayanan claims. "People were calling us up to ask how we've been affected and our data didn't have a blip," he says, "because the system realised that there is some problem here, so let's not use this right now. That's not something you could have planned for."