Saturday, December 3, 2016

Book Summary | Scalability Rules

This article is a reboot of my blog.  Posts will consist of book reviews, informal musings on economics, history, and software, as well as more formal, didactic articles on technology.

Here is a book summary and review of Scalability Rules by Abbott and Fisher.  Practical.  Concise.  Packed with good advice on design, infrastructure, and organizational processes.  The latest edition includes stories that give context to the rules.  Highly recommended.


Category
Rule
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
Reduce object usage including DB, DNS, sockets, images, CPU, MEM, DISK, etc
Cache
Cache static, infrequently changing information and objects appropriately.
Use web page cache, image cache, application reference data cache, etc.
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 matter.
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.
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).
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.
General
Do not do anything more than once.
Do not do anything that is unnecessary.
Get as much as in one request as possible.

No comments: