database-redis

Installation
SKILL.md

Redis Best Practices

Priority: P0 (CRITICAL)

  • Security:
  • Access Control: Use Redis 6.0+ ACLs (ACL SETUSER) to restrict commands by user/role.
  • Encryption: Always enable TLS for data-in-transit (standard in managed Redis like Azure/AWS).
  • Dangerous Commands: Disable or rename FLUSHALL, KEYS, CONFIG, and SHUTDOWN in production.
  • Connection Resilience:
  • Pooling: Use connection pooling with tuned high/low watermarks to avoid connection churn.
  • Timeouts: Set strict read_timeout and connect_retries to handle transient network saturation.

Guidelines

  • Key Design:
  • Namespacing: Use colons to namespace keys (e.g., app:user:123, rate:limit:ip:1.1.1.1).
  • Readability vs Size: Keep keys descriptive but compact; avoid keys > 512 bytes.
  • Commands & Performance:
  • O(N) Avoidance: Use SCAN instead of KEYS. Use UNLINK instead of DEL for background reclamation of large keys.
  • Lua Scripting: Prioritize EVALSHA for atomic logic; ensure scripts pre-loaded to save bandwidth.
Related skills
Installs
1
GitHub Stars
488
First Seen
4 days ago