# CAP theorem

The CAP theorem states that a distributed system cannot simultaneously guarantee consistency, availability, and partition tolerance.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## What Actually Happens When a Kafka Region Fails?

DevFeed: [What Actually Happens When a Kafka Region Fails?](<https://devfeed.tech/articles/what-actually-happens-when-a-kafka-region-fails-126633.md>)

Original publisher: [Read original article](<https://www.sitepoint.com/what-actually-happens-when-a-kafka-region-fails/>)

Author: SitePoint Team

Published: 2026-11-10T00:42:14Z

Content type: article

Language: en

Sources: [SitePoint](<https://devfeed.tech/sources/sitepoint.md>)

Topics: [Apache Kafka](<https://devfeed.tech/topics/apache-kafka.md>), [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [consistency](<https://devfeed.tech/topics/consistency.md>), [downtime](<https://devfeed.tech/topics/downtime.md>), [Data integrity in software engineering](<https://devfeed.tech/topics/data-integrity-in-software-engineering.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [availability](<https://devfeed.tech/tags/availability.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [computer-science](<https://devfeed.tech/tags/computer-science.md>), [computing](<https://devfeed.tech/tags/computing.md>), [durability](<https://devfeed.tech/tags/durability.md>), [kafka](<https://devfeed.tech/tags/kafka.md>), [performance-scaling](<https://devfeed.tech/tags/performance-scaling.md>), [region](<https://devfeed.tech/tags/region.md>), [scaling](<https://devfeed.tech/tags/scaling.md>), [technology](<https://devfeed.tech/tags/technology.md>)

### AI overview

A three-region Kafka design with two brokers per region and RF=6 can retain four replicas after a region fails. With `min.insync.replicas=3` and producer `acks=all`, writes can continue while at least three replicas remain in the ISR, including during a broker restart; Kafka stops writes below that threshold. Five KRaft controllers split 2+2+1 preserve quorum after any one region loss, but may not leave room to restart a controller. More controllers add headroom and coordination overhead; dynamic quorum reconfiguration (Kafka 3.9/KIP-853) can reduce voting membership during an outage, but requires successful committed changes. WAN degradation can shrink ISR or break quorum, while cross-region replication adds latency and resource costs. The surviving regions must be sized for extra traffic, and throttled replica catch-up can limit recovery impact at the cost of longer recovery.

### Source excerpt

null Continue reading What Actually Happens When a Kafka Region Fails? on SitePoint.

## Two-phase commit provides atomicity but can leave participants blocked and reduce transaction availability

DevFeed: [Two-phase commit provides atomicity but can leave participants blocked and reduce transaction availability](<https://devfeed.tech/articles/two-phase-commit-is-not-dead-it-is-just-expensive-and-you-should-know-the-price-89928.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/67-two-phase-commit-is-expensive-not-dead/>)

Author: hello@ankit-rana.com

Published: 2026-10-19T00:00:00Z

Content type: article

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [scalable-architecture](<https://devfeed.tech/topics/scalable-architecture.md>), [self-hosted databases vs managed services](<https://devfeed.tech/topics/self-hosted-databases-vs-managed-services.md>), [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [Availability](<https://devfeed.tech/topics/availability.md>), [synchronization](<https://devfeed.tech/topics/synchronization.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [database](<https://devfeed.tech/tags/database.md>), [databases](<https://devfeed.tech/tags/databases.md>), [deployment](<https://devfeed.tech/tags/deployment.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [distributed-transaction](<https://devfeed.tech/tags/distributed-transaction.md>), [distributed-transactions](<https://devfeed.tech/tags/distributed-transactions.md>), [fsync](<https://devfeed.tech/tags/fsync.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [latency](<https://devfeed.tech/tags/latency.md>), [locks](<https://devfeed.tech/tags/locks.md>), [two-phase-commit](<https://devfeed.tech/tags/two-phase-commit.md>)

### AI overview

Two-phase commit (2PC) provides atomicity across resource managers by requiring participants to hold locks after voting until a coordinator decides. If the coordinator fails during that interval, participants can remain blocked. The article explains how adding participants lowers transaction availability, contrasts 2PC with the transactional outbox pattern, and identifies cases where 2PC may still be appropriate.

### Source excerpt

Two-phase commit gives real atomicity across independent resource managers, and it pays for it by making every participant hold locks from the moment it votes until the coordinator tells it what to do. If the coordinator dies in that window, participants are stuck holding locks with no legal way to proceed, because they promised they could commit and cannot take it back. Availability is the product of every participant's availability, so adding services makes the transaction less likely to complete rather than more.

## How Split Brain Happens in Distributed Databases and How It Gets Fixed

DevFeed: [How Split Brain Happens in Distributed Databases and How It Gets Fixed](<https://devfeed.tech/articles/how-split-brain-happens-in-distributed-databases-and-how-it-gets-fixed-39654.md>)

Original publisher: [Read original article](<https://www.gauravsarma.com/posts/2026-03-31_split-brain-in-distributed-databases>)

Published: 2026-03-31T00:00:00Z

Content type: tutorial

Language: en

Sources: [Gaurav Sarma's](<https://devfeed.tech/sources/gaurav-sarma-s-blog.md>)

Topics: [Database](<https://devfeed.tech/topics/database.md>), [Network](<https://devfeed.tech/topics/network.md>), [Replication](<https://devfeed.tech/topics/replication.md>), [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>)

Tags: [consensus](<https://devfeed.tech/tags/consensus.md>), [databases](<https://devfeed.tech/tags/databases.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [failed](<https://devfeed.tech/tags/failed.md>), [false-positives](<https://devfeed.tech/tags/false-positives.md>), [partition](<https://devfeed.tech/tags/partition.md>), [replication](<https://devfeed.tech/tags/replication.md>), [split-brain](<https://devfeed.tech/tags/split-brain.md>)

### AI overview

This tutorial explains how split brain occurs in distributed databases when a network partition causes multiple nodes to become primary and accept conflicting writes. It discusses why timeout-based failure detection can create false positives and introduces the distributed consensus complexity motivated by this failure mode.

### Source excerpt

. [How Split Brain Happens in Distributed Databases and How It Gets Fixed](split-brain-in-distributed-databases-cover...

## System Design Interview Framework

DevFeed: [System Design Interview Framework](<https://devfeed.tech/articles/system-design-interview-framework-32316.md>)

Original publisher: [Read original article](<https://evanking1.medium.com/system-design-interview-framework-419b4796e051?source=rss-9736778727ef------2>)

Author: Evan King

Published: 2024-11-19T21:39:41Z

Content type: tutorial

Language: en

Sources: [Evan King](<https://devfeed.tech/sources/evan-king.md>)

Topics: [system-design-project](<https://devfeed.tech/topics/system-design-project.md>), [software-architecture](<https://devfeed.tech/topics/software-architecture.md>), [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [X (Twitter)](<https://devfeed.tech/topics/twitter.md>)

Tags: [approach](<https://devfeed.tech/tags/approach.md>), [better](<https://devfeed.tech/tags/better.md>), [cache](<https://devfeed.tech/tags/cache.md>), [client](<https://devfeed.tech/tags/client.md>), [clients](<https://devfeed.tech/tags/clients.md>), [communication](<https://devfeed.tech/tags/communication.md>), [core](<https://devfeed.tech/tags/core.md>), [customer](<https://devfeed.tech/tags/customer.md>), [delivery](<https://devfeed.tech/tags/delivery.md>), [design](<https://devfeed.tech/tags/design.md>), [designing](<https://devfeed.tech/tags/designing.md>), [develop](<https://devfeed.tech/tags/develop.md>), [discuss](<https://devfeed.tech/tags/discuss.md>), [ensures](<https://devfeed.tech/tags/ensures.md>), [example](<https://devfeed.tech/tags/example.md>), [framework](<https://devfeed.tech/tags/framework.md>), [interview](<https://devfeed.tech/tags/interview.md>), [system](<https://devfeed.tech/tags/system.md>), [system-design](<https://devfeed.tech/tags/system-design.md>), [system-design-interview](<https://devfeed.tech/tags/system-design-interview.md>)

### AI overview

The framework's central recommendation is to prioritize delivering a working system: use a clear structure to avoid getting stuck. Spend about five minutes clarifying requirements through targeted questions. Identify and prioritize roughly three functional requirements, then choose three to five relevant, contextualized non-functional requirements, quantifying targets where possible. Consider consistency versus availability, environment constraints, scale and traffic patterns, latency, durability, security, fault tolerance, and compliance. The source advises skipping upfront capacity calculations when they would not affect the design, and estimating relevant quantities during design when they could change a choice, such as whether a TopK system needs a sharded data structure. The provided excerpt ends during the functional requirements discussion, while the accompanying source text supplies these later sections.

### Source excerpt

From the co-founder of www.hellointerview.com The easiest way to sabotage your chances of getting an offer in your system design interview is to fail to deliver a working system. This is the most common reason that mid-level candidates fail these interviews. While a firm structure to your approach is important and your interviewer is not trained specifically to assess you on your delivery (often this gets bucketed into "communication"), in practice we've seen many candidates that perform significantly better by following a structure which both keeps them from getting stuck and ensures they deliver a working system. Requirements (~5 minutes) The goal of the requirements section is to get a clear understanding of the system that you are being asked to design. To do this, we suggest you break your requirements into two sections. 1) Functional Requirements Functional requirements are your "Users/Clients should be able to..." statements. These are the core features of your system and should be the first thing you discuss with your interviewer. Oftentimes this is a back and fourth with your interviewer. Ask targeted questions as if you were talking to a client, customer, or product manager ("does the system need to do X?", "what would happen if Y?") to arrive at a prioritized list of core features. For example, if you were designing a system like Twitter, you might have the following functional requirements: Users should be able to post tweets Users should be able to follow other users Users should be able to see tweets from users they follow A cache meanwhile might have requirements like: Clients should be able to insert items Clients should be able to set expirations Clients should be able to read items Keep your requirements targeted! The main objective in the remaining part of the interview is to develop a system that meets the requirements you've identified -- so it's crucial to be strategic in your prioritization. Many of these systems have hundreds of features, but it

## Let's Consign CAP to the Cabinet of Curiosities

DevFeed: [Let's Consign CAP to the Cabinet of Curiosities](<https://devfeed.tech/articles/let-s-consign-cap-to-the-cabinet-of-curiosities-12559.md>)

Original publisher: [Read original article](<http://brooker.co.za/blog/2024/07/25/cap-again.html>)

Author: Marc Brooker

Published: 2024-07-25T00:00:00Z

Content type: article

Language: en

Sources: [Marc Brooker's](<https://devfeed.tech/sources/marc-brooker-s-blog.md>)

Topics: [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [consistency](<https://devfeed.tech/topics/consistency.md>), [Cloud Architecture](<https://devfeed.tech/topics/cloud-architecture.md>), [Internet of things](<https://devfeed.tech/topics/iot.md>)

Tags: [applications](<https://devfeed.tech/tags/applications.md>), [architectures](<https://devfeed.tech/tags/architectures.md>), [availability](<https://devfeed.tech/tags/availability.md>), [berkeley](<https://devfeed.tech/tags/berkeley.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [client](<https://devfeed.tech/tags/client.md>), [clients](<https://devfeed.tech/tags/clients.md>), [cloud](<https://devfeed.tech/tags/cloud.md>), [connectivity](<https://devfeed.tech/tags/connectivity.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [data](<https://devfeed.tech/tags/data.md>), [datacenters](<https://devfeed.tech/tags/datacenters.md>), [device](<https://devfeed.tech/tags/device.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [iot](<https://devfeed.tech/tags/iot.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [node](<https://devfeed.tech/tags/node.md>), [partition](<https://devfeed.tech/tags/partition.md>)

### AI overview

The author argues CAP is a poor starting point for teaching trade-offs in cloud systems: when a quorum remains reachable, routing clients through a load balancer or DNS to healthy replicas can preserve strong consistency and practical availability for most clients, even if the formal CAP definition labels the system unavailable because one non-failing node cannot respond. This approach depends on clients being able to reach the healthy side; partitions in intermittently connected mobile and IoT settings may force a choice between accepting writes and being unavailable for updates, and read availability can also suffer when devices lack full replicas. The author says CAP is not wrong, but its focus on linearizability and partitions is too narrow as a model of correctness; systems must test behavior against their client contracts and account for other failures such as message reordering and duplicate delivery. The excerpt recommends teaching more practical trade-offs such as durability versus latency instead.

### Source excerpt

Let's Consign CAP to the Cabinet of Curiosities CAP? Again? Still? Brewer's CAP theorem, and Gilbert and Lynch's formalization of it, is the first introduction to hard trade-offs for many distributed systems engineers. Going by the vast amounts of ink and bile spent on the topic, it is not unreasonable for new folks to conclude that it's an important, foundational, idea. The reality is that CAP is nearly irrelevant for almost all engineers building cloud-style distributed systems, and applications on the cloud. It's much closer to relevant for developers of intermittently connected mobile and IoT applications, and space where the trade-off is typically seen as common sense already. We'll start with this excellent diagram from Bernstein and Das's Rethinking Eventual Consistency: CAP interests itself in the first two boxes. If there's no partition (everybody can speak to everybody), we're OK. Where CAP goes off the rails is the second box: if a quorum of replicas is available to the client, they can still get both strong consistency, and uncompromised availability. What do we mean when we say Available? Consider the quorum system below. We have seven clients. Six are on the majority (quorum1) side, and are smiling because they can enjoy both availability and strong consistency (provided the system doesn't allow the seventh client to write). The frowning client is out in the cold. They can get stale reads, but can't write, so they're frowning. The formalized CAP theorem would call this system unavailable, based on their definition of availability: every request received by a non-failing node in the system must result in a response. Most engineers, operators, and six of seven clients, would call this system available. This difference in definitions for a common everyday term causes no end of confusion. Including among those who (incorrectly) claim that this system can't offer consistency and availability to the six happy clients. It can. Can we make the seventh client h

## 25 key terms for speaking Distributed Systems and Temporal

DevFeed: [25 key terms for speaking Distributed Systems and Temporal](<https://devfeed.tech/articles/25-key-terms-for-speaking-distributed-systems-and-temporal-35694.md>)

Original publisher: [Read original article](<https://temporal.io/blog/25-key-terms-for-speaking-distributed-systems-and-temporal>)

Author: Emily Fortuna

Published: 2023-06-29T16:00:00Z

Content type: tutorial

Language: en

Sources: [Temporal](<https://devfeed.tech/sources/temporal-blog.md>)

Topics: [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [consistency](<https://devfeed.tech/topics/consistency.md>), [reliability-engineering](<https://devfeed.tech/topics/reliability-engineering.md>), [Scalability](<https://devfeed.tech/topics/scalability.md>), [Database](<https://devfeed.tech/topics/database.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [availability](<https://devfeed.tech/tags/availability.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [reliability](<https://devfeed.tech/tags/reliability.md>), [scalability](<https://devfeed.tech/tags/scalability.md>), [systems](<https://devfeed.tech/tags/systems.md>), [temporal-concepts](<https://devfeed.tech/tags/temporal-concepts.md>)

### AI overview

A quick-reference guide explains core distributed-systems terms, including concurrency, scalability, reliability, consistency models, the CAP theorem, availability, partition tolerance, and ACID. It is intended to help readers understand and discuss distributed systems and Temporal.

### Source excerpt

Learn the minimum set of terms to understand and discuss distributed systems challenges and Temporal with all your friends, in plain English.

## Git's database internals IV: distributed synchronization

DevFeed: [Git's database internals IV: distributed synchronization](<https://devfeed.tech/articles/git-s-database-internals-iv-distributed-synchronization-68240.md>)

Original publisher: [Read original article](<https://github.blog/open-source/git/gits-database-internals-iv-distributed-synchronization/>)

Author: Derrick Stolee

Published: 2022-09-01T13:00:20Z

Content type: article

Language: en

Sources: [GitHub Blog](<https://devfeed.tech/sources/github-engineering.md>)

Topics: [Git](<https://devfeed.tech/topics/git.md>), [synchronization](<https://devfeed.tech/topics/synchronization.md>), [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [Database](<https://devfeed.tech/topics/database.md>), [database-scalability](<https://devfeed.tech/topics/database-scalability.md>)

Tags: [database](<https://devfeed.tech/tags/database.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [git](<https://devfeed.tech/tags/git.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [synchronization](<https://devfeed.tech/tags/synchronization.md>)

### AI overview

The article explains how Git synchronizes repositories through fetch and push. It covers reachable set difference algorithms, including commit frontiers, precomputed reachability bitmaps, and sparse tree walks, and discusses how these approaches affect performance as repositories grow.

### Source excerpt

We're examining Git's internals to help make your engineering system more efficient. This post views Git as a distributed database and looks into its synchronization techniques, specifically 'git fetch' and 'git push'.

## The Fundamental Mechanism of Scaling

DevFeed: [The Fundamental Mechanism of Scaling](<https://devfeed.tech/articles/the-fundamental-mechanism-of-scaling-12503.md>)

Original publisher: [Read original article](<http://brooker.co.za/blog/2021/01/22/cloud-scale.html>)

Author: Marc Brooker

Published: 2021-01-22T00:00:00Z

Content type: article

Language: en

Sources: [Marc Brooker's](<https://devfeed.tech/sources/marc-brooker-s-blog.md>)

Topics: [scalable-architecture](<https://devfeed.tech/topics/scalable-architecture.md>), [sharding](<https://devfeed.tech/topics/sharding.md>), [Cloud Architecture](<https://devfeed.tech/topics/cloud-architecture.md>), [Raft](<https://devfeed.tech/topics/raft.md>), [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [Database](<https://devfeed.tech/topics/database.md>)

Tags: [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [consensus](<https://devfeed.tech/tags/consensus.md>), [databases](<https://devfeed.tech/tags/databases.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [paxos](<https://devfeed.tech/tags/paxos.md>), [raft](<https://devfeed.tech/tags/raft.md>), [scaling](<https://devfeed.tech/tags/scaling.md>), [systems](<https://devfeed.tech/tags/systems.md>), [two-phase-commit](<https://devfeed.tech/tags/two-phase-commit.md>)

### AI overview

The excerpt argues that distributed systems scale primarily by avoiding coordination: consensus protocols such as Paxos and Raft improve availability, durability, and integrity, but do not themselves make systems scale. It places designs on a spectrum: tightly coordinated systems may do O(N-W) work; sharded systems with cross-shard operations range from O(W) to O(N-W) depending on access patterns; leveraged coordination can stay at O(W) in normal operation but rise to O(N-W) when coordination is forced; and fully independent work remains O(W). The article names CAP-style impossibility results and CALM as frameworks for reasoning about coordination. Partial-result systems can improve progress, but may confuse clients and are difficult to test because many result subsets are possible. The excerpt presents this as one useful lens, not a complete classification.

### Source excerpt

The Fundamental Mechanism of Scaling It's not Paxos, unfortunately. A common misconception among people picking up distributed systems is that replication and consensus protocols--Paxos, Raft, and friends--are the tools used to build the largest and most scalable systems. It's obviously true that these protocols are important building blocks. They're used to build systems that offer more availability, better durability, and stronger integrity than a single machine. At the most basic level, though, they don't make systems scale. Instead, the fundamental approach used to scale distributed systems is avoiding co-ordination. Finding ways to make progress on work that doesn't require messages to pass between machines, between clusters of machines, between datacenters and so on. The fundamental tool of cloud scaling is coordination avoidance. A Spectrum of Systems With this in mind, we can build a kind of spectrum of the amount of coordination required in different system designs: Coordinated These are the kind that use paxos, raft, chain replication or some other protocol to make a group of nodes work closely together. The amount of work done by the system generally scales with the offered work (W) and the number of nodes (N), something like O(N * W) (or, potentially, worse under some kinds of failures). Data-dependent Coordination These systems break their workload up into uncoordinated pieces (like shards), but offer ways to coordinate across shards where needed. Probably the most common type of system in this category is sharded databases, which break data up into independent pieces, but then use some kind of coordination protocol (such as two-phase commit) to offer cross-shard transactions or queries. Work done can vary between O(W) and O(N * W) depending on access patterns, customer behavior and so on. Leveraged Coordination These systems take a coordinated system and build a layer on top of it that can do many requests per unit of coordination. Generally, coordinatio

## Physalia: Millions of Tiny Databases

DevFeed: [Physalia: Millions of Tiny Databases](<https://devfeed.tech/articles/physalia-millions-of-tiny-databases-12491.md>)

Original publisher: [Read original article](<http://brooker.co.za/blog/2020/02/17/physalia.html>)

Author: Marc Brooker

Published: 2020-02-17T00:00:00Z

Content type: article

Language: en

Sources: [Marc Brooker's](<https://devfeed.tech/sources/marc-brooker-s-blog.md>)

Topics: [Database](<https://devfeed.tech/topics/database.md>), [control-plane](<https://devfeed.tech/topics/control-plane.md>), [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [consistency](<https://devfeed.tech/topics/consistency.md>), [configuration-management](<https://devfeed.tech/topics/configuration-management.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [Amazon Elastic Block Store (Amazon EBS)](<https://devfeed.tech/topics/amazon-elastic-block-store-amazon-ebs.md>)

Tags: [availability](<https://devfeed.tech/tags/availability.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [cloud-control](<https://devfeed.tech/tags/cloud-control.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [configuration-management](<https://devfeed.tech/tags/configuration-management.md>), [databases](<https://devfeed.tech/tags/databases.md>), [datacenter](<https://devfeed.tech/tags/datacenter.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [high-availability](<https://devfeed.tech/tags/high-availability.md>), [high-performance](<https://devfeed.tech/tags/high-performance.md>), [key-value-store](<https://devfeed.tech/tags/key-value-store.md>), [tla-plus](<https://devfeed.tech/tags/tla-plus.md>)

### AI overview

Physalia is a transactional key-value store built as a configuration master for Amazon EBS. To address the need for strong consistency and high availability in a distributed system, it uses knowledge of transaction patterns and datacenter topology to make the keys each client needs especially available, rather than maximizing availability for every key to every client. The excerpt says the design is intended for large-scale cloud control planes and was also used elsewhere within AWS. Correctness work included extensive TLA+ specifications and documentation, plus automatically generated Paxos unit tests covering combinations of packet loss and message reordering to check the implementation against its formal specification.

### Source excerpt

Physalia: Millions of Tiny Databases Avoiding Hard CAP Tradeoffs A few years ago, when I was still working on EBS, we started building a system called Physalia. Physalia is a custom transactional key-value store, designed to play the role of configuration master in the EBS architecture. Last year, we wrote a paper about Physalia, and were thrilled that it was accepted to NSDI'20. Millions of Tiny Databases describes our problem and solution in detail. Here's the abstract: Starting in 2013, we set out to build a new database to act as the configuration store for a high-performance cloud block storage system Amazon EBS. This database needs to be not only highly available, durable, and scalable but also strongly consistent. We quickly realized that the constraints on availability imposed by the CAP theorem, and the realities of operating distributed systems, meant that we didn't want one database. We wanted millions. Physalia is a transactional key-value store, optimized for use in large-scale cloud control planes, which takes advantage of knowledge of transaction patterns and infrastructure design to offer both high availability and strong consistency to millions of clients. Physalia uses its knowledge of datacenter topology to place data where it is most likely to be available. Instead of being highly available for all keys to all clients, Physalia focuses on being extremely available for only the keys it knows each client needs, from the perspective of that client. This paper describes Physalia in context of \amazon \ebs, and some other uses within \awsFull. We believe that the same patterns, and approach to design, are widely applicable to distributed systems problems like control planes, configuration management, and service discovery. I also wrote a post about Physalia for the Amazon Science blog. One aspect of Physalia that I'm particular proud of is the work that we put in to correctness. We used TLA+ extensively throughout the design, and as documentation duri

## Availability and availability

DevFeed: [Availability and availability](<https://devfeed.tech/articles/availability-and-availability-12482.md>)

Original publisher: [Read original article](<http://brooker.co.za/blog/2018/02/25/availability-liveness.html>)

Author: Marc Brooker

Published: 2018-02-25T00:00:00Z

Content type: article

Language: en

Sources: [Marc Brooker's](<https://devfeed.tech/sources/marc-brooker-s-blog.md>)

Topics: [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [Availability](<https://devfeed.tech/topics/availability.md>), [consistency](<https://devfeed.tech/topics/consistency.md>), [Mathematics](<https://devfeed.tech/topics/mathematics.md>)

Tags: [availability](<https://devfeed.tech/tags/availability.md>), [c](<https://devfeed.tech/tags/c.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [graceful-degradation](<https://devfeed.tech/tags/graceful-degradation.md>), [pacelc](<https://devfeed.tech/tags/pacelc.md>), [paper](<https://devfeed.tech/tags/paper.md>), [people](<https://devfeed.tech/tags/people.md>), [system](<https://devfeed.tech/tags/system.md>), [systems](<https://devfeed.tech/tags/systems.md>)

### AI overview

CAP Availability means every request to a non-failing node gets a response; operational availability usually means the share of client requests seen as successful. The excerpt argues these measures do not map directly: an Available design can let clients on either side of a partition make progress, while a Consistent design may stop clients separated from the majority. But practical availability also depends on workload shape, failure detection and failover delays, and whether clients can reach the nodes they depend on. Available designs may help in limited circumstances, not guarantee high client availability. Harvest and Yield suggests graceful degradation through partial or stale responses, but its usefulness depends on client promises: people may tolerate these answers more readily than computers expecting complete, authoritative responses, though neither rule is absolute.

### Source excerpt

Availability and availability Translating math into engineering. It's well known that the term Availability in the CAP theorem (as formally defined by Gilbert and Lynch) means something different from the term availability that's commonly used by the designers, builders and operators of distributed systems. Gilbert and Lynch define availability for the CAP theorem as: every request received by a non-failing node in the system must result in a response. That's cool, and useful for the mathematical analysis that's needed to prove the CAP theorem. Most builders and users of distributed systems, on the other hand, define availability as the percentage of requests that their clients see as successful, or something close to that. The terms, like 'clients' and 'successful' and 'see', are pretty fuzzy. Not much good for analysis, but more useful for capturing what people care about. This isn't a new observation. You can find a whole lot of writing about it online. Some of that writing is pretty great. What I don't see addressed as often is how to translate one into the other, using the CAP (or PACELC or whatever) reasoning about Availability to help us think about availability. In reality, are Available systems more available than Consistent systems? This post isn't a complete answer to that question, but does include some of the things worth thinking about in that space. Harvest and Yield Before I dive into this topic, it's worth talking about Harvest and Yield, from a paper by Fox and Brewer. The paper itself has some flaws (as I've blogged about before), but the underlying concept is very useful. The core is about graceful degradation, and how it's useful for systems to return partial or stale answers when they aren't able to answer authoritatively. The paper makes its case well, but whether its conclusions are practically useful depend on what promises you make to your clients. If the direct clients of your service are people, then you're likely to be able to get away w

## Building resilience in Spokes

DevFeed: [Building resilience in Spokes](<https://devfeed.tech/articles/building-resilience-in-spokes-69603.md>)

Original publisher: [Read original article](<https://github.blog/engineering/infrastructure/building-resilience-in-spokes/>)

Author: Patrick Reynolds

Published: 2016-09-07T07:00:00Z

Content type: article

Language: en

Sources: [GitHub Blog](<https://devfeed.tech/sources/github-engineering.md>), [GitHub Engineering](<https://devfeed.tech/sources/github.md>)

Topics: [Resilience](<https://devfeed.tech/topics/resilience.md>), [Load Balancing](<https://devfeed.tech/topics/load-balancing.md>), [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [Chaos Engineering](<https://devfeed.tech/topics/chaos-engineering.md>)

Tags: [data-loss](<https://devfeed.tech/tags/data-loss.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [replication](<https://devfeed.tech/tags/replication.md>), [resilience](<https://devfeed.tech/tags/resilience.md>)

### AI overview

The article explains how GitHub's Spokes replication system protects Git repositories and gists through multiple replicas, majority-based writes, failure detection, automated repairs, and controlled server maintenance. It describes tradeoffs among availability, durability, and consistency, including how the system routes around failures and recovers replicas.

### Source excerpt

Spokes is the replication system for the file servers where we store over 38 million Git repositories and over 36 million gists.It keeps at least three copies of every repository...

## Is there a CAP theorem for Durability?

DevFeed: [Is there a CAP theorem for Durability?](<https://devfeed.tech/articles/is-there-a-cap-theorem-for-durability-12477.md>)

Original publisher: [Read original article](<http://brooker.co.za/blog/2015/09/26/cap-durability.html>)

Author: Marc Brooker

Published: 2015-09-26T00:00:00Z

Content type: article

Language: en

Sources: [Marc Brooker's](<https://devfeed.tech/sources/marc-brooker-s-blog.md>)

Topics: [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [Distributed Systems & Parallel Computing](<https://devfeed.tech/topics/distributed-systems-parallel-computing.md>), [Database](<https://devfeed.tech/topics/database.md>), [consistency](<https://devfeed.tech/topics/consistency.md>), [Persistence](<https://devfeed.tech/topics/persistence.md>), [acid](<https://devfeed.tech/topics/acid.md>)

Tags: [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [distributed-databases](<https://devfeed.tech/tags/distributed-databases.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [durability](<https://devfeed.tech/tags/durability.md>), [latency](<https://devfeed.tech/tags/latency.md>)

### AI overview

The excerpt proposes PADELD as a useful way to discuss durability tradeoffs: during a partition, availability versus durability; otherwise, latency versus durability. It defines durability narrowly as tolerating t node failures without data loss and notes a simple DAP-style bound, N >= t + 1, but finds it unhelpful because the result depends on how unreachable nodes are counted as failed. In normal operation, synchronous versus asynchronous replication and write quorum size can trade latency for durability, often allowing a non-zero recovery point objective (RPO). During partitions, systems may lower durability based on failure detection or stop best-effort replication after a latency target. The proposal is a taxonomy focused on RPO and t-resiliency, not a general durability theorem.

### Source excerpt

Is there a CAP theorem for Durability? Expanding the taxonomy of distributed systems. The CAP theorem considers only two of the axes of tradeoffs in distributed systems design. There are many others, including operability, security, latency, integrity, efficiency, and durability. I was recently talking over a beer or two with a colleague about whether there is a CAP theorem for durability (DAP theorem?). These are my thoughts. What is durability? To have a meaningful conversation, we need to talk about what durability is. Its typically given a few meanings: Persistence of information to stable storage, to tolerate loss of in-memory (volatile) state. This is the D in ACID. Loss of the data stored in a database. This is typically measured using population statistics. Annualized failure rate (AFR), and Mean Time to Data Loss (MTTDL) are typical, easy to understand, (but flawed1) metrics. Loss of recently committed transactions or recently-written data. On single-node systems, these topics are deeply connected. Persistence to stable storage is required to keep data around across crashes. RAID and backups2 are widely used to protect against permanent loss of the single system. Traditionally, non-zero RPO is tolerated on node failure. Distributed systems can be different. Instead of having a single gold-plated node with its own great durability properties, distributed databases spread the risk out over multiple machines. That unlinks the topics of persistence to stable storage and loss of data, where systems can be tolerant to some number of node reboots without any stable storage. For the rest of this post I'll define durability as "the ability to tolerate t node failures without losing data". It's a flawed but hopefully useful definition. What has this all got to do with CAP? The limits on consistency are well-known. CAP is one boundary in one system model and set of definitions, another (possibly more useful) one is from the all-time classic Consensus in the Presence o

## You Do It Too: Forfeiting Network Partition Tolerance in Distributed Systems

DevFeed: [You Do It Too: Forfeiting Network Partition Tolerance in Distributed Systems](<https://devfeed.tech/articles/you-do-it-too-forfeiting-network-partition-tolerance-in-distributed-systems-21694.md>)

Original publisher: [Read original article](<http://blog.thislongrun.com/2015/07/Forfeit-Partition-Tolerance-Distributed-System-CAP-Theorem.html>)

Author: Nicolas Liochon (noreply@blogger.com)

Published: 2015-07-06T17:25:00Z

Content type: article

Language: en

Sources: [Nicolas Liochon](<https://devfeed.tech/sources/nicolas-liochon.md>)

Topics: [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [Distributed Systems & Parallel Computing](<https://devfeed.tech/topics/distributed-systems-parallel-computing.md>), [consistency](<https://devfeed.tech/topics/consistency.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [availability](<https://devfeed.tech/tags/availability.md>), [bill-gates](<https://devfeed.tech/tags/bill-gates.md>), [ca](<https://devfeed.tech/tags/ca.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [clusters](<https://devfeed.tech/tags/clusters.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [database](<https://devfeed.tech/tags/database.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [durability](<https://devfeed.tech/tags/durability.md>), [hardware](<https://devfeed.tech/tags/hardware.md>), [latency](<https://devfeed.tech/tags/latency.md>), [network](<https://devfeed.tech/tags/network.md>), [partition](<https://devfeed.tech/tags/partition.md>), [partitions](<https://devfeed.tech/tags/partitions.md>), [systems](<https://devfeed.tech/tags/systems.md>), [two-phase-commit](<https://devfeed.tech/tags/two-phase-commit.md>)

### AI overview

The excerpt argues that a CA system is possible when network partitions are sufficiently unlikely to treat as a critical failure, but partition intolerance does not mean partitions cannot occur: the system must have a recovery path if one happens. It traces debate over CA and CP overlap, the practical likelihood of partitions, and the meaning of forfeiting partition tolerance. Abadi argued that CA and CP are essentially identical because both lose availability during a partition; Stonebraker argued that partitions may be unimportant for small systems on modern hardware; Brewer later clarified that choosing CA means partitions are far less probable than other systemic failures. The excerpt begins to present two-phase commit as an example, but cuts off before explaining its operation.

### Source excerpt

"64-node clusters ought to be enough for anybody." Bill Gates, quoted from memory. This post is part of the CAP theorem series. You may want to start by my post on ACID vs. CAP if you have a database background but have never really been exposed to the CAP theorem. The post discussing some traps in the 'Availability' and 'Consistency' definition of CAP could also be used as an introduction if you know CAP but haven't looked at its formal definition. The CA--consistent, available, but not network partition tolerant--category in CAP has a very specific history. Not only forfeiting "network partition tolerance" can be understood as impossible in theory and crazy in practice (P as an illusion of a choice), but there is also an overlap between the CA and CP categories. As a result, many consider that it's impossible to build a production CA system. But you can actually build a system without network partition tolerance, and sometimes you should. A brief history of the CA category Let's look at the academic history of the CA category in CAP: In 2000, Eric Brewer presents the CAP conjecture. In his presentation, CA exists, for example for systems using the two-phase commit protocol. He considers that "‹the whole space is useful." In 2002, Seth Gilbert and Nancy Lynch publish the CAP proof. CA exists: "Systems that run on intranets and LANs are an example of these types of algorithms." In 2010, Daniel Abadi raises the point that there is an overlap between CA and CP: "What does 'not tolerant' mean? In practice, it means that they lose availability if there is a partition. Hence CP and CA are essentially identical." Still in 2010, Michael Stonebraker publishes multiple documents around the limited importance of partitions, with the tagline "Myth #6: In CAP, choose AP over CA", considering that with the capacity of modern hardware, small distributed systems can solve most real-life issues, and that "it doesn't much matter what you do when confronted with network partitions."

## CALISDO: Threat Modeling for Distributed Designs

DevFeed: [CALISDO: Threat Modeling for Distributed Designs](<https://devfeed.tech/articles/calisdo-threat-modeling-for-distributed-designs-12476.md>)

Original publisher: [Read original article](<http://brooker.co.za/blog/2015/06/20/calisto.html>)

Author: Marc Brooker

Published: 2015-06-20T00:00:00Z

Content type: article

Language: en

Sources: [Marc Brooker's](<https://devfeed.tech/sources/marc-brooker-s-blog.md>)

Topics: [consistency](<https://devfeed.tech/topics/consistency.md>), [distributed algorithm](<https://devfeed.tech/topics/distributed-algorithm.md>), [software-architecture](<https://devfeed.tech/topics/software-architecture.md>), [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [Load Balancing](<https://devfeed.tech/topics/load-balancing.md>)

Tags: [availability](<https://devfeed.tech/tags/availability.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [costs](<https://devfeed.tech/tags/costs.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [durability](<https://devfeed.tech/tags/durability.md>), [integrity](<https://devfeed.tech/tags/integrity.md>), [latency](<https://devfeed.tech/tags/latency.md>), [scalability](<https://devfeed.tech/tags/scalability.md>), [threat-modeling](<https://devfeed.tech/tags/threat-modeling.md>)

### AI overview

CALISDO is a mnemonic for reviewing distributed system designs across Consistency, Availability, Latency, Integrity, Scalability, Durability, and Operational Cost. It structures questions about client-visible consistency and availability, operation latency and degradation, data corruption and detection, behavior as load rises past saturation, data loss and correlated failures, and the human and infrastructure costs of operation. The categories interact: latency can trade off with scalability, operational cost can conflict with other goals, and durability decisions may also support availability and integrity. CALISDO is presented as a starting point rather than an exhaustive framework; the excerpt explicitly says separate analysis of critical security properties is still needed.

### Source excerpt

CALISDO: Threat Modeling for Distributed Designs Some steps towards a mnemonic threat model for distributed systems. Threat modeling from the security field, and business impact analysis from the continuity management field, are powerful and influential ways of structured thinking about particular kinds of problems. The power of threat modeling comes from its structure. By imposing a structure on the thought process, we reduce the number of things that we miss, and make the information more analyzable and accessible. Two popular classic tools for structuring threat modeling are STRIDE and DREAD, both originally from Microsoft. While, on the surface, the mnemonics appear cheesy (what is this, the high school science fair?), in practice they are easy to remember, easy to use, and relatively difficult to misunderstand. Can we apply the same kind of structured thinking to analyzing the trade offs in distributed systems we design? CALISDO is my first attempt at a mnemonic for doing STRIDE-style modeling of distributed systems designs. Consistency How do clients experience the consistency of data in the system? Availability How do clients experience the availability of the system for operations? Latency How long does it take for operations to complete? If the system is eventually consistent, how long does it take for data to be visible? Integrity Under what circumstances could data be corrupted? Scalability How does the system scale under load? Durability Under what circumstances could data be lost? Operational Costs What does it take to operate the system? How much will that cost? For Consistency, the focus is on client-visible guarantees, in the sense typically used by distributed systems (i.e. more closely related to A and I than C of ACID). Key questions: When is data visible to clients? How are concurrent updates handled? Are operations atomic from the client's perspective? Can the effects of rolled-back or aborted transactions be seen by other clients? For Availabil

## If CAP were real-time: adding timing requirements to the definition of availability

DevFeed: [If CAP were real-time: adding timing requirements to the definition of availability](<https://devfeed.tech/articles/if-cap-were-real-time-adding-timing-requirements-to-the-definition-of-availability-21693.md>)

Original publisher: [Read original article](<http://blog.thislongrun.com/2015/06/real-time-CAP-theorem.html>)

Author: Nicolas Liochon (noreply@blogger.com)

Published: 2015-06-14T18:20:00Z

Content type: article

Language: en

Sources: [Nicolas Liochon](<https://devfeed.tech/sources/nicolas-liochon.md>)

Topics: [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [Network](<https://devfeed.tech/topics/network.md>), [Availability](<https://devfeed.tech/topics/availability.md>), [real-time](<https://devfeed.tech/topics/real-time.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [computational complexity](<https://devfeed.tech/topics/computational-complexity.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [availability](<https://devfeed.tech/tags/availability.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [database](<https://devfeed.tech/tags/database.md>), [delay](<https://devfeed.tech/tags/delay.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [durability](<https://devfeed.tech/tags/durability.md>), [latency](<https://devfeed.tech/tags/latency.md>), [network](<https://devfeed.tech/tags/network.md>), [partition](<https://devfeed.tech/tags/partition.md>), [real-time](<https://devfeed.tech/tags/real-time.md>), [tcp](<https://devfeed.tech/tags/tcp.md>), [timing](<https://devfeed.tech/tags/timing.md>)

### AI overview

The excerpt argues that adding timing requirements to CAP can make availability useful for reasoning about both partitions and delays. In CAP's asynchronous model, components take steps at arbitrary speeds and there is no timing guarantee, so a message cannot be classified as late and response time cannot be calculated; one can only establish that an application will eventually answer. That model is insufficient for real-life applications requiring results within a reasonable timeframe. TCP is asynchronous but includes additional behavior, making real applications possible; however, its complexity--including changing congestion-avoidance algorithms, gateway effects and conflicting options--makes it difficult to model. The excerpt ends while introducing work on TCP modeling, so it does not show how the proposed timing requirements are defined or applied.

### Source excerpt

"If you are not too long, I will wait here for you all my socketReadTimeout." - Oscar Wilde, quoted from memory. This post is part of the CAP theorem series. You may want to start by my post on ACID vs. CAP if you have a database background but have never really been exposed to the CAP theorem. The post discussing some traps in the 'Availability' and 'Consistency' definition of CAP could also be used as an introduction if you know CAP but haven't looked at its formal definition. Delays are a hot source of confusion when using CAP. Confusion arises out of the understanding of what an asynchronous network--the network model used in the CAP proof--actually is. Confusion arises out of what TCP is exactly. Confusion arises out of the definition of availability in CAP--which does not have any timing requirement. In this post, I'm not only going to cover why speaking about delays when the network is asynchronous is a mistake or why TCP is more than an asynchronous network: I will also show that adding timing requirements to CAP makes it usable not only for partitions but also for delays. Why are there never any delays in academic networks? The CAP proof by Gilbert and Lynch uses an "asynchronous model, in which system components take steps at arbitrary speeds." The key point is that there can be no delay, because there is absolutely no timing guarantee, so a message is never late. That's by design, as stated by Lynch: "algorithms designed for the asynchronous model are general and portable, in that they are guaranteed to run correctly in networks with arbitrary timing behavior." On such a network model, you cannot build an application that needs a guaranteed response time. You cannot even provide an approximation of its expected response time. You can at best prove that the application will answer... someday. You can calculate the number of messages required by a given protocol, but you cannot, in any case, calculate a response time. Such a network is never sufficient to wri

## CAP: if all you have is a timeout, everything looks like a partition

DevFeed: [CAP: if all you have is a timeout, everything looks like a partition](<https://devfeed.tech/articles/cap-if-all-you-have-is-a-timeout-everything-looks-like-a-partition-21690.md>)

Original publisher: [Read original article](<http://blog.thislongrun.com/2015/05/CAP-theorem-partition-timeout-zookeeper.html>)

Author: Nicolas Liochon (noreply@blogger.com)

Published: 2015-05-25T17:42:00Z

Content type: article

Language: en

Sources: [Nicolas Liochon](<https://devfeed.tech/sources/nicolas-liochon.md>)

Topics: [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [Process](<https://devfeed.tech/topics/process.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [apache](<https://devfeed.tech/tags/apache.md>), [apache-zookeeper](<https://devfeed.tech/tags/apache-zookeeper.md>), [availability](<https://devfeed.tech/tags/availability.md>), [big-data](<https://devfeed.tech/tags/big-data.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [change](<https://devfeed.tech/tags/change.md>), [client](<https://devfeed.tech/tags/client.md>), [clients](<https://devfeed.tech/tags/clients.md>), [cluster](<https://devfeed.tech/tags/cluster.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [crash](<https://devfeed.tech/tags/crash.md>), [database](<https://devfeed.tech/tags/database.md>), [detection](<https://devfeed.tech/tags/detection.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [durability](<https://devfeed.tech/tags/durability.md>), [ephemeral](<https://devfeed.tech/tags/ephemeral.md>), [failure](<https://devfeed.tech/tags/failure.md>), [google](<https://devfeed.tech/tags/google.md>), [hadoop](<https://devfeed.tech/tags/hadoop.md>), [hbase](<https://devfeed.tech/tags/hbase.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [know](<https://devfeed.tech/tags/know.md>), [latency](<https://devfeed.tech/tags/latency.md>), [network](<https://devfeed.tech/tags/network.md>), [partition](<https://devfeed.tech/tags/partition.md>), [timeout](<https://devfeed.tech/tags/timeout.md>)

### AI overview

The excerpt distinguishes network partitions from process crashes in CAP, then shows why ZooKeeper's timeout-based detection matters for both. ZooKeeper ephemeral znodes are deleted when a session expires after missed heartbeats, notifying clients watching them. HBase uses this mechanism for failure detection; its exclusion mechanism is outside ZooKeeper. Because expiration typically takes about 20 seconds, the timeout is a major contributor to mean time to recovery across process crashes, node failures and network partitions. The excerpt begins to describe why partitions are harder to interpret, but cuts off before completing that discussion.

### Source excerpt

"I suppose it is tempting, if the only tool you have is a timeout, to treat everything as if it were a partition." - Abraham Maslow, quoted from memory This post is part of the CAP theorem series. You may want to start by my post on ACID vs. CAP if you have a database background but have never really been exposed to the CAP theorem. The post discussing some traps in the 'Availability' and 'Consistency' definition of CAP should also be used as an introduction if you know CAP but haven't looked at its formal definition. Partitions in the CAP theorem are network partitions, and nothing else. There're not node failure or process crash. But does this matter in real-life? Let's answer this question by looking at an optimisation implemented on Apache HBase and Apache ZooKeeper when handling process crash. This is applicable by anyone using ZooKeeper. Apache HBase, ZooKeeper and failure detection Using ZooKeeper website: "ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. All of these kinds of services are used in some form or another by distributed applications." And HBase website: "Apache HBase™ is the Hadoop database, a distributed, scalable, big data store." HBase is an open source implementation of Google's Bigtable. Cluster size varies from 5 to x000 nodes. ZooKeeper is used by HBase for a few things, one of them being, like in Bigtable, detecting failures. ZooKeeper manages failures by giving the user the possibility to create "ephemeral nodes". "These znodes exist as long as the session that created the znode is active. When the session ends the znode is deleted." And then "Expirations happen when the cluster does not hear from the client within the specified session timeout period (i.e. no heartbeat). At session expiration the cluster will delete any/all ephemeral nodes owned by that session and immediately notify any/all connected clients of the change (anyone w

## The Consistency Series

DevFeed: [The Consistency Series](<https://devfeed.tech/articles/the-consistency-series-21692.md>)

Original publisher: [Read original article](<http://blog.thislongrun.com/2015/05/the-consistency-series.html>)

Author: Nicolas Liochon (noreply@blogger.com)

Published: 2015-05-12T15:43:00Z

Content type: article

Language: en

Sources: [Nicolas Liochon](<https://devfeed.tech/sources/nicolas-liochon.md>)

Topics: [consistency](<https://devfeed.tech/topics/consistency.md>), [Database](<https://devfeed.tech/topics/database.md>), [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [acid](<https://devfeed.tech/topics/acid.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [availability](<https://devfeed.tech/tags/availability.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [database](<https://devfeed.tech/tags/database.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [durability](<https://devfeed.tech/tags/durability.md>), [latency](<https://devfeed.tech/tags/latency.md>), [network](<https://devfeed.tech/tags/network.md>), [partition](<https://devfeed.tech/tags/partition.md>), [series](<https://devfeed.tech/tags/series.md>)

### AI overview

The consistency series aims to move beyond framing consistency choices only as strong versus eventual consistency or as W+R versus N, and instead examine practical details of consistency models and their implementations. The listed post, "Eventual Consistency and Durability," connects durability with consistency, explains why traditional databases include the "D" in ACID, and describes what W=1 implies in the Dynamo model. The excerpt gives the series introduction and this post's description, not the full post or further implementation details.

### Source excerpt

"Those are my consistency models, and if you don't like them... well, I have others." - Groucho Marx, quoted from memory The CAP theorem series is coming to an end. I have a few posts planned, but they will be mainly about wrapping things-up-- I hope these posts will be great, though. Anyway, here starts a new series: the consistency series. This series is about getting into some practical details about the consistency models and their implementations. You think that the trade-off is only or mainly on strong consistency vs. eventual consistency? That everything is said with "W+R" vs. "N"? Then read this series. Settling on the color may not be enough when choosing a car. Posts, in recommended reading order The posts published so far are: Eventual Consistency and Durability: shows the link between durability and consistency, and why traditional databases have the 'D' in ACID. Tells you what 'W=1' implies in the Dynamo model.

## The unclear CP vs. CA case in CAP

DevFeed: [The unclear CP vs. CA case in CAP](<https://devfeed.tech/articles/the-unclear-cp-vs-ca-case-in-cap-21689.md>)

Original publisher: [Read original article](<http://blog.thislongrun.com/2015/04/the-unclear-cp-vs-ca-case-in-cap.html>)

Author: Nicolas Liochon (noreply@blogger.com)

Published: 2015-04-05T16:53:00Z

Content type: article

Language: en

Sources: [Nicolas Liochon](<https://devfeed.tech/sources/nicolas-liochon.md>)

Topics: [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [consistency](<https://devfeed.tech/topics/consistency.md>), [Database](<https://devfeed.tech/topics/database.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [apache-zookeeper](<https://devfeed.tech/tags/apache-zookeeper.md>), [availability](<https://devfeed.tech/tags/availability.md>), [ca](<https://devfeed.tech/tags/ca.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [consensus](<https://devfeed.tech/tags/consensus.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [database](<https://devfeed.tech/tags/database.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [durability](<https://devfeed.tech/tags/durability.md>), [latency](<https://devfeed.tech/tags/latency.md>), [network](<https://devfeed.tech/tags/network.md>), [partition](<https://devfeed.tech/tags/partition.md>), [sql](<https://devfeed.tech/tags/sql.md>), [two-phase-commit](<https://devfeed.tech/tags/two-phase-commit.md>)

### AI overview

The excerpt argues that CAP labels such as CA, CP and AP can obscure how a distributed system actually behaves, especially because it is unclear what it means to forfeit partition tolerance. It says the post will compare a single-server application with a traditional SQL database, the same application with an eventually consistent store, a multi-database application using two-phase commit, and consensus servers such as Apache ZooKeeper and Google Chubby. To avoid ambiguity, it uses CAP rather than ACID terminology and adopts Gilbert and Lynch's formal definitions; consistency means atomic, linearizable operations ordered as if handled one at a time. The excerpt cuts off during the availability definition, so it does not show the promised classifications or conclusions.

### Source excerpt

This post is part of the CAP theorem series. You may want to start by my post on ACID vs. CAP if you have a database background but have never really been exposed to the CAP theorem. The post discussing some traps in the 'Availability' and 'Consistency' definition of CAP should also be used as an introduction if you know CAP but haven't looked at its formal definition. CAP is a theorem, but it is also widely used to categorize distributed systems and to explain their trade-offs. It looks great: "Hey, it's based on a theorem! This is scientifically proven!" However, the meaning of these categories--AP, CP, CA--is not that clear, leading to an opposite result: the CAP categorization says very little on how the distributed system actually behaves. For example, look at the CA category--Consistent and Available but not Partition-tolerant. A widely accepted opinion is: "Partition cannot be avoided. Your distributed system can just choose to sacrifice either consistency or availability when a partition occurs. So a distributed system cannot be CA, by definition." Indeed, Eric Brewer himself, wrote in 2012 [C3]: "Does choosing consistency and availability (CA) as the '2 of 3' make sense? As some researchers correctly point out, exactly what it means to forfeit P is unclear." Should one use the CA category then? A slide saying that some systems are CA. Does its author really understand CAP? To answer this question, we're going to use CAP to categorize a few different distributed systems: A simple application using a single server with a traditional SQL database. The same application, but with an Eventually Consistent store instead of our traditional SQL one. An application using multiple databases and the two-phase commit protocol. A distributed consensus server, like Apache ZooKeeper or Google Chubby. Also, as we know, using CAP in a database context can be confusing. In this post, I always use CAP terminology and not ACID terminology. When I say "consistent" or "strongly c

## Don't use the CAP theorem for packet losses

DevFeed: [Don't use the CAP theorem for packet losses](<https://devfeed.tech/articles/don-t-use-the-cap-theorem-for-packet-losses-21685.md>)

Original publisher: [Read original article](<http://blog.thislongrun.com/2015/03/dont-use-cap-theorem-for-packet-losses.html>)

Author: Nicolas Liochon (noreply@blogger.com)

Published: 2015-03-18T15:16:00Z

Content type: article

Language: en

Sources: [Nicolas Liochon](<https://devfeed.tech/sources/nicolas-liochon.md>)

Topics: [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [Network](<https://devfeed.tech/topics/network.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [atomic](<https://devfeed.tech/tags/atomic.md>), [availability](<https://devfeed.tech/tags/availability.md>), [bandwidth](<https://devfeed.tech/tags/bandwidth.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [database](<https://devfeed.tech/tags/database.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [durability](<https://devfeed.tech/tags/durability.md>), [ip](<https://devfeed.tech/tags/ip.md>), [latency](<https://devfeed.tech/tags/latency.md>), [linearizable](<https://devfeed.tech/tags/linearizable.md>), [memory](<https://devfeed.tech/tags/memory.md>), [messages](<https://devfeed.tech/tags/messages.md>), [network](<https://devfeed.tech/tags/network.md>), [network-packets](<https://devfeed.tech/tags/network-packets.md>), [node](<https://devfeed.tech/tags/node.md>), [packet](<https://devfeed.tech/tags/packet.md>), [packets](<https://devfeed.tech/tags/packets.md>), [partition](<https://devfeed.tech/tags/partition.md>), [partitions](<https://devfeed.tech/tags/partitions.md>), [protocol](<https://devfeed.tech/tags/protocol.md>), [tcp](<https://devfeed.tech/tags/tcp.md>), [udp](<https://devfeed.tech/tags/udp.md>)

### AI overview

The excerpt argues that ordinary packet loss on IP networks does not by itself require applying CAP theorem trade-offs. CAP's partition definition concerns a network that may lose arbitrarily many messages between nodes. By contrast, the excerpt describes common packet loss as congestion: equipment receives more traffic than it can forward, and TCP treats losses as a congestion signal, quickly slowing its sending rate before trying to increase it again. Because TCP aims to use available bandwidth, such losses can occur even on a LAN with mixed workloads. The excerpt says packet loss still needs attention, but ends before explaining the full distinction or its practical consequences.

### Source excerpt

In the previous post, we looked at this common saying: "nodes fail, network packets get lost, partitions happen so you need to use CAP to understand your trade-offs." We saw that node failures were not partitions. What about packet losses? Most distributed applications use TCP or UDP on top of IP, and it is well known that IP is an asynchronous protocol and that it can lose packets. So should we use all the results from the theory of asynchronous networks? Must we use CAP to do some trade-offs if we are using a network that can drop packets? The answer is no. The root issue lies in the incompleteness of our description of IP. "IP is an asynchronous protocol and it can lose packets" is true, but incomplete, and this incompleteness is misleading. Let's discuss why. CAP - The usual reminder CAP says that a distributed system cannot be Consistent, Available and Partition tolerant. We use here the definitions from the proof [C2]. Consistent is: [C2] "Atomic, linearizable, consistency [...]. There must exist a total order on all operations such that each operation looks as if it were completed at a single instant. This is equivalent to requiring requests of the distributed shared memory to act as if they were executing on a single node, responding to operations one at a time." Available is: [C2] "For a distributed system to be continuously available, every request received by a non-failing node in the system must result in a response." Partition is: [C2] "The network will be allowed to lose arbitrarily many messages sent from one node to another. When a network is partitioned, all messages sent from nodes in one component of the partition to nodes in another component are lost." How can you lose packets on a network Packet loss happens when a network equipment receives more messages that it can send. Losing packets is common on an IP network. A TCP connection tries to use most of the bandwidth available. It sends nearly as many packets as it can, until it loses some. Losi

## Don't use the CAP theorem for node failures

DevFeed: [Don't use the CAP theorem for node failures](<https://devfeed.tech/articles/don-t-use-the-cap-theorem-for-node-failures-21684.md>)

Original publisher: [Read original article](<http://blog.thislongrun.com/2015/03/dead-nodes-dont-bite.html>)

Author: Nicolas Liochon (noreply@blogger.com)

Published: 2015-03-13T10:22:00Z

Content type: article

Language: en

Sources: [Nicolas Liochon](<https://devfeed.tech/sources/nicolas-liochon.md>)

Topics: [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [Availability](<https://devfeed.tech/topics/availability.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [availability](<https://devfeed.tech/tags/availability.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [database](<https://devfeed.tech/tags/database.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [durability](<https://devfeed.tech/tags/durability.md>), [latency](<https://devfeed.tech/tags/latency.md>), [network](<https://devfeed.tech/tags/network.md>), [node](<https://devfeed.tech/tags/node.md>), [partition](<https://devfeed.tech/tags/partition.md>)

### AI overview

A crashed node is outside CAP's stated availability requirement, so node failure alone is not the same case as a network partition in the theorem. The excerpt defines availability in terms of requests received by non-failing nodes and defines a partition as the network losing arbitrarily many messages between nodes. It rejects the intuition that a silent failed node and a partitioned node are interchangeable, then says it will examine the proof and real data store implementations; the supplied text cuts off before those arguments are shown.

### Source excerpt

"Dead nodes don't bite." - Robert Louis Stevenson (quoted from memory) CAP is often described as a theorem you cannot avoid using. A common saying is "nodes fail, network packets get lost, partitions arise so you need to use CAP to choose the trade-offs." Actually, the CAP scope is not that wide. Let's look at why a process crash or a node failure are not partitions in CAP. CAP - the usual reminder CAP is a theorem, initially conjectured by Eric Brewer and proved in 2002 by Seth Gilbert and Nancy Lynch proved [C2]. Its catchy definition is: "Consistency, Availability, Partition tolerance: pick two." Let's remind the definitions from the proof [C2]. Consistent is: "Atomic, linearizable, consistency [...]. There must exist a total order on all operations such that each operation looks as if it were completed at a single instant. This is equivalent to requiring requests of the distributed shared memory to act as if they were executing on a single node, responding to operations one at a time." Available is: "For a distributed system to be continuously available, every request received by a non-failing node in the system must result in a response." Partition is: "The network will be allowed to lose arbitrarily many messages sent from one node to another. When a network is partitioned, all messages sent from nodes in one component of the partition to nodes in another component are lost." Node failure vs. partition - the wrong intuition A common and wrong intuition is: "from the point of view of the remaining nodes, it is impossible to distinguish a node that has failed from a node that is on another partition: in both cases, it does not respond nor sends any message. As a consequence, there is no difference between a network partition and a node failure." Let's try this intuition: first against the definition of CAP, then against its proof, and then against real-life data store implementations. Is this crocodile dead or is it just sleeping? There is no difference until yo

## Comparing Eventually Consistent and CP-as-in-CAP stores

DevFeed: [Comparing Eventually Consistent and CP-as-in-CAP stores](<https://devfeed.tech/articles/comparing-eventually-consistent-and-cp-as-in-cap-stores-21683.md>)

Original publisher: [Read original article](<http://blog.thislongrun.com/2015/03/comparing-eventually-consistent-and-cp-CAP.html>)

Author: Nicolas Liochon (noreply@blogger.com)

Published: 2015-03-11T15:13:00Z

Content type: article

Language: en

Sources: [Nicolas Liochon](<https://devfeed.tech/sources/nicolas-liochon.md>)

Topics: [consistency](<https://devfeed.tech/topics/consistency.md>), [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [availability](<https://devfeed.tech/tags/availability.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [database](<https://devfeed.tech/tags/database.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [durability](<https://devfeed.tech/tags/durability.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [key-value-store](<https://devfeed.tech/tags/key-value-store.md>), [latency](<https://devfeed.tech/tags/latency.md>), [network](<https://devfeed.tech/tags/network.md>), [partition](<https://devfeed.tech/tags/partition.md>), [storage](<https://devfeed.tech/tags/storage.md>)

### AI overview

The excerpt argues that an eventually consistent key-value store must eventually return the last written value on every access once updates stop. A store that never writes or that randomly fails reads does not satisfy this definition. The author also shows a contrived implementation that returns no value until 2020 and then reads the stored value: it technically fits the wording but exploits its limits. The excerpt ends before explaining how this compares with CP-store performance.

### Source excerpt

Eventual Consistency (EC) is a well known concept. The CAP theorem, which defines Consistency, Availability and Partition tolerance is also well known. It describes some distributed systems such as CP, which has two properties: Consistency and Partition tolerance. If we look at data stores just by how they stick to the definition of their consistency model and compare their speeds, which one would be the fastest? An EC or a CP store? Answering this question is a good excuse to go into some detail of their respective definitions and show some of their limits. Contrary to popular belief, data stores can be very fast Eventually Consistent Eventually Consistent was defined by Werner Vogels in [E2]: "the storage system guarantees that if no new updates are made to the object, eventually all accesses will return the last updated value." Let's try a few implementations of a hypothetical key value store. Implementation 1: Trying the simplest option void put(key, value){ // do nothing } value get(key){ // Hey, it's easy to implement! We're going // to pretend that we have not yet received // the write, it is enough! throw "no value for this key" } Is this an EC store? No, it is not, because it will never return the last updated value. To be an EC store you need to "eventually [...] return the last updated value." That's not what this implementation does, it will never return the last updated value. So let's try another one. Implementation 2: Trying to be fast for reads void put(key, value){ doRealPut(key, value) // does the 'real' job } value get(key){ if (random(2) == 1) // 50% of the time throw "no value for this key" else return doRealGet(key) // As, 50% of the time, I pretend // that I have not yet received // the first insertion, I // divide the latency by two! } Is this an EC store? Again, it is not because it does not respect the property "eventually all accesses will return the last updated value." The "all accesses" condition is not met. The definition does not prev

## The CAP theorem series

DevFeed: [The CAP theorem series](<https://devfeed.tech/articles/the-cap-theorem-series-21686.md>)

Original publisher: [Read original article](<http://blog.thislongrun.com/2015/03/the-cap-theorem-series.html>)

Author: Nicolas Liochon (noreply@blogger.com)

Published: 2015-03-10T15:10:00Z

Content type: article

Language: en

Sources: [Nicolas Liochon](<https://devfeed.tech/sources/nicolas-liochon.md>)

Topics: [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [Database](<https://devfeed.tech/topics/database.md>), [consistency](<https://devfeed.tech/topics/consistency.md>), [acid](<https://devfeed.tech/topics/acid.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [availability](<https://devfeed.tech/tags/availability.md>), [big-data](<https://devfeed.tech/tags/big-data.md>), [ca](<https://devfeed.tech/tags/ca.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [commit](<https://devfeed.tech/tags/commit.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [database](<https://devfeed.tech/tags/database.md>), [databases](<https://devfeed.tech/tags/databases.md>), [distributed-system](<https://devfeed.tech/tags/distributed-system.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [durability](<https://devfeed.tech/tags/durability.md>), [high-availability](<https://devfeed.tech/tags/high-availability.md>), [isolation](<https://devfeed.tech/tags/isolation.md>), [latency](<https://devfeed.tech/tags/latency.md>), [network](<https://devfeed.tech/tags/network.md>), [network-protocol](<https://devfeed.tech/tags/network-protocol.md>), [node](<https://devfeed.tech/tags/node.md>), [packet](<https://devfeed.tech/tags/packet.md>), [partition](<https://devfeed.tech/tags/partition.md>), [partitions](<https://devfeed.tech/tags/partitions.md>), [series](<https://devfeed.tech/tags/series.md>), [tcp](<https://devfeed.tech/tags/tcp.md>), [timeout](<https://devfeed.tech/tags/timeout.md>)

### AI overview

The series explains how CAP's definitions of consistency, availability, and partition differ from common interpretations, and why those distinctions affect how distributed systems are categorized. It compares eventual consistency with CAP consistency, separates ACID terminology from CAP terminology, and examines why node failures and packet loss are not automatically partitions. Later posts address systems that fit none of the usual CAP categories, the meaning of CA and two-phase commit with heuristic decisions, and the difference between CAP availability and high availability. The excerpt also says a post argues that AP is impossible for an eventually consistent big data store and describes a ZooKeeper timeout example, but its final description is cut off.

### Source excerpt

Let me introduce a new series of posts on the CAP theorem. CAP is a well known theorem conjectured and proven by recognized researchers in distributed systems, namely Eric Brewer, Seth Gilbert and Nancy Lynch. It is also widely used to categorize distributed applications. With CAP, do computer scientists actually have a better classification tool than biologists? Why you want to read this series on CAP theorem and databases This series covers some points often forgotten or misunderstood and sometimes never mentioned, such as: '42' is not a valid answer for an eventually consistent database; Node failures and packet loss are not partitions; Consistent in ACID and Consistent in CAP are two different things; The CAP definition of availability is key but very different from what most people think; There are some systems that do not fit into the three CA/CP/CA categories; It's possible to use the CA category, really possible, There is no such thing as an eventually consistent and available big data database. The posts, in recommended reading order Comparing Eventually Consistent and CP-as-in-CAP stores: Introduces the definitions of "Consistent" and "Available" in the CAP theorem. By comparing them with the definition of "Eventual Consistency" we show the limits of these definitions. The confusing ACID and CAP wording: Explains the terminologies of ACID and CAP, and how they overlap. Covers as well the difference between the theoretical definition of the 'I' in ACID and its actual implementation with multiple "isolation degrees". It's a good starting point if you know the "Consistency" definition of ACID but not the "Consistency" definition of CAP. Don't use the CAP theorem for node failures: Looks at a common misunderstanding of the CAP theorem: node failures are not partitions. It's also a pretext to look at the actual proof of CAP, and to go into the definition of "Partition" in CAP. Don't use the CAP theorem for packet losses: Looks at another common misunderstanding

## Ice Cream and Distributed Systems

DevFeed: [Ice Cream and Distributed Systems](<https://devfeed.tech/articles/ice-cream-and-distributed-systems-12465.md>)

Original publisher: [Read original article](<http://brooker.co.za/blog/2014/10/25/ice-cream.html>)

Author: Marc Brooker

Published: 2014-10-25T00:00:00Z

Content type: article

Language: en

Sources: [Marc Brooker's](<https://devfeed.tech/sources/marc-brooker-s-blog.md>)

Topics: [consistency](<https://devfeed.tech/topics/consistency.md>), [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [distributed algorithm](<https://devfeed.tech/topics/distributed-algorithm.md>), [synchronization](<https://devfeed.tech/topics/synchronization.md>)

Tags: [added](<https://devfeed.tech/tags/added.md>), [clock](<https://devfeed.tech/tags/clock.md>), [commit](<https://devfeed.tech/tags/commit.md>), [counts](<https://devfeed.tech/tags/counts.md>), [data-types](<https://devfeed.tech/tags/data-types.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [ice](<https://devfeed.tech/tags/ice.md>), [messages](<https://devfeed.tech/tags/messages.md>), [network](<https://devfeed.tech/tags/network.md>), [write](<https://devfeed.tech/tags/write.md>)

### AI overview

Using an ice cream story, the excerpt illustrates several distributed-systems limits and techniques. In an asynchronous network partition, a write in one group cannot be reflected by a later read in another if all messages between them are lost, motivating the consistency tradeoff described through Gilbert and Lynch. Leases can coordinate decisions only with clock assumptions: bounded clock drift requires accounting for skew in the lease timeout. Independent counts and sets can be merged, but enforcing a limit with "reduce by one if the count is greater than zero" is noncommutative; an OR set with unique tags addresses mismatched additions and removals in flavor tracking, not the serving limit. Finally, two-phase commit uses four messages for three participants in the described scheme, and the excerpt cites a lower bound of 2(n−1) messages to commit without processor failures.

### Source excerpt

Ice Cream and Distributed Systems Can we serve a fair amount of ice cream? When I was a child, I really liked to eat ice cream. It's still pretty great, but back then I was somewhat fanatical about it. My parents knew that the delicious mix of fat and sugar was best served only occasionally, and would carefully limit my intake. I, of course, found a way around the system. First, I'd go to my mother and ask if it was time for ice cream, and she would give me an answer. If she answered in the negative, I'd ask my father the same question. That strategy increased by chances of an affirmative answer, because the decisions that my parents made were not consistent. Occasionally, I'd even eat some served by my mother, and then try my father for a second bowl. After a while of running this scheme, my parents figured it out. They decided that they needed to give me a consistent answer, and the only way to do that was to talk to each other every time I asked the question. Their coordination approach worked great. It guaranteed a consistent answer, and only made young Marc wait a little longer for his question to be answered. It all broke down when my parents went to work. Being a child, I could find a good excuse to speak to either parent at any time, but their jobs prevented them from speaking to each other. Once again, I could use the situation to my rich, sweet, and creamy advantage. With my parents unable to communicate, I was able to force an inconsistent decision. Did my parents miss a trick that would have allowed them to make a consistent ice cream serving decision without being able to talk to one another? Assume that the network consists of at least two nodes. Thus it can be divided into two disjoint, non-empty sets: {G1, G2}. The basic idea of the proof is to assume that all messages between G1 and G2 are lost. Then if a write occurs in G1, and later a read occurs in G2, then the read operation cannot return the results of the earlier write operation. Assuming that

## Harvest and Yield: Not A Natural Cure for Tradeoff Confusion

DevFeed: [Harvest and Yield: Not A Natural Cure for Tradeoff Confusion](<https://devfeed.tech/articles/harvest-and-yield-not-a-natural-cure-for-tradeoff-confusion-12464.md>)

Original publisher: [Read original article](<http://brooker.co.za/blog/2014/10/12/harvest-yield.html>)

Author: Marc Brooker

Published: 2014-10-12T00:00:00Z

Content type: opinion

Language: en

Sources: [Marc Brooker's](<https://devfeed.tech/sources/marc-brooker-s-blog.md>)

Topics: [CAP theorem](<https://devfeed.tech/topics/cap-theorem.md>), [consistency](<https://devfeed.tech/topics/consistency.md>), [Database](<https://devfeed.tech/topics/database.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>), [acid](<https://devfeed.tech/topics/acid.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [availability](<https://devfeed.tech/tags/availability.md>), [bandwidth](<https://devfeed.tech/tags/bandwidth.md>), [bloom-filters](<https://devfeed.tech/tags/bloom-filters.md>), [cap-theorem](<https://devfeed.tech/tags/cap-theorem.md>), [completeness](<https://devfeed.tech/tags/completeness.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [linearizability](<https://devfeed.tech/tags/linearizability.md>), [pacelc](<https://devfeed.tech/tags/pacelc.md>), [partition](<https://devfeed.tech/tags/partition.md>), [tradeoffs](<https://devfeed.tech/tags/tradeoffs.md>), [yield](<https://devfeed.tech/tags/yield.md>)

### AI overview

The harvest-and-yield model describes a practical tradeoff during faults: a system can preserve the chance of responding (yield) while returning a less complete answer (harvest). The author values this idea, along with graceful degradation and provisioning state management separately for subsystems that need strong consistency or persistence. They criticize the paper for unclear definitions, conflating partial responses with bandwidth and latency techniques, and presenting CA in a way that may suggest it is viable even with linearizability or serializability. The author concludes that harvest and yield help describe design choices within the limits CAP identifies; they are not a replacement for CAP. This overview reflects the supplied excerpt.

### Source excerpt

Harvest and Yield: Not A Natural Cure for Tradeoff Confusion Comments on a 15 year old paper. As I wrote about in my post on PACELC, I don't think the CAP theorem is the right way for teachers to present distributed systems tradeoffs. I also don't think it's ideal for working practitioners, despite its wide use. I prefer Abadi's PACELC, but there are legitimate criticisms of that one too. One criticism is that it's poorly formalized, which makes it hard to apply to precise statements. Another is the PC/EL is an awkward edge case. There are more. Fox and Brewer's harvest and yield model, from Harvest, Yield, and Scalable Tolerant Systems, is a widely promoted alternative. While I like the concepts of harvest and yield, I find it hard to recommend the paper. Both Eric Brewer and Armando Fox have made big contributions to the field, and I like many of their papers. I just don't like this one. I'll start with what I dislike most about it. From the first page: Partition-resilience means that the system as whole can survive a partition between data replicas. CA without P: Databases that provide distributed transactional semantics can only do so in the absence of a network partition separating server peers. I find these statements awkward, and feel like they support the mistaken belief that CA is a valid option. You certainly can't pick CA where your C is linearizability (as in Gilbert and Lynch's proof) or serializability. If you're allowed to pick CA, either your definition of C is weaker than either of those, your definition of A doesn't require minority partitions to make progress, or you're in denial about network partitions (which do exist). Compare the definition of CP: CP without A: In the event of a partition, further transactions to an ACID database may be blocked until the partition heals, to avoid the risk of introducing merge conflicts (and thus inconsistency). Is that saying that CA exists, but just introduces inconsistencies that CP doesn't? Overall, I don't

[Next page](<https://devfeed.tech/topics/cap-theorem.md?cursor=WyIyMDE0LTEwLTEyVDAwOjAwOjAwKzAwOjAwIiwgImFlMGUwMTk5LTJiZTEtNDk5NS1iMmJkLWM1NjdiZjY2ZDkxOSJd>)