This is our second part of our Couchbase and CFML series that we started last week. In our first post, “Installation and Introduction to Couchbase” we talked about Couchbase Server, how to install it, and how it can help create a fast and scalable caching layer for your applications. Today we’re going to talk about setting up a Couchbase cluster and look at our first use for it: as a Hibernate secondary cache for ColdFusion ORM.
In our previous post we set up a very simple cluster of only one node. Let’s look at how Couchbase lets you expand your cluster horizontally as your needs increase. A cluster can have as many nodes as you want, seriously! All nodes in a cluster will be exact copies of each other in regards to their buckets and even their configuration. When you set up the first node, you will choose how much RAM you want for each node in that cluster to allocate itself. You can only add a new node to the cluster if it has enough RAM to allow for the node size specified in the cluster at setup. Therefore, the total amount of RAM in the entire cluster will be the node size times the number of nodes.