Principles and Practices of Scalability

Bishr Tabbaa
DataSeries
Published in
2 min readDec 4, 2017

Here is a book summary and review of Scalability Rules by Marty Abbott and Mike Fisher. It’s concise, practical, and packed with good advice on scaling platforms, people, and processes. The latest edition includes stories that give context to the rules. Highly recommended.

  1. Design
  • Do not over engineer the solution.
  • Design scale into solutions: design @ 20X, implement @ 3X, deploy @ 2X
  • Avoid single point of failure.
  • Avoid sequencing components and systems in synchronous series.
  • Strive for statelessness. Watch out for server affinity.
  • Communicate asynchronously as much as possible (prefer pub-sub to RPC).
  • Design your application to be monitored.
  • Reduce object usage including DB, DNS, sockets, images, CPU, MEM, DISK, etc

2. Cache

  • Cache static, infrequently changing information and objects appropriately.
  • Use web page cache, image cache, application reference data cache, etc.

3. Scale

  • Design to clone things on commodity hardware and network load balancer.
  • Design to split different and similar things.
  • Design your solution to scale out. Use AKF scale cube.
  • Scale out your data centers.
  • Design to leverage the cloud, but be wary of scaling through 3rd party. Details such as latency, redundancy, and SLAs matter.

4. Platform

  • Use database appropriately. Need ACID (Atomic, Consistent, Isolated, Durable)?
  • Use firewalls appropriately.
  • Use log files actively.
  • Do not double check your work… do not re-read your data after write.
  • Stop redirecting traffic.
  • Leverage Content Distribution Networks (CDN).
  • Use expire headers in HTTP requests to reduce duplicates for static data.
  • Purge, archive, and cost justify storage.

5. Process

  • Test. Measure. Rinse. Repeat.
  • Learn aggressively and especially from failure through team discussion.
  • Do not rely on QA to find mistakes.
  • Design for rollback of code.
  • Be aware of costly relationships and dependencies (networks, databases, etc).

6. Database

  • Understand object relationships.
  • Use the correct database lock.
  • Avoid multi-phase commit.
  • Avoid select for update.
  • Avoid select *.
  • Separate business intelligence from transaction processing.

7. Foundations

  • Do not do anything more than once.
  • Do not do anything that is unnecessary.
  • Get as much as in one request as possible.
Principles and Practices of Scalability

Enjoy the article? Follow me on Medium and Twitter for more updates.

--

--

Bishr Tabbaa
DataSeries

Architect @ AWS • Amazon Web Services • Board Member • Fractional CTO • Built B2B DNA supply chain stack @GxGene • History of System Failure • Writer @ Medium