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 ABF3A6F01 for ; Thu, 26 May 2011 15:22:30 +0000 (UTC) Received: (qmail 56283 invoked by uid 500); 26 May 2011 15:22:29 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 56240 invoked by uid 500); 26 May 2011 15:22:28 -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 56232 invoked by uid 99); 26 May 2011 15:22:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 May 2011 15:22:28 +0000 X-ASF-Spam-Status: No, hits=3.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,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 binary42@gmail.com designates 209.85.218.52 as permitted sender) Received: from [209.85.218.52] (HELO mail-yi0-f52.google.com) (209.85.218.52) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 May 2011 15:22:21 +0000 Received: by yih10 with SMTP id 10so468298yih.11 for ; Thu, 26 May 2011 08:22:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:message-id:in-reply-to:references :subject:x-mailer:mime-version:content-type; bh=idE0kxXDxvjShudTOffymP+vjVibo0dtD8Kw8cGNnaU=; b=irzrJCT6YhhjwBDpz9BHmNX8PyYnqU663gft0b+R1F9nqd2v1sw9qOS9cIZy96DZxe fbglIUDYzFfsCzCj/YqLUjcKKmRRBU9G/lgmQyqWcpg8UNZ4fjxQvTIqRFqrgEYs1mTs GFwoVDxvwVMY760uYoTsQsnY+bmW24itulaQI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:message-id:in-reply-to:references:subject:x-mailer :mime-version:content-type; b=ZI6YgMOF7jU8ox4G4YU38Dw16zkprDESB3OEo1Bin0H9IQIR5yrpvti/KCscK2LCrR OAnBxnORNFApMj3+ckfe3bnnHHyypg4Enl0C6OOYyFPwi3ObDQoulD+fDS/XdQkD5Kvz qqphy9eqy+ycQwUZtp32/tROzD81e4JgBo964= Received: by 10.236.192.162 with SMTP id i22mr1259415yhn.139.1306423320394; Thu, 26 May 2011 08:22:00 -0700 (PDT) Received: from zero.local (mobile-166-137-138-067.mycingular.net [166.137.138.67]) by mx.google.com with ESMTPS id a5sm1074392yhj.0.2011.05.26.08.21.56 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 May 2011 08:21:59 -0700 (PDT) Date: Thu, 26 May 2011 11:21:43 -0400 From: Brian Mitchell To: user@couchdb.apache.org, glenn.bech@gmail.com Message-ID: <4805811FE46943C0ADA56EA0BE7D9413@gmail.com> In-Reply-To: References: Subject: Re: Limit on the number of databases? X-Mailer: sparrow 1.2 (build 767.8) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="4dde7007_5c482a97_2115" --4dde7007_5c482a97_2115 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Thursday, May 26, 2011 at 6:22 AM, Glenn Bech wrote: > Hi, > > I just want to ask if there are limits on the number of databases in Couch. > I am playing around with embeded Couch on Android and are thinking in the > line of having > one database per user, and use replication to push data from the client to > the server. This will provde for an Excellent "offline" user experience. > > This will of course not work if Couch does not handle unlimited datbases > very well performance- or otherwise. > > Does this sound like a feasable design solution? > > Regards, > > Glenn I've done some testing and there are a couple things to keep in mind. First of all, CouchDB relies directly on the scalability of your filesystem. Having one database in CouchDB means you also have at least one file for each of those. Since CouchDB currently stores them all in one directory, you'll need to make sure you select a filesystem that can handle your expected scale appropriately (many filesystems should be fine in the millions of files level, but characteristics can differ so do test this). Another problem, one which I don't have an immediate answer for is backup. While you could claim replication is enough for this, I'd say it isn't. The event you need backups for also cover events like maliciously destroyed or manipulated data or simply the existence of bugs. I'd rather not trust my data never get screwed up. by the code that accesses it. Many backup systems are designed around a small number of files. Being able to rollback to a point in time with millions of files could be an extremely painful process. (I have ideas on how to solve this but it's still not an easy problem.) Last but not least, consider the number of active databases you'll need at any single time. This can be split across many machines of course but it still adds up quickly. Open file descriptors are great but not if you have to close and then reopen them all the time. A carefully tuned VM can manage many thousands w/o a problem but I wouldn't push this too much higher. So if you have 15 machines and 30k active users for any single 1 minute window, that would be 2k files open and active per machine. Brian. --4dde7007_5c482a97_2115--