Master Redis fundamentals - installation, CLI, core concepts, use cases, and getting started with in-memory data structures
Get production-ready with Redis fundamentals. Install, configure, and master CLI operations, core concepts like single-threading and persistence, and choose the right data structures for caching, sessions, rate limiting, and more.
/plugin marketplace add pluginagentmarketplace/custom-plugin-redis/plugin install pluginagentmarketplace-developer-roadmap-interactive@pluginagentmarketplace/custom-plugin-redissonnetProduction-grade agent for Redis fundamentals. Provides comprehensive guidance on installation, CLI operations, core concepts, and practical use cases with full error handling and observability.
capabilities:
- platform: [linux-debian, linux-rhel, macos, windows-wsl2, docker, kubernetes]
- methods: [package-manager, source-build, container, helm-chart]
- verification: automated-health-check
Commands:
# Quick install verification
redis-cli ping # Expected: PONG
# Version check
redis-server --version
# Config location
redis-cli CONFIG GET dir
| Concept | Description | Production Impact |
|---|---|---|
| In-memory | All data in RAM | Sub-ms latency |
| Single-threaded | Event loop model | No lock contention |
| Persistence | RDB/AOF options | Durability vs speed |
| Replication | Master-replica | HA & read scaling |
# Connection with auth
redis-cli -h <host> -p <port> -a <password>
# Basic operations
SET key "value" EX 3600 # With 1-hour TTL
GET key
DEL key
EXISTS key # Returns 1 or 0
TTL key # Remaining seconds
┌─────────────────────────────────────────────────────────┐
│ What's your primary need? │
├─────────────────────────────────────────────────────────┤
│ ├── Caching? ──────────────────> String + TTL │
│ ├── Session storage? ──────────> Hash + TTL │
│ ├── Rate limiting? ────────────> String + INCR + EXPIRE │
│ ├── Leaderboard? ──────────────> Sorted Set │
│ ├── Message queue? ────────────> List or Stream │
│ └── Real-time analytics? ──────> HyperLogLog + Bitmap │
└─────────────────────────────────────────────────────────┘
redis-installation - Detailed installation guides (PRIMARY_BOND)redis-strings - String data type operations| Level | Duration | Topics | Milestone |
|---|---|---|---|
| Beginner | 2-4h | Install, SET/GET, TTL | First cache hit |
| Intermediate | 4-8h | Data types, pipelining | 10K ops/sec |
| Advanced | 8+h | Lua scripts, modules | Production deploy |
Error: Could not connect to Redis at 127.0.0.1:6379
Diagnosis:
# Check if Redis is running
systemctl status redis-server # Linux
brew services list | grep redis # macOS
docker ps | grep redis # Docker
# Check port binding
netstat -tlnp | grep 6379
ss -tlnp | grep 6379
Solutions:
| Cause | Fix |
|---|---|
| Redis not running | systemctl start redis-server |
| Wrong port | Check redis.conf for port setting |
| Firewall blocking | ufw allow 6379/tcp |
| Bind to localhost only | Set bind 0.0.0.0 in config |
Error: NOAUTH Authentication required
Fix:
# Connect with password
redis-cli -a yourpassword
# Or via AUTH command
redis-cli
AUTH yourpassword
Error: OOM command not allowed when used memory > 'maxmemory'
Diagnosis:
redis-cli INFO memory | grep -E "(used_memory|maxmemory)"
Solutions:
# Increase memory limit
redis-cli CONFIG SET maxmemory 2gb
# Set eviction policy
redis-cli CONFIG SET maxmemory-policy allkeys-lru
□ Redis server running?
□ Correct host:port?
□ Authentication configured?
□ Network/firewall allows connection?
□ Client library version compatible?
□ Memory within limits?
□ Disk space for persistence?
| Log Pattern | Meaning | Action |
|---|---|---|
Ready to accept connections | Normal startup | None |
Background saving started | RDB snapshot | Monitor duration |
MASTER <-> REPLICA sync started | Replication init | Wait for completion |
# WARNING overcommit_memory | Linux config issue | Set vm.overcommit_memory=1 |
# WARNING: TCP backlog | High connection rate | Increase somaxconn |
| Code | Name | Description | Recovery |
|---|---|---|---|
| E001 | CONNECTION_REFUSED | Cannot reach Redis server | Check server status |
| E002 | AUTH_FAILED | Invalid credentials | Verify password |
| E003 | OOM | Out of memory | Increase maxmemory or evict |
| E004 | READONLY | Replica in read-only mode | Write to master |
| E005 | CROSSSLOT | Keys in different slots | Use hash tags |
| Metric | Development | Production | Alert Threshold |
|---|---|---|---|
| Latency (p99) | <5ms | <1ms | >10ms |
| Ops/sec | 10K | 100K+ | <50% baseline |
| Memory usage | <50% | <75% | >85% |
| Connected clients | <100 | <10K | >80% limit |
| Hit ratio | >80% | >95% | <90% |
You are an elite AI agent architect specializing in crafting high-performance agent configurations. Your expertise lies in translating user requirements into precisely-tuned agent specifications that maximize effectiveness and reliability.