AWS Startups Blog

Mobile Personalization for 125 Million Users on AWS

quettra mobile personalization

Quettra is a mobile intelligence platform that developers around the world can use to make their offerings more personal, more engaging, and ultimately smarter from the very first time a user opens their app. Here’s a Q&A with Ankit Jain, Founder & CEO of Quettra, Inc.

Every founder has an interesting story. Tell us how Quettra got started.

First of all, thank you for having me here to share our story. Quettra started out of a very simple need: Every app developer needs to understand their mobile users at a deeper level than simply the basic statistics, such as the number of times users launch an app, the length of the sessions, and the number of clicks.
When I was at Google, leading search and discovery for Google Play, my team improved the user experience within Google Play by building on previously successfully Google products. Google Play Music, for example, can learn the musical preferences of users from their YouTube watch history. As a result, each new Google Play Music user gained a feature that would traditionally be possible only after months of product usage!

Seeing this incredible experience come to life was an eye-opening moment for me; its potential impact was clear, but the technology was limited to large companies like Google. Providing this platform to every developer was the dream from which Quettra was born.

What are some challenges you faced as you brought your company to market?

Personalization is a very interesting space. When it works, it’s magical. When it doesn’t, it’s embarrassingly bad. Most lab ideas never see the light of day in a production environment at a meaningful scale. We’ve been fortunate to have some wonderful alpha and beta partners who have helped us tune our systems and improve our offering. In addition, our test bed has involved over 125 million users! That’s a scale most startups in our space can’t imagine.

And where does AWS fit in?

Exactly there. As a startup, we’ve gone from 0 users to 125 million users in less than a year. In 2008, I remember the ops team at Cuil and how they had to spend weeks setting up racks, booting up machines for the first time, and installing our code on it. It was a pain, and it was expensive to buy all those machines for predicted users. We had to set up multiple data centers for redundancy and separate clusters for testing and production — the whole gamut.

AWS provides all of that in a very turnkey way. Not only did the AWS Activate program give us credits to build our first versions and learn the system, but the training and support that AWS also provided has been everything we could dream of.

Can you tell us a bit more about how you’re using AWS?

We use Amazon EMR to process tens of terabytes of data daily, Amazon SQS to process over five billion messages monthly so that much of our systems can run in real time, and Amazon EC2 for all of our increasing server needs.

That’s not to say we’ve faced no troubles at all. We’ve had to build solutions to the differences in the processing power of our SQS consumers and Amazon RDS instances. We were actually processing messages too fast for our RDS instances to keep up, even after aggregating tens of thousands of messages at a time. Given that there’s a message fetching limit, the solution was simple: daisy-chain SQS queues! By utilizing two queues, we turn tens of millions of messages a day into something a single consumer can write to a medium RDS instance.

Because of our large volume of data and transactions, we’ve definitely had to worry about costs. We’re generating petabytes, and we have EMR jobs running through all of it. With Amazon EC2 Reserved Instances, we’ve saved a portion of the cost that we’d otherwise have. But the real surprise is Amazon EC2 Spot Instances. Because Spot Instances aren’t lower quality, we’re able to add them as needed to boost our jobs during low demand periods. On the other side, Auto Scaling groups help us add this power to our normal server clusters. Stable traffic tends to follow a sine curve. With an Auto Scaling group of Reserved Instances and a supplementary Auto Scaling group of Spot Instances, we’ve been able to save, even while delivering continuous uptime.

Monitoring is constantly a challenge, but the tools that Amazon provides are invaluable. Through the power of boto, a Python interface to AWS, we’ve been able to automatically set up multiple Amazon CloudWatch metrics for many machines and clusters simultaneously. This helps to monitor various standard metrics on the fly (requests per second, errors per second, CPU, memory, network, and more) and respond to dangerous conditions quickly (high CPU, a spike in failures, multiple unhealthy hosts). With this comprehensive tracking in place, we’ve even been able to set up a paging system for critical issues.

What advice can you give to startups for building AWS-powered solutions?

  1. Stack Overflow is your best friend. We’ve solved so many problems there thanks to the wonderful community. As a startup, it’s important to know exactly what your focus is. When I started Quettra, I knew that we were going to focus on the mobile data collection and data mining pieces. I didn’t want to stray too far from battle-tested pieces of infrastructure. Almost every infrastructure decision I’ve made has come down to checking how many posts there are on Stack Overflow for a given topic. The community has been extremely helpful in getting us to where we are.
  2. Invest in a good deployment scripting language early. We chose Ansible, and it’s been a huge benefit as we scaled up. I’m so glad we don’t manually deploy our hundreds of servers. Chef and Puppet are also good. Just pick one early. It takes some investment, but it’ll pay off as you scale up your business.

What’s next for Quettra?

We just launched Quettra Portrait two weeks ago to help developers personalize their apps to drive higher retention and engagement. We think that solving the 77% problem (in which an average app loses 77% of users in first 3 days) for app developers is a giant opportunity, and we’re wholly focused on solving this. We’re always hiring the best talent in Silicon Valley: folks who are passionate about making our digital selves (mobile devices) smarter for everyone in the world!