Search:

Search all manuals
Search this manual
Manual
Membase Manual 1.7
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
4.5 Membase Best Practices
Chapter Sections
Chapters

4.5.5. Using Membase in the Cloud

For the purposes of this discussion, we will refer to "the cloud" as Amazon's EC2 environment since that is by far the most common cloud-based environment. However, the same considerations apply to any environment that acts like EC2 (an organization's private cloud for example). In terms of the software itself, we have done extensive testing within EC2 (and some of our largest customers have already deployed Membase there for production use). Because of this, we have encountered and resolved a variety of bugs only exposed by the sometimes unpredictable characteristics of this environment.

Being simply a software package, Membase Server is extremely easy to deploy in the cloud. From the software's perspective, there is really no difference being installed on bare-metal or virtualized operating systems. On the other hand, the management and deployment characteristics of the cloud warrant a separate discussion on the best ways to use Membase.

We have written a number of RightScale templates to aid in your deployment within Amazon. You can very easily sign up for a free RightScale account to try it out. The templates handle almost all of the special configuration needed to make your experience within EC2 successful. Direct integration with RightScale also allows us to do some pretty cool things around auto-scaling and pre-packaged deployment. Check out the templates here: Membase on RightScale .

We've also authored an AMI for use within EC2 independent of RightScale. When using these, you will have to handle the specific complexities yourself. You can find this AMI by searching for 'membase' in Amazon's EC2 portal.

Some considerations to take into account when deploying within the cloud are:

Local Storage

Dealing with the first point is not very much different than a data center deployment. However, EC2 provides an interesting solution. Through the use of EBS storage, you can obviate the largest concern of losing your data when an instance fails. Writing Membase data and configuration to EBS creates a reliable medium of storage. There is direct support for using EBS within RightScale and of course you can set it up manually yourself.

Using EBS is definitely not required, but you should make sure to follow the best practices around performing backups.

Keep in mind that you will have to update the per-node disk path when configuring Membase to point to wherever you have mounted an external volume.

IP addresses

The second issue is a bit trickier and requires configuring Membase to use a DNS entry instead of an IP address. By default, Membase servers use their IP address as a unique identifier. If the IP changes, an individual node will not be able to identify its own configuration and other nodes that it was clustered to will not be able to access it. In order for a node to identify itself via a DNS name rather than and IP address, the following instructions must be followed. Note that this configuration is automatically handled by the RightScale server template.

A few points to keep in mind when setting this up:

Warning

The below steps will completely wipe any data and configuration from the node, so it is best to start with a fresh Membase install. If you already have a running cluster, you can easily rebalance a node out of the cluster, make the change and then rebalance it back into the cluster. Nodes with IP's and hostnames can exist in the same cluster.

For Linux:

...rest of file... -detached \ -run ns_bootstrap -- \ -ns_server config_path "\"/opt/membase/etc/membase/static_config\"" \ -name ns_1@membase1.company.com

1. Delete the files under:

For Windows:

Security groups/firewall settings

It's important to make sure you have both allowed AND restricted access to the appropriate ports in a Membase deployment. Nodes must be able to talk to one another on various ports and it is important to restrict external and/or internal access to only those individuals you want to have access. Unlike a typical data center deployment, cloud systems are open to the world by default and steps must be taken to restrict access.

swap

Certain cloud systems by default don't have a swap partition configured. While a system should not utilize a swap partition heavily, it is our recommended practice to have at least some amount of swap configured to avoid the kernel from killing processes.