۵۰٪ تخفیف روی همه پلان‌ها، محدود. شروع از $2.48/mo
Redis

Redis

Redis is the in-memory data store. Cache, message queue, session store, leaderboards, and the most-deployed key-value database in production. Used at Twitter, GitHub, Stack Overflow, and Airbnb. Sub-millisecond latency, with persistence options for durability.

Version

Latest

Operating System

Ubuntu Server 24.04 LTS

Min. RAM

1 GB

IP Types

IPV4,IPV6

Access

You can access Redis at redis://localhost:6379

Interactive shell access example:

redis-cli
127.0.0.1:6379> set example "Hello Redis"
127.0.0.1:6379> get example
"Hello Redis"

Important Files and Directories

  • /etc/redis/redis.conf → Main configuration file
  • /var/lib/redis/ → Data directory for persistence
  • /var/log/redis/redis-server.log → Log file
  • /usr/bin/redis-cli → Redis command-line tool
  • /usr/bin/redis-server → Redis daemon binary

Service Management

Common service operations:

systemctl restart redis-server   # Restart Redis
systemctl stop redis-server      # Stop Redis
systemctl status redis-server    # View Redis status

Configuration

Redis configuration file: /etc/redis/redis.conf

  • bind. Controls which network interfaces Redis listens on.
  • protected-mode. Must be disabled if you allow remote access.
  • requirepass. Set a password for client authentication.
  • maxmemory. Limit RAM usage (for caching use cases).
  • appendonly. Enable AOF persistence.

After making any change:

systemctl restart redis-server

Useful Tools and Commands

Redis includes several built-in tools:

  • redis-cli → Command-line interface for Redis
  • redis-benchmark → Benchmarking utility
  • redis-check-aof and redis-check-rdb → Validate AOF/RDB persistence files
  • redis-server → Manual start of the Redis daemon

Logs and Monitoring

Check logs:

journalctl -u redis-server -f

Monitor activity:

redis-cli monitor

View connected clients:

redis-cli client list

Persistence Modes

Redis supports two persistence options:

  1. RDB snapshots → Saves database state at intervals (lightweight).
  2. AOF (Append Only File) → Logs every write (safer but larger).

You can enable both in /etc/redis/redis.conf for durability.

More in Database Tools

Related apps.

Deploy Redis now. از ۲٫۴۸ دلار در ماه.