CouchDB Multi-User Quota

I want to offer free hosting for CouchDB. The authorization part is pretty simple (the user has access to 1 database), but I was wondering if there is any easy way to assign a spatial quota for this database / user.

+3
source share
2 answers

CouchDB does not support quotas natively, so you might need something ordinary.

You can execute it yourself, either using the tiny CouchDB plug, or using the appropriate hosting software, and use the usage information returned by CouchDB. Starting with version 1.2, CouchDB indicates not only disk usage, but also “data”, not including metadata and old data.

+3
source

I solved this by combining Linux inotify support with read-only couchdb authentication.

So I did it like this:

  • I wrote an inotify program (python, in my case) with monitors, all calls to each file in /var/lib/couchdb/foo.couch. Each access is joined together until a time window is reached.

  • , API- "info" , , .

  • , - , , , . ( - ).

. CouchDB , : a) b) . , , . , , , , .

  1. DOES ( ), .

, , , , .

0

All Articles