SOLUTION · COUCHDB CDC

Apache CouchDB change data capture and real-time data replication

Change data capture from the native CouchDB changes feed, with snapshots read in parallel and nothing installed on your server.

Gluesync by MOLO17 captures changes from Apache CouchDB 3.3, 3.4, and 3.5 through a dedicated agent that talks to CouchDB over its own HTTP JSON API. It copies each database with a parallel snapshot, then follows the _changes feed, and delivers every insert, update, and delete continuously to the relational databases, warehouses, lakes, and event streams your teams already run. The same agent also writes to CouchDB as a target. Manage every pipeline from the Core Hub web UI, the Gluesync control plane.

WHO THIS IS FOR

CouchDB teams moving document data into the rest of the estate

  • Application teams whose data lives in CouchDB and who need it in PostgreSQL, SQL Server, or a warehouse for reporting, without exporting databases on a timer
  • CouchDB administrators who want a source connection that only reads: a database member with read access, no design documents to deploy, no filter functions, and no change to the applications that write
  • Data platform leads who feed analytics, search, or event streams from CouchDB and want one control plane for sources and targets, backed by best-in-class enterprise support, rated 4.9/5 by customers
  • Engineers who wrote a _changes listener or a Kafka connector for CouchDB and now own checkpoints, restarts, type mapping, and every target writer

THE PROBLEM

CouchDB data that only moves in batches goes stale, and the changes feed alone is not a pipeline

CouchDB is often the store behind offline-first and document-centric applications, while reporting and integration run elsewhere. Scheduled dumps of _all_docs leave those systems working from a copy that is already behind, and CouchDB's own replication only reaches another CouchDB or PouchDB. Teams searching for CouchDB CDC or CouchDB to PostgreSQL replication usually end up writing a _changes listener, running a community Kafka connector, or exporting JSON for an ETL tool.

Gluesync addresses that with per-agent CDC. The CouchDB agent reads the native changes feed, Core Hub keeps the position of every database and routes the changes, and target agents write them to the destination you choose, with types mapped from the JSON documents. The snapshot, the monitoring, and the pipeline model are the same whichever target you pick.

HOW IT WORKS

How Gluesync does CouchDB CDC

The changes feed, CouchDB's native change log

The agent polls the _changes feed of every replicated database in long-poll mode, from the position Core Hub saved. It creates nothing in your databases and needs no change to your applications.

  • Inserts, updates, and deletes: a new document is an insert, a later revision is an update, and a deleted document is a delete keyed on its _id.
  • Whole documents: every change carries the current document, read with the feed, so targets receive complete rows.
  • Catch-up in one pass: a poll keeps reading while pages come back full, so a backlog drains without waiting for the next interval.
  • At-least-once, applied safely: the position moves only after a page is delivered, and targets apply a repeated change without harm.
  • State in Core Hub: the position of each database lives in Core Hub metadata. CouchDB source setup guide ↗

A parallel snapshot that does not page _all_docs

_all_docs is served as one stream and does not get faster with more requests. The agent lists document ids from the changes feed instead and reads the documents with many parallel _bulk_get requests.

  • Parallel reads: the number of _bulk_get requests in flight is configurable. In our lab, 16 parallel requests read 94,000 documents per second, against 28,000 for _all_docs, and a 10-million-document database reached PostgreSQL end to end in 274 seconds.
  • Resumable: an interrupted snapshot resumes from the feed position it had safely reached instead of starting over.
  • No gap with CDC: changes made while the snapshot runs are replayed from the position the snapshot started at, so the target ends up with every document in its latest state.
  • Bounded memory: a slow target slows the readers down, and a database is never held in memory.

Databases, entities, and fields

  • One entity is one database: discovery lists the databases of the server and leaves the system databases out.
  • Fields inferred from the documents: CouchDB declares no schema, so the agent samples each database's documents and infers every field and its type: string, integer, number, boolean, object, array, or JSON. The sample size is configurable.
  • Keyed on _id: the entity key is the document id, and design documents are skipped in the snapshot and in CDC.
  • Exact numbers: numbers are read from the literal JSON text, so integers keep every digit.

What your CouchDB administrator sets up

The agent reads documents and the changes feed, and nothing else. A database member covers it.

  1. Create a user for Gluesync in the _users database.
  2. Add that user to the members of every database to replicate, in the database's _security object.
  3. Open the CouchDB HTTP port to Core Hub, 5984 by default, or the TLS port you use.
  4. In Core Hub, enter one node address, the port, and the credentials. With a user that is not a server administrator, list the databases to replicate in the connection.
  5. Keep _id as the key of each entity, so deletes reach the target.

Clusters, TLS, and reverse proxies

  • Single node or cluster: list the other nodes of a cluster and the agent tries them in order when the node it talks to is down.
  • TLS: with TLS on, the server certificate is always validated. A certificate from a private certificate authority is trusted by giving the agent that CA certificate.
  • Authentication: HTTP Basic authentication, or anonymous access for a server that allows it.
  • Behind a proxy: set the path prefix the server answers under, for example /couchdb.

Architecture around Core Hub

