是否建议使用Supervisor运行redis

MLi*_*ter 4 production-environment redis supervisord

使用Supervisor在生产中运行redis是一个好习惯吗?

我已经google了一下,但没有看到很多这样做的例子.如果没有,在生产中运行redis的正确方法是什么?

FGR*_*eau 8

我个人只是在Redis上使用Monit进行制作.如果Redis崩溃Monit将重新启动它,但更重要的是,Monit将能够监控(并在达到threeshold时发出警报)Redis当前占用的RAM量(这是最大的问题)

配置可能是这样的(如果maxmemory在Redis中设置为1Gb)

check process redis
  with pidfile /var/run/redis.pid
  start program = "/etc/init.d/redis-server start"
  stop program = "/etc/init.d/redis-server stop"
  if 10 restarts within 10 cycles
    then timeout
  if failed host 127.0.0.1 port 6379 then restart
  if memory is greater than 1GB for 2 cycles then alert
Run Code Online (Sandbox Code Playgroud)