In the Bill Murray film Groundhog Day, we see a man trapped in the nightmare of the same scenario repeating endless times. At first he fights against it, then he decides to go along with it, and finally despair kicks in. Only until he approaches the problem in an entirely different way does the solution emerge which allows him to move forward. This year’s Cyber Monday snafus offer a similar scenario for DBAs at retail companies: databases can’t keep up with the onslaught of traffic, as customers complain about slow checkouts, disappearing cart items and website crashes.
Consider for example Macy’s, who according to the Mercury News “… suffered service disruptions on Black Friday, dealing a setback to a company trying to persuade customers — and investors — that it can handle more online traffic.” This was particularly problematic, the article says, as the company has been shuttering brick-and-mortar locations and placing its focus online. Victoria’s Secret experienced similar “un-sexy” problems, as did Express, Game, Quidco, Dell, Curry’s PC World and Takealot. Problems like these can cost not just the companies, but the economy as a whole, and could diminish overall spending by trillions of dollars.
DBAs are doing the best with MySQL that they can
Let’s give credit where credit is due. With old-school MySQL and its various variants and replacements, DBAs have been handed tools that just aren’t quite up to the job, and have done their best to stretch and expand the performance limits with complex and demanding techniques like database sharding and the different forms of data replication. And the fact that these techniques are complicated and require so much time from so many smart people is exactly why this standard approach doomed to fail.
It doesn’t take a psychic to predict the failure of a database pushed beyond its limits
And fail it has– consistently. We predicted it before Amazon Prime Day, and explained why it happened after the fact too. We’re not clairvoyant– we just know databases. The fact that the solutions that e-commerce companies are using aren’t designed to scale “out” by adding nodes, and are architected to run on a single server means that they’re forever hindered by the performance limits of that single server.
With some tinkering they may be able to scale past their performance ceiling, but every time sharding, read-slaves or similar techniques are employed, your risk of something going wrong grows more pronounced. Sadly, this is true of even the most touted replacements for MySQL, such as AWS’s Aurora and Google’s Cloud SQL. And the bells and whistles that these companies are offering don’t make up for the fundamental fact that they’re designed for a single server, anymore than adding fancy electronics to a car improves its horsepower.
Predictably, every time there’s some big online sales event, the following day’s headlines are littered with stories about website failures.
Quit acting like Cinderella’s stepsisters, and marry the prince
Companies that insist on trying to rig MySQL and other old-school databases to scale to massive transactional traffic are acting kind of like Cinderella’s stepsisters trying to shove their feet into a glass slipper. It’s never going to work (unless you cut off your toes, and who wants to do that?) If you want to marry the prince (which, for e-tailers we’ll define as sailing through Cyber Monday without a website performance hitch), you’d better try something else.
With a MySQL compatible DBMS that scales out linearly by merely adding server nodes, you can navigate any performance demands that the world’s biggest online shopping day might throw at you. And, if that solution let’s you easily add or subtract nodes based on demand without having to pay for any computing power beyond what you actually use, doesn’t that sound better than cutting off your toes?