Skip to content
Webinar - May 13th: How Criteo powers real-time decisions with a reduced footprintRegister now

Configure Aerospike Database

This page describes how to configure a Database cluster node using the configuration file, 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. The default location of the configuration file is /etc/aerospike/aerospike.conf.

Sample configuration file

The following sample file shows the structure of aerospike.conf with the most common contexts and sub-contexts. The contexts in this example are empty and 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
}
logging {} # Logging configuration
xdr { # (Optional, Enterprise Edition only) Configure
# Cross-Datacenter Replication
}
namespace { # Define namespace record policies and storage
# engine
storage-engine {} # Configure data storage for the namespace
set {} # (Optional) Set specific record policies
}
mod-lua { # location of UDF modules
}

Configuration file changes

The following examples show how aerospike.conf changed in Database 7.0.

Database 7.0 and later

# Aerospike database developer configuration file.
service {
run-as-daemon false # To work with gdb, and make console logging visible.
# The number of concurrent connections to the database is limited by
# proto-fd-max, and by the system's maximum number of open file descriptors.
# See "man limits.conf" for how to set the system's "nofile" limit.
proto-fd-max 1024
work-directory run/work
pidfile run/asd.pid
cluster-name cakery
}
mod-lua {
user-path run/work/usr/udf/lua
}
logging {
# Log file must be an absolute path.
file run/log/aerospike.log {
context any info
}
console {
context any info
}
}
network {
service {
address any
port 3000
}
heartbeat {
mode multicast
multicast-group 239.1.99.222
port 9918
# To use unicast-mesh heartbeats, remove the 3 lines above, and see
# aerospike_mesh.conf for alternative.
interval 150
timeout 10
}
fabric {
port 3001
}
# info {
# port 3003
# }
}
namespace test {
replication-factor 2
storage-engine memory {
data-size 4G
}
}

Prior to Database 7.0

# Aerospike database configuration file.
service {
user root
group root
pidfile /var/run/aerospike/asd.pid
proto-fd-max 15000
}
logging {
# Log file must be an absolute path.
file /var/log/aerospike/aerospike.log {
context any info
}
}
network {
service {
address any
port 3000
}
heartbeat {
mode multicast
multicast-group 239.1.99.222
port 9918
# To use unicast-mesh heartbeats, remove the 3 lines above, and see
# aerospike_mesh.conf for alternative.
interval 150
timeout 10
}
fabric {
port 3001
}
info {
port 3003
}
}
namespace test {
replication-factor 2
memory-size 4G
storage-engine memory
}

Configuration steps

  1. (If necessary) Obtain a feature-key file.
  2. Configure network service and heartbeat sub-contexts.
  3. Configure namespaces.
  4. Configuring Log Files and Manually Rotating the Aerospike Log File.
  5. (Optional) Configure security.
  6. (Optional) Configure rack-awareness.
  7. (Optional) Configure cross-datacenter replication.

Where to Next

Feedback

Was this page helpful?

What type of feedback are you giving?

What would you like us to know?

+Capture screenshot

Can we reach out to you?