- Home
- Skills
- Manutej
- Luxor Claude Marketplace
- Redis State Management
redis-state-management_skill
- Shell
40
GitHub Stars
4
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill manutej/luxor-claude-marketplace --skill redis-state-management- EXAMPLES.md54.8 KB
- README.md13.5 KB
- SKILL.md70.2 KB
- VALIDATION.md7.6 KB
Overview
This skill is a practical guide to Redis state management for distributed systems, covering caching strategies, session storage, pub/sub, distributed locks, and core data structures. It focuses on production-ready patterns, connection management, persistence trade-offs, and common anti-patterns to help teams build reliable, high-performance services.
How this skill works
It explains how to choose and implement Redis data types (strings, hashes, lists, sets, sorted sets, streams) for specific needs and demonstrates connection pooling, RESP3 client features, and persistence options (RDB/AOF/hybrid). The skill provides concrete patterns—cache-aside, write-through, write-behind—plus cache invalidation, stampede prevention, session managers, and lock-based coordination with code snippets and operational advice.
When to use it
- Implement high-performance caching layers for web APIs
- Manage distributed user sessions with sliding TTLs or hash-backed sessions
- Build real-time messaging, event streams, and consumer groups
- Coordinate distributed processes using Redis-based locks and leader election
- Implement rate limiting, counters, leaderboards, and queues
- Store temporary or frequently accessed structured data with low latency
Best practices
- Use connection pools and configure max_connections, timeouts, and retries
- Pick the right Redis data type for the access pattern to minimize memory and CPU overhead
- Combine RDB and AOF or tune persistence based on durability vs restart time needs
- Prevent cache stampedes with locking, probabilistic early expiration, or background refresh
- Use TTLs and event-based invalidation instead of large pattern deletes in production
- Monitor memory usage, eviction policy, and latency; test failure modes and failover behavior
Example use cases
- Cache-aside for user profiles with JSON stored in strings and TTLs
- Write-through product updates to keep cache consistent after DB writes
- Write-behind bulk-ingestion to handle high write throughput with async sync to DB
- Distributed session store using hash-backed sessions with sliding expiration
- Pub/sub or streams for real-time notifications, activity feeds, and consumer groups
- Distributed locking pattern to serialize critical sections or elect a leader
FAQ
Use Redis for low-latency, high-throughput access, ephemeral or frequently accessed state, queues, and pub/sub. Use an RDBMS for strong relational queries, transactions, and long-term durable storage.
How do I avoid data loss with write-behind caching?
Mitigate risk by persisting important writes to a durable queue, batching and retrying writes, using replication and AOF persistence, and accepting potential trade-offs in SLA for eventual consistency.