Hacker News new | ask | show | jobs
by s8kur 23 days ago
Consensus is one of those areas where the interesting engineering and the number of people who actually need it are inversely correlated. Most "we need distributed coordination" turns out to be "we need one writer and a lock," which a single Postgres hands you for free: advisory locks, SELECT ... FOR UPDATE, SKIP LOCKED for work distribution. Linearizability without running Raft..

The real threshold is multi-region writes on a hard latency budget, and even then a single-region primary plus accepting cross-region read latency beats eating a consensus round-trip on every write for a lot of teams. Curious what workload pushed you past single-primary - usually a better story than the impl itself.

2 comments

> Most "we need distributed coordination" turns out to be "we need one writer and a lock," which a single Postgres hands you for free

1. This article is about Cloudflare developing for their own internal control plane--I'm fairly certain their requirements preclude a single Postgres

2. Even if you're not Cloudflare, you may not want to be limited by the availability of a single Postgres instance.

> This article is about Cloudflare developing for their own internal control plane--I'm fairly certain their requirements preclude a single Postgres.

True, but the article claims both strong consistency (sort of) and linearizability; that is basically a serializable writer and a lock; if I read correctly (I haven't read all the details), the article conflates both; afaik it is possible to have linearizability with eventual consistency; algorithms to solve concurrent writes and having multiple writers in raft is a "solved problem". sad to see such a spotty article on such important topic by a major company, even if the underlying paper is strong. This feels like manure.

Disclaimer: im not an expert on this. But serious implementations outright mention jepsen usage. Just saying.
Are you arguing that most teams that recognise a need for a distributed system chicken-out and use a single node instead, and if so, is that a good thing?