Advanced configuration
Out of the box, Aerospike Cloud database clusters are launched with the same configuration defaults as when running a self-managed Aerospike deployment. While the default configuration is sufficient to get up and running, a carefully planned and optimized database configuration is essential for getting the most out of your Aerospike Cloud deployment.
This page describes how to use the advanced configuration section of Aerospike Cloud when provisioning or updating a database cluster.
Constraints
Aerospike Cloud enforces certain configuration constraints that reflect established deployment patterns and operational best practices. These constraints simplify deployment, reduce risk, and increase stability for every Aerospike Cloud deployment.
- Always rack aware - Aerospike Cloud deployments are always rack aware. Each availability zone of an Aerospike Cloud deployment is configured as a separate rack.
- Homogeneous configuration - Aerospike Cloud configuration is managed at the cluster level, all per-node configuration is automatically handled by the platform.
- Data at rest encryption - Aerospike Cloud deployments encrypt all data at rest with platform-managed encryption keys.
- Platform managed storage - Aerospike Cloud manages all configuration relating to devices, mount points, and filesystems.
- Platform managed networking - Aerospike Cloud manages all configuration relating to cluster network topology, DNS records, and node access addresses.
- Automatic migration tuning - Aerospike Cloud manages migration tuning parameters to keep clusters stable during scaling operations.
Common advanced configuration use cases
Following are several examples of using advanced configuration to tune an Aerospike Cloud deployment.
Enable record expiration (TTL)
By default, record expiration, or Time to Live (TTL), is disabled. To enable record expiration, set .namespaces.0.nsup-period
to a non-zero value. This setting controls how often the namespace supervisor (NSUP) runs to process evicted records. The following example configures NSUP to run every 60 seconds and adds default TTL values at the namespace (7 days) and set level (1 day):
namespaces: - name: default nsup-period: 60 default-ttl: 604800 sets: - name: one-day-expiry default-ttl: 86400
{ "namespaces": [ { "name": "default", "nsup-period": 60, "default-ttl": 604800, "sets": [ { "name": "one-day-expiry", "default-ttl": 86400 } ] } ]}
For more information, see Managing the namespace supervisor.
Evictions and stop-writes configuration
Aerospike relies on evictions and stop-writes to mitigate situations where data accumulates in namespace storage and indexes faster than it is deleted. The stop-writes mechanism prevents new client writes from filling namespace storage beyond designated thresholds.
namespaces: - name: default stop-writes-sys-memory-pct: 90 storage-engine: stop-writes-avail-pct: 5 stop-writes-used-pct: 70 evict-used-pct: 60
{ "namespaces": [ { "name": "default", "stop-writes-sys-memory-pct": 90, "storage-engine": { "stop-writes-avail-pct": 5, "stop-writes-used-pct": 70, "evict-used-pct": 60 } } ]}
For more information, see Evictions and stop-writes configuration:
LRU configuration
Aerospike is commonly used as an Least Recently Used (LRU) cache in addition to a primary data store. The following configuration sets default-read-touch-ttl-pct
on a specific set so that it behaves like an LRU cache which evicts records after one minute only if they have not been read within the last 30 seconds:
namespace test { default-ttl 30s # use 0 to never expire/evict. default-read-touch-ttl-pct 0 set testset { default-read-touch-ttl-pct 80 } nsup-period 120 replication-factor 1 storage-engine device { file /opt/aerospike/data/test.dat filesize 4G }}
namespaces: - name: default nsup-period: 120 default-ttl: 0 sets: - name: my-lru default-read-touch-ttl-pct: 50 default-ttl: 60
{ "namespaces": [ { "name": "default", "nsup-period": 120, "default-ttl": 0, "sets": [ { "name": "my-lru", "default-read-touch-ttl-pct": 50, "default-ttl": 60 } ] } ]}
For more information on using Aerospike as an LRU cache, see our announcement on LRU cache enhancement.
Limitations
Aerospike Cloud is subject to the same limitations as Aerospike Kubernetes Operator, and the Aerospike Database itself.
Relocated functionality
Some configuration options that are available to control in self-managed Aerospike deployment are available outside of the advanced configuration. For example, shadow devices can be enabled or disabled. Aerospike Cloud adjusts the server configuration to map the devices and provide that functionality.