Is it recommended to start redis with Supervisor

Is it okay to work with redis in production with Supervisor?

I googled around, but did not see many examples of this. If not, what is the correct way redis works in production?

+4
source share
2 answers

I personally just use Monit on Redis in production. If Redis crash Monit restarts it, but more importantly, Monit can control (and warn when it reaches three) the amount of RAM that Redis currently occupies (which is the biggest problem)

The configuration may be something like this (if maxmemory was set to 1Gb in Redis)

 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 
+8
source

Well, it depends. If I were to use redis running a daemon, I would use runit. I use monit, but only for monitoring. I like to see the green light.

However, for redis to use true power, you do not run redis as deamon esp master. If the master descends, you need to switch the slave to the master. Just toss it, I just take off the node in my head and I have a chef recipe bringing up a new node.

But then again ... it also depends on how often you take the picture. I do not take pictures, so there is no need to control the deamon.

People use reids for brute force speed. this means that you do not write to disk and save all the data in ram. If the node crashes ... and you do not take snapshots ... the data is lost.

+1
source

Source: https://habr.com/ru/post/1436461/


All Articles