From user-return-15168-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Wed Mar 02 21:09:37 2011 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 21647 invoked from network); 2 Mar 2011 21:09:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Mar 2011 21:09:37 -0000 Received: (qmail 51494 invoked by uid 500); 2 Mar 2011 21:09:35 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 51456 invoked by uid 500); 2 Mar 2011 21:09:35 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 51416 invoked by uid 99); 2 Mar 2011 21:09:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Mar 2011 21:09:35 +0000 X-ASF-Spam-Status: No, hits=2.9 required=5.0 tests=FREEMAIL_FROM,FS_REPLICA,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kowsik@gmail.com designates 209.85.214.52 as permitted sender) Received: from [209.85.214.52] (HELO mail-bw0-f52.google.com) (209.85.214.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Mar 2011 21:09:31 +0000 Received: by bwj24 with SMTP id 24so748930bwj.11 for ; Wed, 02 Mar 2011 13:09:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=FXuKPfOKHql3+Za+FsLDQ6LYd4RwD7hxtcLbME0ASqk=; b=w7Zsnd4mruMZFVydBF7DYxTYroQJDm4xhPNPs6Dm3kVr1BK0K7kGvWDHIEqvw0V8Va WoHFDbkm68rfYY5txN/Kg3wD1NQWmrnwZd/7pooGAYbqcAa9Q3f3SZs3Rx8XikXI6bhL 9gJKTu/WkiHy1yG+xsoxN2s2ygDGZOgODlSzM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=v5cTG1BH+1gmQVSnokrEoXgKBc6OMdgZM8EStp+QL2pL8RVJxMhqCtp7jzSZ9AXbof hP6LBGpyP6kenuVHqdotKFeByJToQVmjD26cjvR6dSLQbCbuFsl/a6210PCzwahax+4t Ud4Jh7emyeacRjoNsQPx7De0o0MRT6KjX+zy8= MIME-Version: 1.0 Received: by 10.204.99.77 with SMTP id t13mr521930bkn.164.1299100149336; Wed, 02 Mar 2011 13:09:09 -0800 (PST) Received: by 10.204.114.198 with HTTP; Wed, 2 Mar 2011 13:09:09 -0800 (PST) Date: Wed, 2 Mar 2011 13:09:09 -0800 Message-ID: Subject: Replication performance: pull vs. push From: kowsik To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 I have two couch instances in two different geographic locations (say A and B). I have two options to do bidirectional continuous replication. A.local -> B B.local -> A or A <- B.local B <- A.local The difference really, I think, is how the _changes feed works. In the first instance, the replication process on A (conceptually) monitors the local _changes feed and pushes data up to B (a request + a response for each change), while in the second case, the replication process monitors the _changes feed on B (across a network) and makes local changes. My gut tells me the second case will be better for performance since the TCP connection (for the _changes feed) from A to B persists and the docs are sent one way without making a request (and hence less data transmitted per change). Is my hypothesis correct? I haven't yet looked at the packets to understand the differences between the two scenarios. But maybe someone else has already. Thanks, K. --- http://twitter.com/pcapr http://www.pcapr.net http://labs.mudynamics.com