On 11/01/2009, at 4:46 AM, Jan Lehnardt wrote:


On 10 Jan 2009, at 19:07, Chris Anderson wrote:

On Sat, Jan 10, 2009 at 9:19 AM, Kurt Mackey <[email protected]> wrote:
Now, the obvious downside is that it makes it more difficult to do cross-customer queries. But what other problems are there with this idea? Assuming that there were lots and lots and lots of accounts, what performance implications are there to giving each their own DB rather than making them all share?


CouchDB keeps each database in it's own file, so if you can spread the
files across disks (using symlinks for now) you should get better
performance with many databases. DB-per-user is a good pattern also
because it means you can let users replicate their entire account
locally, without worrying about filtering out extra data.


In addition, if you name your databases "foo/bar" CouchDB will actually
create that as a structure on disk to avoid running into trouble with
filesystems that don't like a lot of files in a single directory.

Setups with 1 million databases representing users have been tested
successfully.

Hmmm. The filesystem layout changes that I've proofed, and had accepted for incorporation, changes this. Filenames are munged to allow arbitrary characters, and so '/' is escaped.

Antony Blakey
-------------
CTO, Linkuistics Pty Ltd
Ph: 0438 840 787

Nothing is really work unless you would rather be doing something else.
  -- J. M. Barre


Reply via email to