Introduction
Redis is an in-memory data structure used as a database, cache, message broker, and streaming engine. It offers built-in replication, Lua scripting, LRU eviction, transactions, several levels of on-disk persistence, Redis Sentinel for high availability, and Redis Cluster for automatic partitioning. You can use Redis from most programming languages.
Redis is open-source (BSD licence). Redis allows data structures like strings, hashes, lists, sets, sorted sets with range searches, bitmaps, hyperloglogs, geographic indexes, and streams.
You can install Redis from here.
Redis can also start without a configuration file using the built-in default configuration. However, this is only suggested for testing and development.
The right way to configure Redis is by providing a Redis configuration file called redis.conf.
The Redis configuration file (redis.conf) can be found in the root directory. It is located at installdir/redis/etc/redis.
The CONFIG command can be used to get and set all Redis configurations.
CONFIG GET CONFIG_SETTING_NAME
Use * instead of CONFIG SETTING NAME to get all configuration options.
CONFIG GET *
The redis.conf file contains multiple directives that have a very simple format:
keyword argument1 argument2 ... argumentN
Passing arguments via the command line
You can also use the Redis command line to pass configuration options. This is very useful for testing. An example of starting a new Redis instance using port 6381 as the replica of the instance running at server 127.0.0.1 port 6379 is shown below.
./redis-server --port 6381 --replicaof 127.0.0.1 6379
The arguments passed via the command line follow the same format as those in the redis.conf file, with the difference that the keyword is preceded by –.





