Home  >  Article  >  Database  >  How to shut down the redis Cluster cluster

How to shut down the redis Cluster cluster

(*-*)浩
(*-*)浩Original
2019-11-26 10:38:325491browse

How to shut down the redis Cluster cluster

The redis nodes in the redis cluster are interconnected with each other (PING-PONG mechanism). The binary protocol is used internally to optimize the transmission speed and bandwidth. There is no host, and the client can connect to any node at will. (Recommended learning: Redis video tutorial)

Close redis normally

Execute the shutdown command directly on the client or directly on the command line Execute redis-cli -p 7001 shutdown

We directly write a shutdown.sh

or directly kill -9 ${process number} (if you want to do it once To kill multiple processes, just separate the process numbers with spaces)

Related instructions:

# 查看redis进程
ps -ef|grep redis
# kill掉进程
kill -9 2177 2217

If the cluster has been set up before, For some reasons, all nodes are killed. If you need to start the cluster at this time, you only need to start each Redis node one by one, and the cluster will naturally start up.

Related instructions:

# 后台启动Redis
src/redis-server redis.conf

For more Redis related technical articles, please visit the Redis Getting Started Tutorial column to learn!

The above is the detailed content of How to shut down the redis Cluster cluster. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn