Rack-zone awareness
Rack-Zone Awareness enables logical groupings of servers on a cluster where each server group physically belongs to a rack or Availability Zone. Enterprise Edition only.
The Rack-Zone Awareness feature provides the ability to specify that active and corresponding replica partitions be created on servers that are part of a separate rack or zone. To enable Rack-Zone Awareness, all servers in a cluster must be upgraded.
To configure servers into groups, use the couchbase-cli tool with the group-manage command.
General syntax with group-manage:
couchbase-cli group-manage -c HOST:PORT
-u USERNAME -p PASSWORD
[OPTIONS]
- -c HOST:PORT or --cluster=HOST:PORT
- Cluster location
- -u USERNAME or --username=USERNAME
- Administrator username for the cluster
- -p PASSWORD or --password=PASSWORD
- Administrator password for the cluster
- --list
- Shows the server groups and the servers assigned to each server group.
- --create --group-name=groupName
- Creates a server group .
- --delete --group-name=groupName
- Removes an empty server group.
- --rename=newGroupName --group-name=oldGroupName
- Renames an existing server group.
- --group-name=groupName --add-servers="HOST:PORT;HOST:PORT"
- Adds servers to a group.
- --from-group=groupName --to-group=groupName --move-servers="HOST:PORT;HOST:PORT"
- Moves one or more servers from one group to another.
Creating server groups
In the following example, a server group is created.
couchbase-cli group-manage -c 192.168.0.1:8091
-u myAdminName
-p myAdminPassword
--create --group-name=myGroupName
Adding servers to server groups
In the following example, two servers are added to a server group using the group-manage command.
couchbase-cli group-manage -c 192.168.0.1:8091
-u myAdminName
-p myAdminPassword
--group-name=myNewGroup
--add-servers="10.1.1.1:8091;10.1.1.2:8091"
In the following example, a server is added to the server group using the server-add command.
If the --group-name option is not specified with the server-add command, the server is added to the default group.
couchbase-cli server-add -c 192.168.0.1:8091
--server-add=192.168.0.2:8091
--server-add-username=Administrator
--server-add-password=password
--group-name=groupName
Moving servers from server groups
In the following example, two servers are moved from one server group to another using the group-manage command.
couchbase-cli group-manage -c 192.168.0.1:8091
-u myAdminName
-p myAdminPassword
--from-group=myFirstGroup
--to-group=mySecondGroup
--move-servers="10.1.1.1:8091;10.1.1.2:8091"