Skip to Main Content
CouchDB: The Definitive Guide
book

CouchDB: The Definitive Guide

by J. Chris Anderson, Jan Lehnardt, Noah Slater
January 2010
Intermediate to advanced content levelIntermediate to advanced
272 pages
6h 41m
English
O'Reilly Media, Inc.
Content preview from CouchDB: The Definitive Guide

Chapter 19. Clustering

OK, you’ve made it this far. I’m assuming you more or less understand what CouchDB is and how the application API works. Maybe you’ve deployed an application or two, and now you’re dealing with enough traffic that you need to think about scaling. “Scaling” is an imprecise word, but in this chapter we’ll be dealing with the aspect of putting together a partitioned or sharded cluster that will have to grow at an increasing rate over time from day one.

We’ll look at request and response dispatch in a CouchDB cluster with stable nodes. Then we’ll cover how to add redundant hot-failover twin nodes, so you don’t have to worry about losing machines. In a large cluster, you should plan for 5–10% of your machines to experience some sort of failure or reduced performance, so cluster design must prevent node failures from affecting reliability. Finally, we’ll look at adjusting cluster layout dynamically by splitting or merging nodes using replication.

Introducing CouchDB Lounge

CouchDB Lounge is a proxy-based partitioning and clustering application, originally developed for Meebo, a web-based instant messaging service. Lounge comes with two major components: one that handles simple GET and PUT requests for documents, and another that distributes view requests.

The dumbproxy handles simple requests for anything that isn’t a CouchDB view. This comes as a module for nginx, a high-performance reverse HTTP proxy. Because of the way reverse HTTP proxies work, this automatically ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Getting Started with CouchDB

Getting Started with CouchDB

MC Brown
Scaling CouchDB

Scaling CouchDB

Bradley Holt
Cloud Native Go

Cloud Native Go

Matthew A. Titmus

Publisher Resources

ISBN: 9780596158156Errata Page