Skip to main content

Configure Aerospike Database

Aerospike uses a single file to configure a database node. The default location of the configuration file is /etc/aerospike/aerospike.conf.

The configuration file is divided into different contexts, some of which are optional. These contexts can be in any order in the configuration file. A context can be further divided into sub-contexts.

The maximum length of a line in the configuration file is 1,024 characters. (Prior to Aerospike Server 5.0, the line length limit was 256 characters.)

The following is an example of a skeletal configuration file with most common contexts and sub-contexts. Most contexts shown below are empty: they do not have actual parameters, indicated by empty braces {}. Sub-contexts are indented.

service {}               # Tuning parameters, process owner, feature key file

network { # Used to configure intracluster and application-node
# communications
service {} # Tools/Application communications protocol
fabric {} # Intracluster communications protocol
info {} # Administrator telnet console protocol
heartbeat {} # Cluster formation protocol

security { # (Optional, Enterprise Edition only) to enable
# access control on the cluster
enable-security true # Versions < 5.7 only. Presence of security context
# enables access control for 5.7+

logging {} # Logging configuration

xdr { # (Optional, Enterprise Edition only) Configure
# Cross-Datacenter Replication
dc <name> {} # Remote datacenter node list

namespace <name> { # Define namespace record policies and storage engine
storage {} # Configure persistence or lack of persistence
set {} # (Optional) Set specific record policies

mod-lua { # location of UDF modules
user-path /opt/aerospike/usr/udf/lua

Configuration Steps

  1. (Optional) Configure feature key.
  2. Configure network service and heartbeat sub-contexts.
  3. Configure namespaces.
  4. Configure logging and log rotation.
  5. (Optional) Configure security.
  6. (Optional) Configure rack-awareness.
  7. (Optional) Configure cross-datacenter replication.

Where to Next