我们在 ELK 堆栈中使用 Redis 来缓冲我们系统之间的消息 和 Elasticsearch 。消息由自定义 log4j-appender 推送到 redis 并由 logstash 弹出。
现在出现了问题:如果 redis 队列运行满(因为例如 Elasticsearch 没有运行),redis 切换到一个模式,不再允许持久更改。这是有道理的,但是从 Redis 弹出消息(因为例如 ES 再次启动)会减少 redis 中队列的大小。
如果队列已满,是否可以配置 redis 以允许 blpop?
最好的问候 本杰明
最佳答案
来自 redis.conf:
By default Redis will stop accepting writes if RDB snapshots are enabled (at least one save point) and the latest background save failed. This will make the user aware (in a hard way) that data is not persisting on disk properly, otherwise chances are that no one will notice and some disaster will happen.
在您的情况下,您应该禁用此选项:
config set stop-writes-on-bgsave-error no
修改这个选项后不要忘记重启redis。
关于redis - BLPOP 和 MISCONF 配置 Redis 保存 RDB 快照,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34307670/