Agents sit close to each database, and Core Hub is the control plane above them: web UI, REST APIs, and routing from the CouchDB source agent to its targets. A pipeline groups the source agent, its target agents, and the entities (databases) they replicate. Core Hub and agents deploy with Docker, Docker Compose, or Kubernetes.

Explore the general CDC streaming architecture →

CAPTURE OPTIONS

The CouchDB agent: one agent, source and target

Apache CouchDB has one Gluesync agent. It captures through the changes feed as a source and writes with _bulk_docs as a target, so the choice is the databases to replicate rather than which agent to run.

AgentCapture techniqueVersionsBest for
Apache CouchDB agent ↗ HTTP JSON API with no vendor SDK; _changes feed in long-poll mode for CDC, ids from the feed and parallel _bulk_get requests for snapshots Apache CouchDB 3.3, 3.4, and 3.5; single node or cluster; tested on 3.5.1 Any CouchDB 3.x estate whose databases should reach SQL databases, warehouses, lakes, or event streams in real time, read by a database member with no change to the applications.

TARGETS AND TOPOLOGIES

Deliver CouchDB changes to the systems you already run

Open the integrations finder with CouchDB pre-selected to see every target you can pair with it. CouchDB can be a source, a target, or both.

Gluesync keeps pace with your change volume at any scale. MOLO17 Professional Services can help map your document shapes to relational tables with your team.

Target agents write in optimized batches, never row by row, and switch to native bulk load for both snapshots and CDC on targets such as Snowflake, Databricks, Google BigQuery, Amazon Redshift, Microsoft SQL Server, and PostgreSQL.

  • CouchDB to PostgreSQL, SQL Server, Oracle, or MySQL, with document fields mapped to typed columns: see Replicate to PostgreSQL
  • Feed CouchDB documents to a cloud warehouse, data lake, or object store: see warehouse sync
  • Publish CouchDB changes to Apache Kafka or another event stream for downstream services: see Replicate to Kafka
  • Move CouchDB data into MongoDB, Couchbase, or Elasticsearch: see Replicate to MongoDB
  • Copy CouchDB databases to another CouchDB server with the same document ids: see Replicate to CouchDB

FAIR, HIGH-LEVEL COMPARISON

Where Gluesync fits among CouchDB CDC approaches

ApproachWhat buyers usually getWhere Gluesync fits
CouchDB replication (<code>_replicator</code>) Built-in, reliable replication between CouchDB servers and PouchDB clients; the destination is always CouchDB Delivers CouchDB changes to relational databases, warehouses, lakes, and streams, with typed columns inferred from the documents; see database offload
Custom <code>_changes</code> feed listeners Full control; your team builds the snapshot, checkpoints, retries, type mapping, monitoring, and every target writer Parallel snapshot, positions kept by Core Hub, and target agents without pipeline code to maintain; see CDC streaming
Community Kafka Connect connectors Changes feed events in Kafka topics; you run Kafka, Connect workers, offsets, and a sink connector per destination A productized CouchDB agent with Core Hub operations and MOLO17 enterprise support, with no Connect cluster required; read the Debezium alternative comparison
ETL and ELT services Scheduled loads into warehouses; CouchDB coverage is rare and usually means exporting JSON first Continuous delivery from the changes feed to warehouses and lakes from the same agent; see warehouse sync

FAQ

CouchDB CDC questions

What is CouchDB CDC with Gluesync?

Change data capture from Apache CouchDB through its native _changes feed. The CouchDB source agent copies each database with a snapshot, then follows the feed, and Core Hub delivers every insert, update, and delete to the targets you configure.

Which CouchDB versions does the agent support?

Apache CouchDB 3.3, 3.4, and 3.5, on a single node or on a cluster. MOLO17 tests the agent against CouchDB 3.5.1.

Does the agent change my databases?

No. As a source it only reads documents and the changes feed. It deploys no design documents or filter functions and needs no change to your applications.

What permissions does the CouchDB user need?

Membership of every database to replicate, with read access to its documents. Listing all databases needs a server administrator in CouchDB 3.x; with any other user, name the databases in the connection.

How fast is the initial snapshot?

The agent lists document ids from the changes feed and reads the documents with parallel _bulk_get requests. In our lab, 16 parallel requests read 94,000 documents per second, and a 10-million-document database reached PostgreSQL end to end in 274 seconds. An interrupted snapshot resumes from the feed position it had safely reached.

How are CouchDB documents mapped to tables?

One database is one entity keyed on _id. The agent samples the documents to infer each field and its type, so a relational target gets typed columns, and nested objects and arrays can be kept as JSON.

Is Apache CouchDB the same as Couchbase?

No. They are different products, and Gluesync has an agent for each. The Couchbase CDC page covers the Couchbase DCP and Eventing agents.

Can CouchDB be a target as well as a source?

Yes. The same agent writes to CouchDB with parallel _bulk_docs requests, and a pipeline can run from CouchDB to CouchDB with the same document ids. The Replicate to CouchDB page has the details.

Where should we start?

Start a Gluesync trial with a non-production CouchDB database, then read the CouchDB agent overview and the source setup guide. Talk to MOLO17 if you need help with the document mapping or the target design.

Evaluate Gluesync with your CouchDB changes feed

Start a trial on your infrastructure, or talk to MOLO17 about your CouchDB databases, the document shapes they hold, and the targets you need.