{"enrichment":{"faq":[{"a":"Redis caching setup begins with installation and basic configuration. Start by installing Redis, then configure your redis.conf file with memory limits, eviction policies, and bind addresses. Redis provides string, hash, list, and sorted set data types optimized for fast lookups. Use SET/GET commands for simple caching, or HSET/HGET for structured data. For production, run Redis in Docker using a docker-compose.yml file that exposes port 6379 and mounts a persistent volume. Configure maxmemory and maxmemory-policy (e.g., allkeys-lru) to handle memory constraints automatically.","q":"How to set up Redis caching for my application?"},{"a":"Redis offers two persistence mechanisms. RDB (Redis Database) creates point-in-time snapshots at intervals you specify\u2014fast to load but may lose recent data if Redis crashes. AOF (Append-Only File) logs every write command, providing better durability but slower performance and larger disk usage. Redis persistence configuration lets you combine both: RDB for recovery speed and AOF for safety. Configure save directives (e.g., 'save 900 1') and appendonly yes in redis.conf. Choose based on your tolerance for data loss versus performance requirements.","q":"What are Redis persistence RDB and AOF options?"},{"a":"Redis high availability uses Sentinel or Cluster modes. Sentinel monitors master-replica replication and automatically promotes a replica to master on failure\u2014ideal for simpler setups. Configure multiple Sentinel instances (minimum 3) pointing to your master Redis instance. Cluster mode shards data across nodes, distributing load and storage. For Sentinel failover setup, define sentinel.conf with monitor directives and quorum settings. Both modes require careful network configuration and monitoring to detect and respond to failures automatically.","q":"How do I configure Redis for high availability?"},{"a":"Redis distributed locking coordinates access to shared resources across multiple processes or servers. Implement it using SET with NX (only if not exists) and EX (expiration) flags: SET key value NX EX seconds. This ensures atomic lock acquisition and automatic release if the process crashes. Use Lua scripts for complex lock logic. Distributed locking enables rate limiting, preventing duplicate job processing in queues, and coordinating cache updates. Always set reasonable TTLs to avoid deadlocks.","q":"What is distributed locking with Redis and how is it used?"},{"a":"Redis performance monitoring uses INFO command to check memory usage, connected clients, and command statistics. Watch for OOM (Out of Memory) errors by tracking used_memory against maxmemory. Use MONITOR to see real-time commands, or enable slow log with slowlog-log-slower-than. Troubleshoot OOM by reducing maxmemory, adjusting eviction policies (allkeys-lru evicts least-recently-used keys), or scaling to cluster mode. Docker environments require explicit memory limits in compose files. Regular monitoring prevents crashes and identifies bottlenecks.","q":"How can I monitor Redis performance and troubleshoot OOM errors?"},{"a":"Redis pub/sub enables real-time message broadcasting: PUBLISH sends messages to channels, SUBSCRIBE listens for them. However, pub/sub doesn't persist messages\u2014subscribers must be connected. For durable queues, use lists with LPUSH/RPOP or BLPOP (blocking pop). Redis queues handle job processing, task distribution, and rate limiting. Combine queues with distributed locking for exactly-once processing. Pub/sub suits live notifications; queues suit reliable job execution. Both patterns integrate seamlessly into Redis applications.","q":"Can Redis implement pub/sub messaging and queue patterns?"}],"shadow_tags":["in-memory-database","distributed-caching","high-availability","data-persistence","message-queue","session-management","failover-automation","performance-optimization","cluster-sharding","real-time-storage"],"summary_rewrite":"This skill walks you through deploying and operating Redis across single-instance, Sentinel, and cluster modes. Learn core commands for strings, hashes, lists, and sorted sets; configure persistence with RDB snapshots and AOF; implement caching, rate limiting, pub/sub, and distributed locking patterns; and run Redis in Docker with monitoring."},"files":[{"bytes":9745,"path":"infrastructure/databases/redis/SKILL.md","sha256":"eca508ac6a39cc6011921aab0c9c92ea18c804750cfac2474a35e6b537b9b800","url":"https://skillfed.io/files/BagelHole/DevOps-Security-Agent-Skills/redis/a94da760/SKILL.md"}],"id":"BagelHole/DevOps-Security-Agent-Skills/redis","links":{"html":"https://skillfed.io/BagelHole/DevOps-Security-Agent-Skills/redis","md":"https://skillfed.io/BagelHole/DevOps-Security-Agent-Skills/redis.md","repo":"https://github.com/BagelHole/DevOps-Security-Agent-Skills"},"meta":{"agents_supported":[],"first_seen":"2026-07-28","forks":4,"language":"Shell","last_updated":"2026-05-22","license":"MIT","name":"redis","publisher":"BagelHole","stars":44},"relations":{"similar":[{"id":"chaterm/terminal-skills/redis"},{"id":"personamanagmentlayer/pcl/redis-expert"},{"id":"affaan-m/ECC/redis-patterns"},{"id":"Mindrally/skills/redis-best-practices"},{"id":"chaterm/terminal-skills/configuration"},{"id":"yaklang/hack-skills/unauthorized-access-common-services"},{"id":"Aradotso/hermes-skills/hermes-agentmesh-async-bus"},{"id":"redis/agent-skills/redis-security"},{"id":"oakoss/agent-skills/valkey"},{"id":"manutej/luxor-claude-marketplace/redis-state-management"}]},"slug":{"owner":"BagelHole","repo":"DevOps-Security-Agent-Skills","skill":"redis"},"version":"a94da760"}
