HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
apache
couchdb
Erlang2010–2025
apache / couchdb

couchdb

Seamless multi-primary syncing database with an intuitive HTTP/JSON API, designed for reliability

11Distinct people
12Mentions
0Explicit recommenders
7KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Seamless multi-primary syncing database with an intuitive HTTP/JSON API, designed for reliability

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 12:54:37 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year12 dated mentions

Observed mentions: 2010-08-13 18:56:11 UTC to 2025-03-14 19:14:17 UTC.

0122010-01-01 00:00:00 UTC to 2011-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20102011-01-01 00:00:00 UTC to 2012-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2012-01-01 00:00:00 UTC to 2013-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20102010-01-01 00:00:00 UTC2011-01-01 00:00:00 UTC101
20112011-01-01 00:00:00 UTC2012-01-01 00:00:00 UTC211
20122012-01-01 00:00:00 UTC2013-01-01 00:00:00 UTC101
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC000
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC101
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC000
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC000
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC101
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC101
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC110
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101

What Hacker News says

12 sources
So there's a bit of a misunderstanding here in the chain of blog posts that I can clear up. First, from this article: That’s the question I’ve been mulling over for days, because I don’t see how this action can make any particular guarantees about durability, at least not in any portable way. This part is super easy to clear up. CouchDB in no way relies on an fsync after open for any guarantee on durability. As shown in [1], CouchDB has been running an fsync on file open since extremely early in its development. However, I can easily see how just reading the Neighbourhoodie article would lead here. The missing context is that CouchDB primarily fsync's after open because when an empty database is created, we write a header to disk. The very early implementation in [1] just didn't limit this to only cases where we write the header an
Read the rest
d that general behavior has never been changed (though the implementation is a bit different today, the effect is the same). Also, in hindsight, I believe this claim in the Neighbourhoodie is probably too strong: However, CouchDB is not susceptible to the sad path. I didn't read the article super closely the first time since I'd been through the background discussions on the finer details, but today I'd probably hedge that a bit with language along the lines of: However, CouchDB is *probably* not susceptible to the sad path. While we can't guarantee it can't happen due to how various I/O operations are (not) specified, we're doing as much as we can to prevent it. Also, don't forget that your storage device might be lying about fsync anyway. The underlying logic around that requires considering the original blog post in this chain [3]. That article posits a pathological error condition where we write something, crash, restart, issue read from a dirty page cache, and then hard crashing the entire machine. In this case, the database returned a read that was never committed. As the author of this (as in this thread) article notes: Using OpenZFS as an example (hey, it’s what I know), fsync() always flushes anything outstanding for the underlying object, regardless of where the writes came from. AFAIK, this is the norm and, I assume, the reason that the NULL BITMAP article [3] suggests the fsync on open. In CouchDB land, we just went back and said, "Oh nice, we already do that for other reasons anyway." Unfortunately the "we already do it for other reasons" aspect didn't really come through. So in the end, while none of the behavior on fsync-on-open is guaranteed in anyway shape or form, it's not impossible that it's saved our bacon a non-zero number of times. Just because its not guaranteed, its common that filesystems will in fact perform those flushes regardless of which file descriptor is used. Also, to make sure that we're not missing the field for the cornstalks, I want to point out that the double fsync commit protocol used by CouchDB is probably 99.some-more-nines responsible for CouchDB's durability guarantees. However, that's not 100%, so when we find weird edge cases like in [3] we try and make sure that we're as correct as can be. For instance, here's the response to fsync-gate [4]. [1] https://github.com/apache/couchdb/blob/956c11b35487fb8ffcf70... [2] https://neighbourhood.ie/blog/2025/02/26/how-couchdb-prevent... [3] https://buttondown.com/jaffray/archive/null-bitmap-builds-a-... [4] https://github.com/apache/couchdb/commit/3505281559513e29224...
In Fsync() after open() is an elaborate no-op
CouchDB's HTTP API used to fit in just one file (less than 1k lines of Erlang), and it was a great jumping-off point for learning databases and web programming: https://github.com/apache/couchdb/blob/0.8.1/src/couchdb/cou... It was written by one engineer, and then later refactored by a team to look like this (and many other files): https://github.com/apache/couchdb/blob/main/src/chttpd/src/c... It's an interesting exercise to see how something grows and changes as it transitions from inspiration to real-world usage.
In Ask HN: What is the best code base you ever worked on?
Jan has actually been working on per-document access control and according to the discussion it is expected to land in CouchDB 4 [1]. CouchDB doesn't move extremely fast. It's kinda boring and reliable once everything is set up - which I consider a good thing. But I agree, it's annoying to not be able to analyse data across multiple user DBs with a single query or to build hacky solutions when listening to changes across databases. [1] https://github.com/apache/couchdb/issues/1524 E: typo
In Offline-First Database Comparison
wcerfgba·Nov 27, 2020Submission

