Reliable U1 CouchDB sync

Registered by Jason Gerard DeRose

CouchDB replication through U1 makes Ubuntu a unique and attractive platform for forward-looking apps. However, reliability problems have made it difficult to actually use. So how do we improve the situation? And what can app devs expect from CouchDB sync in Precise?

 * What current upstream CouchDB work might improve the situation for P?

 * What version of CouchDB will ship in P, what will the U1 infrastructure run?

 * Although an understandable move because of load/reliability issues, syncing only once an hour makes the platform far less interesting from an app developer perspective... are we stuck with this?

 * From a user experience perspective, what we really want is continuous replication... and that's also where the platform gets *really* interesting [insert awesome Novacut demos].

 * Jason would like to see a U1 sync testbed available in parallel to the production infrastructure... uses usual SSO, but runs on newest Ubuntu release and newest CouchDB... has *no* data-safety guarantee! I want to help improved U1 CouchDB reliability, but can't do much if the production infrastructure isn't usable for my apps.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
John Lenton
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Hi,

What are the exact issues you're having with CouchDB's replication? I would be glad to help.

I shall note there's been a great effort on making the replication more reliable and faster. In fact there's a whole new replicator implementation in CouchDB's trunk/master and branch 1.2.x - it will be in the not yet released 1.2.0 version.
It also provides more feedback (better logging) and stats. For e.g. via the _active_tasks API you can get something like the following:

$ curl -s http://localhost:5984/_active_tasks
[
  {
  "pid":"<0.1303.0>",
  "checkpointed_source_seq":17333,
  "continuous":false,
  "doc_write_failures":0,
  "docs_read":17833,
  "docs_written":17833,
  "missing_revisions_found":17833,
  "progress":3,
  "revisions_checked":17833,
  "source":"http://fdmanana.couchone.com/indexer_test/",
  "source_seq":551202,
  "started_on":1316229471,
  "target":"indexer_test",
  "type":"replication",
  "updated_on":1316230082
}
]

The original development mailing list thread, introducing it, is here: http://s.apache.org/KsY

Despite not being yet in any official Apache CouchDB release, it has been used in Couchbase Single 2.0 preview release and, most importantly, in Couchbase Mobile. The later is used in the enterprise world for syncing
servers and mobile devices running iOS and Android.

There's been also positive feedback on the community side, as some users run not yet released versions as well. For example:

http://s.apache.org/3Nt
https://issues.apache.org/jira/browse/COUCHDB-1226

It's also much more configurable then its predecessor. The new configuration parameters can be specified globally (in the .ini config files) or per specific replication (by adding those parameters to the replication objects/documents). Here's a list, with a small description, of those new configuration parameters:

http://s.apache.org/BXi

There are of course, many other enhancements coming in the short and medium term.

Also, I shall note Ubuntu One had some issues in the past when replicating via SSL. Those issues were related to the Erlang/OTP SSL implementation in the R13B03 version. These issues no longer happen in Erlang OTP R14B01 or higher.

Best regards,
Filipe Manana

(?)

Work Items