Foundations of Scalable Systems

Ian Gorton

O'Reilly Media, Inc.

In software, we design a system for 500 people but we expect our software systems to suddenly handle 10 million people overnight… this book covers concurrent and distributed systems through the lens of scalability.

In software terms, scalability defines a system’s capabilities to handle growth in some dimension of its operations:

  • The number of simultaneous users
  • The amount of data it can process
  • The value that can be derived through processing analytics
  • The ability to maintain stable response times under stress

Improving the system’s performance also directly relates to improved scalability; while security often limits performance and scalability.

Typical scalability techniques include:

  • Vertical scaling with better hardware
  • Horizontal scaling using a load balancer
  • Using stateless services
  • Scaling the database with caching
  • Using a distributed database
  • Using microservices

The author covers the basics of networking and then moves onto Consensus in distributed systems, and having synchronized Time in distributed systems.

The author then covers the basics of multi-threaded systems, race conditions and deadlocks… so far it’s all really basic stuff you learn when you study Computer Science.

Then some more basic stuff on how web applications work and serverless computing systems.

Another chapter on Microservices… maybe the book title foundations of scalable systems should be taken a bit more literally because it’s not really matching my expectations so far.

Next up is a chapter on databases, which can be relational or no-sql databases, and no-sql databases have a unique property of eventual consistency. The other end of the spectrum is strong consistency and there is an example of database transactions. Then the author covers consensus algorithms.

In Raft consensus, there is a single leader that receives client requests, orders them and broadcasts to the followers.

In Paxos, a leaderless consensus algorithm is described as tricky to implement, lol. (Paxos usually works with a leader too.)

The author then covers different database options like Redis, MongoDB, etc.

Last two chapters cover event driven systems, and include examples of RabbitMQ and Kafka.

The book is very basic and doesn’t contain much useful information if you have studied Computer Science before or know anything about building web apps… I thought there would be more specialized knowledge on building scalable systems but this was more like an introduction to well known tools and application software. The reading time for this book was 9 hours and you can easily finish it in an hour or two if you know the basics.