Ask HN: Open-source databases with document level access control?

Hi y'all, I am looking for a database system with document level access control, or an equivalent level of granularity wrt the data model of the database -- so for a graph database this would be at the node level, or for a RDBMS at the row level. So far I have only found two options, and they are both cloud-only. MongoDB offer DLAC as part of Realm [1] and Fauna offers attribute based access control [2]. I can see CouchDB are working on document level access control [3] but it's not shipped yet. Are there any open-source databases which have this in today? Thanks :) [1] https://docs.mongodb.com/realm/mongodb/define-roles-and-permissions/#select-a-coll… [2] https://docs.fauna.com/fauna/current/security/abac [3] https://github.com/apache/couchdb/issues/1524
1 points · Open discussion
Currently using this. Haven't tested heavy scaling though because our app doesn't have huge scale needs. BUT, will say things are looking promising. Theres are some[1][2] improvements to replication and general speed landing/landed. As far RxDB, in our limited tests, using only the query-sync feature speeds up everything a ton, not to mention optimistic updates. Overall it's been pretty great, and developer is very active. [1] https://github.com/apache/couchdb/pull/495 [2] https://github.com/apache/couchdb/pull/470 [2]
In CouchDB 2.1.0
I just picked a random file in RabbitMQ to see how erlang looks like - https://github.com/rabbitmq/rabbitmq-server/blob/master/src/... Then I thought of looking into something I might understand: https://github.com/apache/couchdb/blob/master/src/couchdb/co... The syntax is indeed scary. Unless erlang provides features that are overwhelmingly compelling that I just cannot live without, I cannot imagine coding in it. Go seems more approachable.
In Why Not Erlang? The Lack of Onramps
This is not news, and should not reflect poorly on Apache CouchDB. AFAICT, Damien's last commit on the project was 18 months ago, and he is by no means the most active commiter, even on a historical basis.[1] Apache CouchDB's data model is sublime for the domain I often work in, and I think the same goes for a lot of people. It's not just mobile; personally, I don't do anything mobile- or sync-related. I have no plans on moving on.[2] Apache CouchDB is as active and healthy a project as ever AFAICT, and having hosting providers like Cloudant makes the entire model all that more attractive. If it's all about business, then slagging on the project that gave your company its name is perhaps not the greatest approach. Moving on is fine, a fact of life. Making things more difficult for those you leave behind isn't cool, especially when yo
Read the rest
ur moving on happened a long time ago. [1] 8/24/2010, according to https://github.com/apache/couchdb [2] http://groups.google.com/group/clojure-clutch/browse_frm/thr...
In The Future of CouchDB
Apache procedure requires a 72-hour vote window, which will be closing soon. As far as 1.0 being production ready, yes the bug is unfortunate, but the fix is 29 characters long. Aside from this unfortunate line of code, I'm 100% certain that CouchDB is production ready. Lots of sites have been running it in production for years without issue. An incomplete list of happy users is here: http://www.couch.io/case-studies Here's the bug-fix, to give you an idea: http://github.com/apache/couchdb/commit/1423d6f0a593e1681706...
In Repair Tool for CouchDB 1.0.0 bug

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.