# Why does Neon use Paxos instead of Raft, and what's the difference?

DevFeed: [Why does Neon use Paxos instead of Raft, and what's the difference?](<https://devfeed.tech/articles/why-does-neon-use-paxos-instead-of-raft-and-what-s-the-difference-5712.md>)

Original publisher: [Read original article](<https://neon.com/blog/paxos>)

Author: Stas Kelvich

Published: 2022-08-02T13:04:00Z

Content type: article

Language: en

Sources: [Blog -- Neon Docs](<https://devfeed.tech/sources/blog-neon-docs.md>)

Topics: [Raft](<https://devfeed.tech/topics/raft.md>), [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Rust](<https://devfeed.tech/topics/rust.md>), [Availability](<https://devfeed.tech/topics/availability.md>)

Tags: [availability](<https://devfeed.tech/tags/availability.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [raft](<https://devfeed.tech/tags/raft.md>), [replication](<https://devfeed.tech/tags/replication.md>), [rust](<https://devfeed.tech/tags/rust.md>)

## AI overview

The article explains why Neon uses a Paxos-like consensus design instead of standard Raft. Neon separates storage from compute and replaces PostgreSQL's persistence layer with custom distributed storage written in Rust, resulting in nodes that may lack persistent disks. Its design combines Paxos-like role separation and recovery with a Raft-like election procedure, with TLA⁺ used to check the modifications. The article also discusses high availability and failover in PostgreSQL, including replica promotion and the split-brain risks that tools such as Patroni and Stolon help address.

## Source excerpt

TLDR: Neon separates storage and compute, substituting the PostgreSQL persistency layer with a custom-made distributed storage written in Rust. Due to this separation, some nodes don't have persistent disks. The original Raft paper works only with uniform nodes, but Paxos variant...