18. The CAP Theorem

18.1 Introduction

Now that we’ve talked a little about software architectures and hardware bottlenecks, we can talk a little bit about a more advanced issue you can run into while building distributed systems.

Any distributed system has three properties, of which any two exclude the third. Those properties are consistency, availability, and partition tolerance. This is most commonly known as the CAP theorem but also carries the name Brewer’s theorem.

Luckily, most technologies will make default choices with respect to these issues for you already. Your choice in building a distributed system, then, is choosing the technology that meets your own CAP requirements, or “tuning” a technology away from its defaults.

In the following ...

Get Machine Learning in Production: Developing and Optimizing Data Science Workflows and Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.