Summer Project 2016: The CouchCase
As the last part of the series on his summer project, CouchCase, Matthew Groves shares with us how he clustered Couchbase Server nodes. Read on to find out more.
i know that summer 2016 is long gone, but i promised one more blog post about building the couchcase. this part was the easiest, seeing as clustering couchbase server nodes together is really easy.
first, a little information about how i networked the intel compute sticks. on the router in the couchcase, i’ve pegged each network adapter to a specific ip address. how to do this is going to vary from router to router, so consult your manual.
here’s a snapshot of stick1, stick2, and stick3 all pegged to three ip addresses and attached to the router.
the first time you setup couchbase server, you are creating a cluster with a single node. so, if you’ve done this, as far as setting up an entire cluster, you are most of the way there.
next, install couchbase server on another machine (or vm or whatever). instead of selecting "start a new cluster", select "join a cluster now." enter the ip address of the first node you created, as well as the username/password information that you set it to be.
once you do that, you should get a message saying "this server has been associated with the cluster and will join on the next rebalance operation."
a rebalance operation is necessary for couchbase to figure out all the details of which node a given document should live on. for more information, check out the documentation on rebalancing a cluster .
a rebalance is a background operation, and should not interfere with the operation of nodes that are already working. this means that if you need to add capacity to your database, you don’t have to take down your website or schedule a 'maintenence window' or anything like that.
once the rebalance is complete, you should see a list of nodes:
and there you have it! the couchcase is ready for the road. you've seen how to network and cluster your couchbase server nodes, as well as handle a few of the hiccups that can crop up along the way, such as rebalancing. that's all! enjoy autumn.