Skip to main content
Loading

Namespace Configuration

Aerospike's namespaces can be configured and tuned to fit a wide variety of use cases. In this section we will compare and provide configuration recipes for the most common namespace configuration variants. For a complete listing of namespace parameters see the configuration reference.

The minimum requirement for configuring a namespace is to provide a namespace-name. This will create an in memory namespace by that name with a 4GB capacity. The configuration would be similar to the following, the commented parameters indicate the defaults.

namespace <namespace-name> {
# memory-size 4G # 4GB of memory to be used for index and data
# replication-factor 2 # For multiple nodes, keep 2 copies of the data
# high-water-memory-pct 60 # Evict non-zero TTL data if capacity exceeds
# 60% of 4GB
# stop-writes-pct 90 # Stop writes if capacity exceeds 90% of 4GB
# default-ttl 0 # Writes from client that do not provide a TTL
# will default to 0 or never expire
# storage-engine memory # Store data in memory only
}

In the following sections we will dive deeper into namespace and storage configuration and provide configuration recipes to enable you to get started quickly.

caution

For versions not running the cluster protocol introduced in versions 3.13, adding or removing a namespace requires a full cluster shutdown. It is also critical on these older versions of the server to keep the same namespaces order in aerospike.conf throughout the cluster.

caution

There is a maximum limit of 32 namespaces in a cluster in the Aerospike Enterprise Edition Server version and 2 namespaces in a cluster in the Aerospike Community Edition Server version (as of version 4.0).

Where to Next?