在influxdb v0.13中禁用WAL或强制刷新



我正在尝试使用EFS(类似于NFS的弹性文件存储)在AWS上为influxdb设置一个简单的集群,其中2个不同的涌入进程将共享数据库。我有2个EC2实例(命名为:EC2_1, EC2_2)运行自己的influxdb进程。两个EC2实例都挂载在/opt/EFS上的一个名为"EFS"的公共EFS目录下。我修改了两个ec2实例上的influxdb.conf,使其指向共同的/opt/efs/influxdb/data目录的数据,/opt/efs/influxdb/wal的wal,/opt/efs/influxdb/meta的元目录。

我想要实现的是,当EC2_1内流进程向数据库写入一些东西时,它可以立即被EC2_2上的内流进程读取。

为了达到这个目的,我试图找到一个可以禁用WAL或使写入磁盘非常频繁(一次/秒)的设置,以便另一个进程可以直接从磁盘读取。读/写性能或数据丢失不是我现在主要关心的问题。

我试着改变下面的设置,希望它能使WAL刷新频繁,但它没有按我预期的方式工作:

# CacheSnapshotMemorySize is the size at which the engine will
# snapshot the cache and write it to a TSM file, freeing up memory
# cache-snapshot-memory-size = 26214400
  cache-snapshot-memory-size = 2
# CacheSnapshotWriteColdDuration is the length of time at
# which the engine will snapshot the cache and write it to
# a new TSM file if the shard hasn't received writes or deletes
# cache-snapshot-write-cold-duration = "1h"
  cache-snapshot-write-cold-duration = "1s"

如果EC2_1写了一些东西到influxdb,查询EC2_2不会显示数据,除非EC2_2上的influxdb进程重新启动,反之亦然

所以没有办法完全禁用WAL或使其每秒刷新。

最新更新