Fork me on GitHub

CouchProxy

A proxy server for Apache CouchDB clusters.

CouchProxy is a simple proxy server that distributes reads and writes to a cluster of Apache CouchDB servers so they appear to be a single huge database. Documents are stored and retrieved from a particular CouchDB instance, using consistent hashing of the document id.

Map/reduce views are processed concurrently on each CouchDB instance and merged together by the proxy before returning the results to the client.

CouchProxy uses the Thin web server and EventMachine for asynchronous IO. There are no blocking IO calls in the server, which allows it to handle thousands of clients and many backend CouchDB nodes concurrently.

Dependencies

Install

$ gem install couchproxy
$ couchproxy config
$ vi couchproxy.yml # configure couchdb nodes
$ couchproxy start

Ubuntu setup

$ sudo apt-get install build-essential couchdb \
  ruby1.9.1 ruby1.9.1-dev

Authors

David Graham (david.malcom.graham@gmail.com)

License

CouchProxy is open source software released under the terms of the MIT license. If you have improvements to the code you'd like to share, send us a GitHub pull request with the changes and unit tests.

Download

You can download this project in either zip or tar formats.

You can also clone the project with Git by running:

$ git clone git://github.com/dgraham/couchproxy