Rob's web

Redis cache

Redis (Remote Dictionary Server) is a source-available, in-memory storage, used as a distributed, in-memory key-value database, cache and message broker, with optional durability. Because it holds all data in memory and because of its design, Redis offers low-latency reads and writes, making it particularly suitable for use cases that require a cache. Redis is the most popular NoSQL database, and one of the most popular databases overall. Redis is used in companies like Twitter, Airbnb, Tinder, Yahoo, Adobe, Hulu, Amazon and OpenAI.

Redis supports different kinds of abstract data structures, such as strings, lists, maps, sets, sorted sets, HyperLogLogs, bitmaps, streams, and spatial indices.

It is used in CMS's like wordpress, nextcloud.

Installation

# dnf install redis

Configuration

# cd /etc/redis
# ll
-rw-r-----. 1 redis root 93883 Oct 30  2022 redis.conf
-rw-r-----. 1 redis root 13793 Oct 30  2022 sentinel.conf

Redis.conf

# vi redis.conf
unixsocket /run/redis/redis.sock
unixsocketperm 777
always-show-logo yes

Starting redis

# systemctl start redis
# systemctl enable redis

Testing the server

# redis-cli
127.0.0.1:6379> ping
PONG
127.0.0.1:6379> quit
#

The server is ready to use. You set access to it in the clients that can use redis.

Links