AlgoMaster Logo

Three-Phase Commit (3PC)

Low Priority7 min readUpdated May 26, 2026
AI Mock Interview

Practice this topic in a realistic system design interview

Three-Phase Commit (3PC) is an atomic commit protocol designed to reduce the blocking problem in Two-Phase Commit.

In 2PC, a participant that has voted yes is stuck if the coordinator disappears before delivering the final decision. It cannot safely commit or abort on its own, so it waits, often while holding locks. 3PC inserts an extra phase between "everyone voted yes" and "commit now" so that participants have enough information to make progress without the coordinator.

3PC is rarely used in production. Its non-blocking behavior depends on strong assumptions: bounded message delays, reliable failure detection, fail-stop processes, and no network partitions. Real networks usually do not satisfy those assumptions. The protocol is still worth understanding because it makes the relationship between atomic commit, blocking, and timing assumptions explicit.

The 2PC Blocking Problem

In 2PC, the dangerous state is prepared, also called in doubt.

A prepared participant knows only part of the story.

What It KnowsWhat It Does Not Know
It voted yesWhether every other participant voted yes
It can commit if told to commitWhether the coordinator decided commit or abort
It must follow the final decisionWhether another participant already received that decision

If participants knew that everyone had voted yes before the coordinator failed, commit would be safe. If they knew that not everyone had voted yes, abort would be safe.

3PC adds a phase to communicate exactly that missing information.

The Three Phases

Premium Content

This content is for premium members only.