Scalability Rules - 50 Principles For Scaling Web Sites By Martin L. Abbott And Michael T. Fisher
When thinking about scaling a web application to serve millions of customers with high-availability and fast response times, there's so much that you have to consider, it can be downright overwhelming. It's certainly more than any one team - let alone one person - can manage. And, it's easy to get lost in the sea of details. This is why I love the book, Scalability Rules: 50 Principles for Scaling Web Sites by Martin L. Abbott and Michael T Fisher. This book takes the problem of scalability and breaks it down into, what is essentially, a checklist of steps that your team can take in order to help ensure long-term success.
While some books, like Building Microservices by Sam Newman, focus in on a single (albeit extremely complex topic), the 50 Principles for Scaling Web Sites provides a high-level overview of all aspects of scalability. This ranges from client-side topics about cookie usage and the number of DNS entries needed to optimize parallel HTTP requests to network hardware choices, distributed object caches, and everything in between. While many of the details are left up to the reader to discover, the goal of the book is to provide overarching principles that can be woven into the fabric of your engineering teams:
.... select a number of rules that fit your specific needs and codify them as architectural principles within your organization. Use these principles as the standards employed within software and infrastructure reviews. The exit criteria for these meetings can be complete adherence to the set of rules that you develop. Architectural reviews and joint architectural development sessions can similarly employ these rules to ensure adherence to the principles of scalability and availability. (Page 246)
Each principles includes an easy-to-consume summary followed by a more in-depth discussion. For example, here's the summary of Rule 19 - Relax Temporal Constraints:
- WHAT: Alleviate temporal constraints in your systems whenever possible.
- WHEN TO USE: Any time you are considering adding a constraint that an item or object maintains a certain state between a users's actions.
- HOW TO USE: Relax constraints in the business rules.
- WHY: The difficulty in scaling systems with temporal constraints is significant because of the ACID properties of most RDBMSs.
- KEY TAKEAWAYS: Carefully consider the need for constraints such as items being available from the time a user views them until the user purchases them. Some possible edge cases where users are disappointed are much easier to compensate for than not being able to scale.
The authors of the book even rank the 50 Principles from the perspective of Cost (to implement) vs. Benefit (as a factor of risk reduction). So, you can literally work your way down the list, attacking the highest-value principles first. Though, of course, the authors do mention that the cost of implementation is much lower for greenfield projects (that can start employing these principles on day one).
That said, when looking at the ranked list, I was actually surprised to see that the different axis of their "AKF Scale Cube" were ranked at different priorities:
- High - Design to Clone Things (X Axis)
- High - Design Your Solutions to Scale Out - Not Just Up
- Medium - Design to Split Different Things (Y Axis)
- Medium - Design to Split Similar Things (Z Axis)
While a bit surprising, I thought this was a refreshing and honest take on how to evaluate your choices. Sometimes, the modern-day rhetoric makes me feel that if you haven't started splitting up your features into independently-scalable services (Y Axis), you've already failed. So, it's just nice to see the authors acknowledge that these are, in fact, important principles; but, maybe not as critical as other higher-priority items that your team can be implementing. For example, the 2nd item in the "Very High" priority list is "Make Use of Object Caches". I know for a fact that this is a principle that me and my team could definitely make better use of.
Martin L. Abbott and Michael T. Fisher state that "any big problem, if approached properly, is really just a collection of smaller problems waiting to be solved" (Page 1). And, this is exactly what the 50 Principles for Scaling Web Sites is doing - taking the big hairy task of "scalability" and breaking it down into smaller, solvable chunks. This makes the whole thing seems less scary and more feasible. And that alone makes this book worth getting.