Overview
The Redis backend stores all IP pool state in Redis, enabling multiple Proxy Hopper instances to share a single pool. Each IP is delivered to exactly one instance at a time usingBLPOP atomicity. Quarantine expiry uses ZRANGEBYSCORE + ZREM to prevent double-release across instances.
Install
The Redis backend is a separate Docker image:Configure
config.yaml:
Characteristics
| Property | Detail |
|---|---|
| Dependencies | Redis 6+ |
| State persistence | Survives restarts |
| Multi-instance | Fully supported — shared pool state |
| Performance | Small added latency per pool operation (~1ms on local Redis) |
How it works
- IP queue — each pool’s available IPs are stored as a Redis list.
BLPOPatomically dequeues one IP per request, guaranteeing exclusive delivery to one instance. - Quarantine — quarantined IPs are stored in a sorted set keyed by expiry timestamp. A background sweep uses
ZRANGEBYSCOREto find expired entries andZREMto atomically return them to the pool. - Cooldown — after each request, an IP is held with a Redis key that expires after
minRequestInterval. Once expired, the IP is returned to the queue.
Deployment
See Docker Compose with Redis and Kubernetes for full deployment examples.Production considerations
- Use a managed Redis service (AWS ElastiCache, GCP Memorystore, Redis Cloud) rather than a self-hosted instance for production workloads
- Enable Redis persistence (
RDBorAOF) if pool state must survive a Redis restart - Set
maxmemoryandmaxmemory-policyto prevent Redis from consuming unbounded memory