couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Alfke <j...@couchbase.com>
Subject Re: Replication vs. Compaction
Date Fri, 31 Jan 2014 17:30:11 GMT

On Jan 31, 2014, at 8:39 AM, Boaz Citrin <bcitrin@gmail.com> wrote:

> Instead we could replicate the database into a new instance and
> switchover, as replication is much faster.

That seems sort of strange to me — I would expect replication to an empty db to be slower,
as it's doing basically the same work as compaction but with a bunch of HTTP and network overhead.
But I don't know the implementation of CouchDB.

> Will a compacted database be the same as a replicated one?

I think so. The issue you'll have is that the replicated database will be a snapshot of where
the source database _was_ at the start of the replication. Assuming you're making changes
to the database during the process (if you aren't, you might as well just use compaction),
you'll then need to run another replication to copy over the stuff that changed since the
first one.

—Jens


Mime
View raw message