How do I use configurations
- By default, Aerospike does not set any time-to-live on the records that it writes on the server unless
default-ttlis set on the namespace and relies on the application to maintain or clean-up data as necessary. In the event that you rely on Aerospike’s expirations to maintain the capacity limits on the server, you can set the
default-ttlaccordingly. Note that this is set at the namespace level and is a dynamic configuration (does not require an Aerospike service restart).
max-ttldefines the upper limit to the TTL that can be set on the records. This configuration is used to prevent the server from getting data from rogue clients with TTL higher than expected. This has an upper limit of 10 years (even if this configuration is not set explicitly).
default-ttlcannot be set higher than the
cold-start-evict-ttlis used to define the TTL such that records having TTL below this value will be evicted during a cold-start of Aerospike service. This helps speed up cold-start process which is a complete scan of the disk and can be time taking depending on the data on the devices.
What is the maximum limit of these configurations that can be set on a namespace?
default-ttlcannot be set higher than
max-ttlcannot be set higher than 10 years (for versions 3.8.3 and above).
cold-start-evict-ttldoes not have an upper limit as such, but knowing that the
max-ttlon the server cannot be beyond 10 years, this limit holds true for the
What do these log lines refer to?
For version 3.8.3 and above
- If the
max-ttlis configured lower than the
WARNING (info): (thr_info.c:2934) max-ttl must be >= default-ttl (current value in seconds)
- If the incoming TTL record is configured more than the configured max-ttl:
WARNING (rw): (write.c:776) write_master: invalid ttl 'value of incoming TTL'
- If the
max-ttlis configured to higher than the global maximum of 10 years:
WARNING (info): (thr_info.c:2930) max-ttl must be non-zero and <= 315360000 seconds
For versions prior to 3.8.3
The following warnings are seen which point towards an anomaly in the TTL values.
Note that in versions prior to 3.8.3, we did not have an explict check on the
max-ttl values. And the default value of
max-ttl was 0.
- If the incoming TTL is configured more than the
max-ttl= 8640000 = 100 days), you could see one of these warnings:
WARNING (rw): (thr_rw.c:3226) write_local: incoming ttl 4294938278 too big compared to 8640000 WARNING (rw): (thr_rw.c::3197) record TTL 1459720873 exceeds warning threshold 315360000 - set config value max-ttl to suppress this warning
Details on setting TTL from server and application
TTL MAX-TTL DEFAULT-TTL