Create a Zone

After starting the Admin command line interface (CLI) and naming your KVstore, you can create at least one zone. It is possible, and even desirable, to create more than one zone. Because zones are complete copies of your store, using multiple zones improves your store availability. This section describes an installation with a single zone. For more directions about creating a store deployment with multiple zones, see Configuring with Multiple Zones.

Note:

Once you add Storage Nodes to a zone, you cannot remove the zone from your store.

To create a zone, use the plan deploy-zone with this usage:

plan deploy-zone -name <zone name>
-rf <replication factor>
[-type [primary | secondary]]
[-arbiters | -no-arbiters ]
[-json ]
[-master-affinity | -no-master-affinity]
[-plan-name <name>] [-wait] [-noexecute] [-force] 

where:

  • -arbiters

    Specifies that you can allocate Arbiter Nodes on the Storage Node in the zone.

  • -no-arbiters

    Specifies that you cannot allocate Arbiter Nodes on the Storage Node in the zone. You can specify this flag only on a primary zone.

    Note:

    Only primary zones can host Arbiter Nodes.

  • -rf

    A number specifying the Zone Replication Factor. A primary zone can have a Replication Factor equal to zero. Zero capacity Storage Nodes would be added to this zone to host the Arbiter Nodes.

  • -name

    Identifies the zone name, as a string.

  • -json

    Formats the command output in JSON.

    Note:

    Only primary zones can host Arbiter Nodes.

  • –master-affinity

    Indicates that this zone is a Master Affinity zone.

  • -no-master-affinity

    Specifies that this zone is not a Master Affinity zone.

  • -type

    Specifies the type of zone to create. If you do not specify a –type, the plan utility creates a Primary zone.

For more information on Primary and Secondary Replication Factors, see Configuring with Multiple Zones.

When you execute the plan deploy-zone command, the CLI returns the plan number. It also returns instructions on how to check the plan's status, or to wait for it to complete. For example:

kv-> plan deploy-zone -name "Boston" -rf 3 -wait
Executed plan 1, waiting for completion...
Plan 1 ended successfully 

You can show the plans and their status using the show plans command.

kv-> show plans
1 Deploy Zone (1)          SUCCEEDED

A zone may also have a Replication Factor equal to zero. This type of zone is useful to host only Arbiter Nodes. You would add zero capacity Storage Nodes to this zone in order to host Arbiter Nodes. For more information see Deploying an Arbiter Node Enabled Topology.

You can also create Master Affinity Zones, which let you prioritize master nodes in primary zones. See Master Affinity Zones.