Safety Guarantees in Distributed Systems

In this lesson, we will explore the properties that guarantee safety in distributed systems, and their relation with difficulties in designing distributed systems.

Since distributed systems involve a lot of complexity, some safety guarantees ensure that the system will behave in specific, predictable ways. This makes it easier for people to reason about a system and any potential anomalies that can occur. This will allow them to build proper safeguards to prevent these anomalies from occurring.

Safety guarantors

The main safety guarantees that systems provide are around the three properties shown in the illustration.

The concepts of atomicity and isolation originate from database research and ACID transactions. When we mention consistency in this course, we will mostly refer to the notion of consistency made popular by the CAP theorem.

Before going any further, it is useful to look at these topics. We will study these two topics in detail in the next two lessons.

It is interesting to observe that each of these safety guarantees is tightly related to the aforementioned reasons that make distributed systems hard to design.

Achieving atomicity

It is challenging to achieve atomicity in a distributed system because of the possibility of partial failures.

A partial failure occurs when some components in the system fail. The following illustration shows this.

Achieving consistency

It is challenging to achieve consistency because of the network asynchrony.

Network asynchrony occurs when different nodes in a network have different values for the current time. The following illustration shows this.

Achieving isolation

It is challenging to achieve isolation because of the inherent concurrency of distributed systems.

Concurrency occurs when multiple things happen at the same time. The following illustration shows this.

In the above illustration, two pens are trying to write on a single resource at the same time.

Get hands-on with 1400+ tech skills courses.