Skip to content
redis avatar

Redis Connections

Practical Redis client guidance covering pooling, pipelining, safe scanning, client-side caching, and timeouts.

CCM score
74 of 100
skills.sh installs
3.4K
GitHub stars
176
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers pooling versus multiplexing, pipelining bulk commands, avoiding keyspace-wide commands, client-side caching, and socket timeout tuning
  • Includes a comparison of pool and multiplex styles for redis-py, Jedis, go-redis, Lettuce, and NRedisStack, plus replacements for KEYS, SMEMBERS, and HGETALL
  • Enforces a rule against opening a new connection per request and a requirement that blocking commands like BLPOP pass a timeout
  • Designed for application developers configuring Redis clients for throughput, large keyspace iteration, or read-heavy hot-key workloads

Install

$ npx -y skills add redis/agent-skills --skill redis-connections -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Redis Connections

Client-side guidance for talking to Redis efficiently: how to share connections, how to batch commands, which commands not to call in production, when to turn on client-side caching, and how to set timeouts that fail fast without breaking healthy traffic.

When to apply

  • Creating or reviewing a Redis client setup (redis-py, Jedis, Lettuce, go-redis, NRedisStack).
  • Making many small Redis calls and wondering where the latency is going.
  • Iterating large keyspaces, sets, hashes, or lists.
  • Enabling client-side caching for hot keys.
  • Tuning connect / read / write timeouts.

1. Pool or multiplex — never one connection per request

The single biggest mistake in Redis client code is opening a new TCP connection for every operation. Always either:

  • Pool — keep N persistent connections that the application leases per call (redis-py ConnectionPool, Jedis JedisPooled, go-redis client).
  • Multiplex — share a single connection across all requests (Lettuce, NRedisStack).

Details

Repository
github.com/redis/agent-skills
Categories
Databases, Backend & APIs
First seen
Jul 14, 2026

Questions

What does the redis-connections skill help with?

It gives client and connection guidance for Redis: connection pooling, multiplexing, pipelining, client-side caching with RESP3, avoiding slow commands like KEYS and SMEMBERS, and tuning socket timeouts. It applies when configuring redis-py, Jedis, Lettuce or NRedisStack clients, batching commands, or iterating large keyspaces with SCAN.

How do I install the redis-connections skill?

Run npx -y skills add redis/agent-skills --skill redis-connections -y in your project. After that, the agent can apply the skill's guidance when you work on Redis client setup, batching, caching or timeout settings.

Who is the redis-connections skill for?

It is for developers who write or review Redis client code and want to avoid common mistakes such as opening a new connection per request. It also suits teams tuning throughput, read-heavy caching or fail-fast timeouts on latency-sensitive paths.

Which Redis clients does this skill cover?

The skill names redis-py, Jedis, Lettuce, go-redis and NRedisStack, and gives examples for Python and Java with Lettuce. It notes which clients pool connections and which multiplex them, since multiplexed connections cannot carry blocking commands like BLPOP.

More from redis/agent-skills

All 6

Similar to Redis Connections

More Databases