没有持久性的 Aerospike 复制

Aerospike Replication Without Persistence

由n个节点组成的纯内存Aerospike集群是否会自动跨节点复制数据,在这种情况下,是否可以保证没有数据写入磁盘?

Will an in-memory only Aerospike cluster composed of n nodes automatically replicate data across nodes?

是的,假设您谈论的是 storage-engine memory 而不是 storage-engine devicedata-in-memory true

And in this case, is there a guarantee that no data will be written to disk?

您的记录将不会写入磁盘。日志和SMD(系统元数据)将写入磁盘。

  1. Aerospike 使用使用 RIPEMD160 的智能分区算法,该算法负责跨集群的均匀数据分布和复制。如果复制因子配置正确,它将在集群中分布数据correctly/evenly。

  2. 仅在持久模式下,Aerospike 需要提供一个磁盘存储文件以将数据持久保存到其中。如果 Aerospike 配置为内存存储,则没有提供磁盘存储文件的选项,这实际上意味着它不会将数据持久化到磁盘。

命名空间测试复制{

# memory-size 4G           # 4GB of memory to be used for index and data
# replication-factor 2     # For multiple nodes, keep 2 copies of the data
# high-water-memory-pct 60 # Evict non-zero TTL data if capacity exceeds
                           # 60% of 4GB
# stop-writes-pct 90       # Stop writes if capacity exceeds 90% of 4GB
# default-ttl 0            # Writes from client that do not provide a TTL
                           # will default to 0 or never expire
# storage-engine memory    # Store data in memory only

}