# Aerospike database configuration file.

# This stanza must come first.
service {
  user ${user}
  group ${group}
  paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1.
  pidfile ${home}/var/run/aerospike.pid
  proto-fd-max 15000
  work-directory ${home}/var
}

logging {
  # Log file must be an absolute path.
  file ${home}/var/log/aerospike.log {
    context any info
  }
}

mod-lua {
  user-path ${home}/var/udf/lua
}

network {
  service {
    address ${service_addr}
    port ${service_port}
  }

  heartbeat {
    mode multicast
    multicast-group ${multicast_addr}
    port ${multicast_port}

    interval 150
    timeout 10
  }

  fabric {
    port ${fabric_port}
  }

  info {
    port ${info_port}
  }
}

namespace test {
  replication-factor 2
  memory-size 4G
  default-ttl 30d # 30 days, use 0 to never expire/evict.
  storage-engine memory
}
