Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 59504 invoked from network); 15 Apr 2011 16:46:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Apr 2011 16:46:04 -0000 Received: (qmail 21354 invoked by uid 500); 15 Apr 2011 16:46:02 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 21317 invoked by uid 500); 15 Apr 2011 16:46:02 -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 21309 invoked by uid 99); 15 Apr 2011 16:46:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Apr 2011 16:46:02 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of arojis@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; Fri, 15 Apr 2011 16:45:56 +0000 Received: by bwj24 with SMTP id 24so4472540bwj.11 for ; Fri, 15 Apr 2011 09:45:35 -0700 (PDT) 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=DXJDq0rakHEe0Oy4IwuVSUF4lUiDahnIPHCWMA3T11M=; b=U5Rcz3V8dM9+o5ReuZBYnLFXoTAA1GWH9wKJzZQETcVwZSjMQcoJmeyl06FGNIrWyR dvWU1E5NsFiSewF5zq9w9TI4u5+7Ux2yts9pIktvRUscA5VSS/zbWfT5pGwLSOEdN92x CRNG34JuYhBgzsvg7jHww8W2fjIDb6NFfz+as= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=vUZptEIhv4M5pW8N2ZP1S3bsPfj6NzTTyOy/IaSOW8397+xeT6KS9u+AArxolfQGIS lLE3eTSh9ZS3s6nHrxLJ6c+xg/QjiOqNBL4gkxkHLnLYMuh47wXWpQalACJ8pzSKs8iB 3s+W0svC8lQ7PzH8mZvtIcHHJsaq84l8iTpjU= MIME-Version: 1.0 Received: by 10.204.144.194 with SMTP id a2mr1699057bkv.93.1302885934983; Fri, 15 Apr 2011 09:45:34 -0700 (PDT) Received: by 10.204.72.14 with HTTP; Fri, 15 Apr 2011 09:45:34 -0700 (PDT) Date: Fri, 15 Apr 2011 22:15:34 +0530 Message-ID: Subject: Multi-tenancy in Couch From: Aroj George To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0015174c19925669b804a0f7c59a --0015174c19925669b804a0f7c59a Content-Type: text/plain; charset=ISO-8859-1 Hi, What's the best way to implement multi-tenancy in couch? In the sql world you could choose to do either a tenant id key in every table or separate schemas for each tenant or even separate database instances... Similarly in couch i guess you can store each tenant's document in a separate database. This seems a very simple option. But then is there a max limit on the number of databases we can create in couch? The other option, not too hard either, is to have the tenant id as the first key in all the views and use the startkey to filter out the tenants. Will greatly appreciate if you can share your thoughts on which approach is ideal and will scale better. Or if there are more approaches that I have not thought off. Rgds, Aroj --0015174c19925669b804a0f7c59a--