redis-best-practices

Provide Redis configuration and operational best practices for caching and runtime performance.

6|4|Updated Nov 1, 2025
One-click install
npx skills add https://github.com/Montte-erp/montte-nx --skill redis-best-practices-montte-erp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: redis-best-practices
Source: https://github.com/Montte-erp/montte-nx/tree/main/.agents/skills/redis-best-practices
Command: npx skills add https://github.com/Montte-erp/montte-nx --skill redis-best-practices-montte-erp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams avoid common Redis pitfalls by providing clear guidance on caching strategies, data structure selection, key naming, memory management, persistence, and high-availability so applications remain fast and reliable.

Core Features & Use Cases

  • Key Naming & Organization: Recommendations for concise, consistent names and namespace patterns to simplify operations and debugging.
  • Data Structure Guidance: When to use strings, hashes, lists, sets, sorted sets, and streams for common tasks like counters, queues, leaderboards, and event logs.
  • Caching & Expiration Patterns: Cache-aside, write-through, invalidation strategies, TTL best practices, and jitter to avoid thundering herds.
  • Persistence, HA & Security: Options for RDB/AOF, Sentinel and Cluster setups, replication considerations, and security measures such as authentication and TLS.
  • Operational Tips: Memory monitoring, pipelining, Lua scripts for atomic operations, and safe production commands.

Quick Start

Ask the redis-best-practices skill to review my Redis usage patterns and provide prioritized recommendations for key naming, eviction policy, persistence, and security.

Frequently Asked Questions about redis-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What's the best way to configure Redis eviction policies and TTL for caching?

The best way to configure Redis caching is by applying cache-aside and write-through patterns with appropriate TTLs and jitter. This prevents thundering herds and ensures reliable memory management by evicting stale data predictably under memory pressure.

How do I choose the right Redis data structures for counters, queues, and leaderboards?

Choosing the right Redis data structures requires mapping tasks to specific types: use strings for counters, lists for queues, sorted sets for leaderboards, and streams for event logs. Selecting the correct structure ensures optimal runtime performance and memory efficiency.

How does Redis persistence and high-availability configuration work?

Redis persistence and high-availability work by configuring RDB or AOF files for data durability, combined with Sentinel or Cluster setups for replication. This configuration maintains fast, reliable caching while preventing data loss during node failures.

How do I implement atomic operations and security hardening in Redis?

You implement atomic operations in Redis by using Lua scripts for complex transactional logic, while security hardening involves configuring authentication and TLS. Together, these measures ensure safe, concurrent data manipulation and encrypted client-server communication.

What are the key naming conventions for organizing Redis namespaces?

Key naming conventions for Redis namespaces involve using concise, consistent names and structured namespace patterns. Organizing keys this way simplifies operational debugging and management while preventing collisions across different application services.

When should I use Redis streams for event processing instead of lists?

You should use Redis streams for event processing instead of lists when you need persistent, append-only event logs with consumer group support. Streams provide reliable stream-based event processing, whereas lists are better suited for simple, transient message queues.