Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D48561089D for ; Thu, 10 Oct 2013 07:19:17 +0000 (UTC) Received: (qmail 30878 invoked by uid 500); 10 Oct 2013 07:19:16 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 30578 invoked by uid 500); 10 Oct 2013 07:19:15 -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 30566 invoked by uid 99); 10 Oct 2013 07:19:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Oct 2013 07:19:14 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of nicholasredlin@gmail.com designates 209.85.223.175 as permitted sender) Received: from [209.85.223.175] (HELO mail-ie0-f175.google.com) (209.85.223.175) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Oct 2013 07:19:06 +0000 Received: by mail-ie0-f175.google.com with SMTP id aq17so3407338iec.34 for ; Thu, 10 Oct 2013 00:18:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=kHT9CXYjh8o7YfK7dSNU7cNJmZBf8zJvxo38Yk8Ot98=; b=fW83kmhmwuRtyBMQwfAsWUCxsFIqwuJz0ediiziO9ZKYj2BDJt20T0VXzvSAIXN8Pb v5i5pKb0u8dsGcawXJZWmtu/anbVBd1Fn62LC78xWjYBJJf5nxanz2PnhU7zM0cmFz6o pM6AU9CCLzv2BJ1JJA+0gU7qfrS7/a4P0QAkTKQH11EfcOeexHkx/t+QqRyp/K6scmFn m62Mg8bifjy/Z18p1y2MMUtkIFypRK2xiTheagKNyLR5gk0JoNkR+bevg12savbXjCEH 2rf57o7hlpHVMdtqgPzvmfl8QgPsHKrnrw0bJXARslHaEktpywyN1pcWj4OXGaoddiwt Kr+g== X-Received: by 10.43.93.5 with SMTP id bs5mr7196493icc.32.1381389525892; Thu, 10 Oct 2013 00:18:45 -0700 (PDT) Received: from [10.0.1.2] (67-4-201-44.mpls.qwest.net. [67.4.201.44]) by mx.google.com with ESMTPSA id p7sm11923962iga.3.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Oct 2013 00:18:45 -0700 (PDT) From: Nicholas Westlake Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Limits on Continuous Replication Message-Id: <86DF8A23-56CC-4236-9BB8-6E2536ECAC93@gmail.com> Date: Thu, 10 Oct 2013 02:18:44 -0500 To: user@couchdb.apache.org Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) X-Mailer: Apple Mail (2.1510) X-Virus-Checked: Checked by ClamAV on apache.org I was advised in #couchdb that my question is better suited to the = mailing list. I'm looking at an app design that uses quite a few replications. I'm = wondering what limits I'll run into from couch. Ideas for how to work = around those limits would be bonus. :) I have 3 kinds of database: 1) user # One of these for each user (readable and writeable only by the = user who owns it) 2) project-public # One of these for each project (writeable only by the = replicator, readable by everyone) 3) project-admin # One of these for each project (writeable only by the = replicator, readable only by users granted permission) When a user is added to a project, filtered continuous replication = starts from their "user" database to both the "project-public" and = "project-admin" databases. The filter functions check for simple = conditions like "doc.committed =3D=3D=3D true". The replication will be = stored in _replicator database so the continuous replication will = survives a restart. The important behaviors: - When a user changes data and it should propagate to the the project = databases in under 30 seconds. - Project data should be access controlled between public data and = admin-only data. I believe separate databases with _security set = accordingly is the only way to achieve this. - Restarting couch shouldn't break anything. Some realistic maximums. It's unlikely that: - any "project-admin" or "project-public" databases will exceed 8 = megabytes, compacted. - any "user" database will exceed 100 megabytes each, compacted. - the user count, and project count will ever exceed 100,000 and 40,000 = respectively. - more than 4,000 users will work on any single project. - more than 2,000 users will be making changes at any given moment. Just in case it matters: - The external process that will be creating databases and entries in = the _replicator database is node.js. The continuous replication count (at most) would be 320 million (40,000 = projects * 4,000 users/project * 2 replications/user). This seems like = it would break something. :) Should this work? Or: what's the canonical (or a good) alternative to = this design with couch?=