Are You Prepared to Scale Your App?
By Amir Schlezinger
“We could easily dedicate an entire article to metrics. But for now, we’ll put it simply: if it has a pulse, put a metric on it.”
Are You Prepared to Scale Your App?
By Amir Schlezinger
A Game-Plan to Scaling in a Responsible Way
Only three-and-a-half years ago, Bigabid’s platform handled less than ten campaigns, with 5K QPS from one data source, under one data center. Today, we run hundreds of campaigns with roughly 1M QPS from four data sources, under three data centers!If scaling wasn’t constantly on our minds, we may not be where we are today. Here are a few tips to ensure that you’re prepared to scale, and that you’re set up for success when you do.
Questions to ask before starting – Before you attempt to scale, answer the following questions:
Case in point: At one point, each of our data centers had only one Redis instance running. We knew this would become an issue, but creating a cluster when it wasn’t yet 100% necessary would have been a redundant expense. We foresaw the day we’d need to upgrade (more on that below), and when that day came, we upgraded to a Redis cluster—but only one data center had enough traffic to call for a cluster. So, the other centers remain with a single Redis instance until their time for an upgrade comes.
Metrics Are Your Best Friend
You need to be working with metrics before you scale, and after! In fact, metrics should always be on your mind. We could easily dedicate an entire article to metrics—how to use them to ensure that our platform is working well, and how to use them for scouting out problems before they happen. But for now, we’ll put it simply: if it has a pulse, put a metric on it. Here are some tips you should take into account regarding your performance metrics:
The Data Goldrush
Saving and analyzing data is the latest rage. You’re inclined to save every micro-action your user did or even thought about doing because… well, who knows? This might be the best predictor of user profitability.Unfortunately, saving too much data has become a common and costly issue. Data saved for “maybe one day” purposes more often than not winds up being unused data that becomes a burden, both in terms of expense (the bandwidth to save said data is costly in terms of server performance and the effort needed to sustain ETL processes), and in terms of HR managing it. Let’s take a step back; after all, we’re not Google. Be smart about the data you’re saving. Figure out if you’ll be able to use it before it goes stale. Being a hoarder won’t help, and with time you’ll feel increasingly uneasy deleting old data. So, best to avoid the issue before it happens.
Conclusion
Scaling is a lot about preparing, and being honest and realistic about our scaling goals. Indeed, if a team expects to scale successfully, the topic must be part of everyday conversation long before scaling actually happens. Only with proper preparation that comes from constantly discussing it, and from setting up the correct metrics and alerts, will you be able to ensure the success of your scale. Once you’ve laid the foundation for scaling, you should be sure to adopt proper habits for handling a scaled system, and have a plan in place for when something goes wrong. More on that in Are You Prepared to Scale Your Mobile App Part: Part 2.