카우치베이스 provides high availability and disaster recovery in several ways:
- Homogenous cluster
- Replication
- Backup and restore
- Rack zone awareness
This blog will show how to create a Couchbase cluster using Couchbase Command Line Interface (CLI). In addition, these steps can also be performed using the Couchbase REST API 그리고 카우치베이스 웹 콘솔.
Couchbase nodes in a cluster are homogeneous. Applications can write to any node and read from any node. There is no write-to-master and read-from-slave architecture that inherently gives you scalability problems. This allows the Couchbase cluster to truly scale horizontally to meet your growing application demands.
Creating a Couchbase cluster involves the following steps:
- Provision Couchbase: Provision 1 or more Couchbase nodes, say on Amazon Web Services
- Initialize master: Initialize any node to be the “master” of the cluster by calling
cluster-initCLI command - Create cluster: For all other nodes, create a cluster by invoking the
server-addCLI command - Rebalance cluster: Finally, rebalance the cluster by calling the
리밸런싱CLI command
Provision Couchbase
Provision a Couchbase node on Amazon:
|
1 2 3 4 5 6 |
aws EC2 실행–instances —image–아이디 ami–db95ffbb —count 1 —instance–유형 m3.large —열쇠–이름 나의–카우치베이스–열쇠 —security–groups “Couchbase Server Community Edition-4-0-0-AutogenByAWSMP-“ |
Security group name is explained in Couchbase Cluster on Amazon using CLI. Let’s call this node as “master”.
Initialize Couchbase “master”
Configure the “master” instance and initialize the cluster:
|
1 2 3 4 5 6 7 8 9 10 11 |
내보내기 COUCHBASE_CLI=/Users/arungupta/도구/카우치베이스–서버–4.0.app/콘텐츠/자원/카우치베이스–core/bin/카우치베이스–cli $COUCHBASE_CLI 클러스터–초기화 –c :8091 –u 관리자 –p 비밀번호 —클러스터–사용자 이름 관리자 —클러스터–비밀번호 비밀번호 —클러스터–index–ramsize=300 —클러스터–ramsize=300 —services=데이터,index,질의 |
Create another instance, lets call it “worker”. Note, this is not a master/slave architecture. Couchbase cluster is homogenous where any node in the cluster can be “master”.
Create Couchbase Cluster
Add this newly created “worker” instance to the cluster:
|
1 2 3 4 5 6 7 8 |
$COUCHBASE_CLI 서버–추가 —클러스터=:8091 —사용자 관리자 —비밀번호 비밀번호 —서버–추가= —서버–추가–사용자 이름=관리자 —서버–추가–비밀번호=비밀번호 |
Typically, you’ll create and add multiple nodes to the cluster before rebalancing.
Rebalance Couchbase Cluster
Rebalance the cluster:
|
1 2 3 4 5 |
$COUCHBASE_CLI 리밸런싱 —클러스터=:8091 —사용자 관리자 —비밀번호 비밀번호 |
Now, you can create as many instances and easy include them in the cluster. Adding a single node and rebalancing the cluster can be easily done as a single step:
|
1 2 3 4 5 6 7 8 |
$COUCHBASE_CLI 리밸런싱 —클러스터=:8091 —사용자 관리자 —비밀번호 비밀번호 —서버–추가= —서버–추가–사용자 이름=관리자 —서버–추가–비밀번호=비밀번호 |
Now, your cluster is accessible at https://:8091 or https://:8091. Further references …
- Couchbase Server Developer Portal
- Hello Couchbase Example
- Couchbase CLI
- Questions on StackOverflow, 포럼 또는 Slack Channel
- Follow us @couchbasedev
- Couchbase 4.5 Beta
Enjoy!


댓글 남기기
댓글을 달기 위해서는 로그인해야합니다.