Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

5.3. Pillow

Pillow is both a router and rereducer for CouchDB. Like Lounge, Pillow is a separate application that sits in front of a cluster of standard CouchDB nodes. Both Lounge and Pillow are designed to solve the same problems, but they have different approaches to solving these problems. Pillow uses the hash of a document ID to determine which CouchDB node should serve the request. For view requests, Pillow collects the view results from all CouchDB nodes and merges these results for the client.

One nice feature of Pillow is that it supports automatic resharding. Resharding is done using CouchDB’s replicator. The shard to which to send an individual document is determined by replication filters. When asked to reshard, Pillow will create the necessary replication filters and initiate the replication. You can then monitor the replication status to see when Pillow is ready for you to switch to using the new shards. Pillow can automatically switch to the new shards when they are ready, but it is recommended that you make the switch manually.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial