All CouchDB Blog Posts
How to Sync Anything: Building a Sync Engine from Scratch — Part 1 posted Wednesday, April 9, 2025 by Jan Lehnardt CouchDBreplicationsyncdistsysdata
There’s an old saying I paraphrased in this by now ancient tweet[sic]:
“Friends don’t let friends build their own {CRYPTO, SYNC, DATABASE}.” — @janl on September 24th, 2014
What do I mean by that?
Read the articleHow to Sync Anything posted Sunday, April 6, 2025 by James Coglan CouchDBreplicationsyncdistsysdata
In this article I’ll discuss a common naive solution to replication, why it doesn’t work, and what the building blocks of a good solution look like. Having established this theoretical framework, my next article will look at how CouchDB provides many of those building blocks such that replicating from it into any other system is relatively painless.
Read the articleOffline-First with CouchDB and PouchDB in 2025 posted Wednesday, March 26, 2025 by The Neighbourhoodie Team tipCouchDBsyncoffline first
A few weeks ago, we gave you tooling to quickly and easily host your own CouchDB: CouchDB Minihosting! This week, we’re providing a demo application you can deploy on that installation, so you can try that part out with zero hassle. On top of that, consider this an up-to-date, best practises demo app for Offline-First with CouchDB and PouchDB. We’re using Svelte 5 with Vite as build tooling and Pico.css for styles.
Read the articleFrom Dig Sites to Data Sync: iDAI.field and Offline-First Systems for Archaeology posted Thursday, March 20, 2025 by The Neighbourhoodie Team interviewCouchDBsynccase study
Reliable data collection during archaeological field work in remote locations comes with a multitude of challenges. Even in the most isolated dig sites, capturing, storing and synching need to happen seamlessly and with zero data loss. Offline-First can solve half the problem. What about the half that needs to bring together teams and findings from across the globe?
Read the articleUnderstanding Database Partitioning in CouchDB posted Wednesday, March 12, 2025 by The Neighbourhoodie Team tipCouchDB
CouchDB partitions optimise performance both with storage and queries. Find out how they work — and how to make the most of them.
Read the articleIntroducing: How to Host Your Own CouchDB with CouchDB Minihosting posted Wednesday, March 5, 2025 by The Neighbourhoodie Team tipCouchDB
CouchDB is a great database, but there’s a slight lack of easy-to-use, affordable CouchDB hosters, or hosting services that offer CouchDB as an add-on. So we decided to make rolling your own hosted CouchDB as simple and quick as we could: with our Open Source CouchDB Minihosting. Let’s have a look!
Read the articleCase Study: 10x CouchDB Performance Gains for a AAA Game Launch posted Tuesday, March 4, 2025 by The Neighbourhoodie Team CouchDBbenchmarkperformancecase study
All software benchmarks and claims of performance are carefully crafted lies and this write-up is no different. Instead of giving you a quick “do steps one, two, three for a magic speedup”, we aim to explain how we arrived at the changes we made and how we rigorously tested those changes to make sure we understand their impact.
All this to give you the tools to follow the process yourself, at the end of which, you might come to very different conclusions that are valid for your particular situation which is very likely different from what our customer was dealing with.
If you need help with your CouchDB, Erlang, or just regular Unix networking performance, book a call today.
Hold on to your hats and get ready for a journey of performance discovery! We will learn about CouchDB and Erlang internals, performance tooling and how to find the next bottleneck in your CouchDB cluster setup.
Read the articleHow CouchDB Prevents Data Corruption: fsync posted Wednesday, February 26, 2025 by The Neighbourhoodie Team tipproductCouchDBdata
Programming can be exciting when the underlying fundamentals you’ve been operating under suddenly come into question. Especially when it comes to safely storing data. This is a story of how the CouchDB developers had a couple of hours of excitement making sure their fundamentals were solid (and your data was safe).
Read the articleCouchDB Data Modelling: Prefer Smaller Attachments posted Wednesday, February 19, 2025 by The Neighbourhoodie Team tipproductCouchDB
We’ve already shared a CouchDB data modelling tip about preferring smaller docs. This one is about smaller attachments.
Read the articleCouchDB Data Modelling: Prefer Smaller Documents posted Thursday, February 13, 2025 by The Neighbourhoodie Team tipproductCouchDB
CouchDB document design has a big impact on database performance — so how do you get it right?
Read the articleCouchDB is a Great Choice for Prototypes, Side Projects and Internal Tooling posted Wednesday, February 5, 2025 by Alex tipCouchDB
CouchDB is a fantastic database with some unique capabilities, and we love it for all sorts of reasons. But there are a couple of characteristics that make it especially attractive for small, quick projects, demos, and proofs of concept. Let’s explore this in more detail.
Read the articleAlways Compact posted Wednesday, January 29, 2025 by The Neighbourhoodie Team tipproductCouchDB
CouchDB’s revision control system can sometimes lead to the assumption that CouchDB works like git, where you can access all versions of a document for eternity. Though it’s tempting, it’s inaccurate, and knowing why is important for understanding database health.
Read the articleHow CouchDB Prevents Data Corruption: Checksums posted Wednesday, January 22, 2025 by The Neighbourhoodie Team tipproductCouchDBdata
CouchDB is your data’s safe place. It does everything in its power not to accidentally lose any of your data. However, sometimes circumstances are not in CouchDB’s power.
One of those circumstances is disk corruption.
Read the articleResource Locking with CouchDB and Svelte posted Wednesday, January 15, 2025 by Alex tipCouchDBdata
This part four of our blog post series on building a real-time, multi-user Kanban board with CouchDB and Svelte. As mentioned in the previous post, UI or resource locking is one of the most promising mechanisms for avoiding conflicts in the first place: if a card is locked the moment Alice starts editing it, then Bob won’t be able to do anything with it, and therefore won’t be able to introduce a conflict. Sounds like we could have just done this first and not bothered with all the conflict handling in the previous posts! But again, it’s not quite as simple as it seems.
Read the articleConsider Using nanoid posted Thursday, January 9, 2025 by The Neighbourhoodie Team tipproductCouchDB
CouchDB automatically assigns each piece of your data an unmistakable tag, called a UUID, to avoid conflicts in distributed systems even before syncing. If you assign these yourself, nanoid for JavaScript is the smaller, faster tool to get it done with CouchDB and PouchDB.
Read the articleManual Conflict Resolution with CouchDB and Svelte posted Wednesday, December 18, 2024 by Alex tipCouchDBdata
In our previous post, we added automatic conflict resolution to our multi-user, real-time Kanban board. This would silently resolve any conflicts where two users simultaneously modified two different properties of the same Kanban board card, eg. Alice changes the card’s title, and Bob changes the card’s location. While these changes constitute a conflict on a single database record, they don’t actually collide within that record, and thus the conflict can be resolved by a machine.
Regrettably, this doesn’t solve all possible conflicts: two users can still simultaneously modify the same property of the same card, eg. both Alice and Bob edit a card’s title.
Read the articleAutomatic Conflict Resolution with CouchDB and Svelte posted Wednesday, December 11, 2024 by Alex tipCouchDBdata
This is the second part of a blog post series on building a real-time, multi-user Kanban board with CouchDB and Svelte. We’ve previously made design decisions that should help reduce the opportunities for conflicts, but since we can’t rule them out completely, we do need to provide ways to resolve them. In this post, we’ll be covering the possibilities of automatic conflict resolution, which means:
- A machine can resolve the conflict without any user input
- The resolution happens in the background without anyone even noticing
A real-time multi-user Kanban board with CouchDB and Svelte posted Thursday, December 5, 2024 by Alex tipCouchDBdata
In this first post of a four-part series, we’ll start building a real-time Kanban board, and discuss the challenges and trade-offs.
Read the articleFull-text Search and Faceted Querying with CouchDB posted Wednesday, November 27, 2024 by The Neighbourhoodie CouchDB Team tipproductCouchDB
CouchDB stores your JSON data naturally in documents. It also gives you multiple mechanisms for querying that data:
Read the articleYour Questions About CouchDB 3.4.2, QuickJS, and Nouveau Answered posted Wednesday, November 13, 2024 by The Neighbourhoodie CouchDB Team tutorialCouchDB
Several weeks ago we hosted our CouchDB Meetup and so many great questions about the new CouchDB release were posed that we’ve collected them here. If you are curious about CouchDB 3.4.0 - 3.4.2, QuickJS or Nouveau, these answers should give you some idea of what to look forward to in the update.
Read the articleIn Views, Avoid Emitting the Document _id posted Wednesday, November 6, 2024 by The Neighbourhoodie CouchDB Team tutorialCouchDB
During our consulting on many many customer CouchDB installations, we keep finding the same common pattern, view map functions that look similar to this:
Read the articleFirst Steps with Nouveau, CouchDB’s New Full-Text Search posted Thursday, October 24, 2024 by Alex tutorialCouchDB
With Version 3.4.1
, CouchDB added Nouveau, a brand-new implementation of search using Lucene. After announcing the feature in a previous post, we now dive deeper into Nouveau and try out fuzzy search, facets, counts and ranges, while of course also covering the installation and setup, and some performance considerations.
PouchDB Tip: Use CouchDB as an API posted Wednesday, October 16, 2024 by The Neighbourhoodie Team tipproductCouchDB
PouchDB and CouchDB used together are a powerful combination and one of the very few technologies that allow you to build truly robust offline web applications.
Read the articleApache CouchDB 3.4.1 has been released, here is what this means for Neighbourhoodie Customers posted Monday, September 23, 2024 by The Neighbourhoodie CouchDB Team releaseCouchDB
The Apache CouchDB team has released CouchDB 3.4.1 a combined feature and bugfix release that includes, among a number of high-profile features, a slew of performance enhancements and bugfixes. This blog post goes into detail about what this means for Neighbourhoodie’s customers with concrete recommendations and tips for upgrades.
Read the articleCouchDB 3.4.1 New Feature QuickJS posted Monday, September 23, 2024 by The Neighbourhoodie CouchDB Team CouchDBCouchDB
QuickJS is a JavaScript engine that can do the same work as CouchDB’s existing JavaScript engine SpiderMonkey, but with different trade-offs that have advantages for CouchDB users.
Read the articleCouchDB 3.4.1 New Feature Nouveau posted Monday, September 23, 2024 by The Neighbourhoodie CouchDB Team CouchDBCouchDB
Nouveau is a from-scratch reimplementation of Lucene fulltext search for CouchDB. While in beta, this aims to replace CouchDB’s existing fulltext search option Clouseau / CouchDB Search in the near future.
Read the articleHow CouchDB Prevents Data Corruption: Append-Only Database Files posted Wednesday, September 18, 2024 by The Neighbourhoodie Team tipproductCouchDBdata
CouchDB takes keeping your safe very seriously. It does everything in its power not to accidentally lose any of your data. Let’s look at one of the things that keep your data safe: append-only database files.
Read the articleAvoid Concurrent Writes to Document Properties posted Friday, September 6, 2024 by The Neighbourhoodie Team tipproductCouchDB
Designing your data for use with CouchDB is usually pretty straightforward. Your application will make use of certain objects or data records like persons, events, tasks, etc. When thinking about storing these in CouchDB, you usually store an individual instance of each of those objects or data records in an individual CouchDB document:
Read the articleAll Views in One Design Doc posted Wednesday, August 28, 2024 by The Neighbourhoodie Team tipproductCouchDB
CouchDB organises the definitions for all secondary indexes in a database in design documents. This is true for JavaScript Views, Erlang Views, Lucene text indexes, and Mango Queries.
Read the articleHow to Store Dates in CouchDB posted Wednesday, August 14, 2024 by The Neighbourhoodie Team tipproductCouchDB
CouchDB uses JSON as a data format, and JSON does not have a built-in way to represent dates. But dates are commonly used when building applications for all sorts of things, and there are ways to store them in CouchDB, so how is that done?
Read the articleData Format Compatibility posted Friday, August 2, 2024 by The Neighbourhoodie Team tipproductCouchDBdata
When storing data in CouchDB, you send JSON in one form or another. When you retrieve data from CouchDB it is also in the JSON format.
Read the articleWhy Does CouchDB Require an Admin Account to Start? posted Wednesday, July 24, 2024 by The Neighbourhoodie Team tipproductCouchDB
In CouchDB 1.x, one of our [the CouchDB developers’] overarching goals was to create a database that is easy to use. We spent many years refining the CouchDB REST API to make it as easy and as convenient as possible, so people don’t get turned away from using CouchDB by how hard it is to use.
Read the articleCouchDB and Docker posted Tuesday, November 3, 2020 by The Neighbourhoodie CouchDB Team tipCouchDB
Docker is an extremely popular way of deploying any kind of application in many different environments. Deploying CouchDB is no exception, the CouchDB project even maintains its own set of Dockerfiles, as well as a helm chart to help orchestrate multiple containers as a cluster on Kubernetes.
Read the articledefault.d and local.d posted Tuesday, October 27, 2020 by The Neighbourhoodie CouchDB Team tipCouchDB
When we explored how default.ini
and local.ini
work in unison to provide a coherent configuration and upgrade behaviour, we skipped over one more part of the configuration puzzle.
Local.ini is Never Overwritten on CouchDB Updates posted Tuesday, October 20, 2020 by The Neighbourhoodie CouchDB Team tipCouchDB
CouchDB is configured through configuration files on disk. The format of the files is INI.
When it starts, CouchDB reads a series of .ini files to make up the final configuration it is going to start with. This series of .ini files is called the config file chain.
Read the articleEverything You Need to Know About CouchDB Database Names posted Tuesday, October 13, 2020 by The Neighbourhoodie CouchDB Team tipCouchDBdata
Naming a database does not sound like an exciting activity. But it can be, if you know all the considerations that go into naming a database in CouchDB. Let’s start with the restrictions.
Read the articleSharding — Reducing the Number of Shards posted Tuesday, October 6, 2020 by The Neighbourhoodie CouchDB Team tipCouchDB
In contrast to increasing the number of shards for a database, reducing the number of shards is not a built-in operation. In addition, as shard splitting is only available in CouchDB 3.x and later, this advice is good for version 2.x as well.
Read the articleSharding — Increasing the Number of Shards posted Tuesday, September 29, 2020 by The Neighbourhoodie CouchDB Team tipCouchDB
This advice is only true for CouchDB 3.0.0 or later. Next week, we’ll cover increasing the number of shards in CouchDB 2.x.
Read the articleSharding — Choosing the Right q Value posted Tuesday, September 22, 2020 by The Neighbourhoodie CouchDB Team tipCouchDB
One of CouchDB’s core features is scalability. There are two axis of scalability in CouchDB:
- Scaling the amount of data stored
- Scaling the number of requests handled
Use JSON Patch to Resolve Conflicts posted Tuesday, September 15, 2020 by The Neighbourhoodie CouchDB Team tipCouchDB
CouchDB is unique in the database world because it makes data conflicts first-class citizens of its data model. Normally, databases and applications built on them do a large amount of work to avoid doing this. In many scenarios, this leads to subtle errors and occasional data loss.
Read the articleCopy Design Docs to Avoid Waiting For Indexes to be Built posted Tuesday, September 8, 2020 by The Neighbourhoodie CouchDB Team tipCouchDB
This advice is relevant for all query mechanisms in CouchDB: Views, Mango Queries, and even Search.
Read the articleUse Type in Doc _id posted Tuesday, September 1, 2020 by The Neighbourhoodie CouchDB Team tipCouchDB
When deciding on which data goes into which CouchDB documents, it is commonly helpful to keep track of the type
of document. For example, you could have documents for users
and documents for articles
.
An Offline-First Todo List with Svelte, PouchDB and CouchDB posted Friday, May 10, 2019 by alex tipCouchDBdata
Today, we’re combining Svelte, the lean and fast frontend compiler, with PouchDB and CouchDB, and building a lightweight, Offline-First todo list app. It’ll sync your todos between multiple devices for offline use and also keep your data in a central backup database.
Read the article