To stop the Redis server, you can use the
SHUTDOWN command which gracefully shuts down the server. There are two ways to issue this command:
<pid> with the process ID of the Redis server. You can find the process ID by running the following command:
ps aux | grep redis-server
Note that sending a SIGTERM signal (default when using
kill) to Redis is equivalent to issuing a
SHUTDOWN SAVE command, which saves the data to disk before shutting down. If you want to shut down Redis without saving the data to disk, you can send a SIGINT signal instead:
kill -2 <pid>
It's generally recommended to use the
SHUTDOWN command to ensure that Redis shuts down gracefully and all data is saved properly.
Dragonfly is fully compatible with the Redis ecosystem and requires no code changes to implement.