--- id: channels-redis version: "4.3.0" license: BSD license_treatment: permissive maintenance: active --- # channels-redis — Redis-backed ASGI channel layer implementation License: permissive · Maintenance: active · Downloads: 4.9M/mo ## What it is and what it does channels_redis bridges Django Channels (an ASGI framework for async communication) with Redis, providing a persistent, distributed channel layer for real-time applications. It offers two implementations: RedisChannelLayer, which handles channels and groups directly, and RedisPubSubChannelLayer, which uses Redis Pub/Sub for message dispatch (currently in Beta). Both support single-server and sharded configurations, allowing you to scale WebSocket, HTTP streaming, and other real-time features across multiple application servers. The package integrates into Django's CHANNEL_LAYERS setting and handles message routing, group membership, and capacity management. It supports SSL/TLS connections, Redis Sentinel for high availability, UNIX domain sockets, optional symmetric encryption, and configurable message expiry and per-channel capacity limits. The package is tested against Python 3.9 through 3.13 and maintains compatibility with current and legacy redis-py versions. Use it for: - Scale WebSocket connections across multiple Django application servers using a shared Redis channel layer. - Implement real-time group messaging (e.g., chat rooms, notifications) where consumers need to broadcast to many connected clients. - Build high-availability ASGI deployments with Redis Sentinel for automatic failover and connection resilience. - Add optional message encryption for sensitive real-time data transmitted through the channel layer. - Configure per-channel capacity and message expiry to manage backpressure and memory usage in peaky traffic scenarios. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides Redis-backed channel layers for Django Channels, enabling asynchronous message dispatch and group communication in ASGI applications through either traditional channel handling or Redis Pub/Sub. Yes. channels_redis is actively maintained, has no known vulnerabilities, and is the standard Redis integration for Django Channels. Install it if you're building real-time features in Django and need to distribute channels across multiple servers—it's low-friction and well-tested. Use RedisPubSubChannelLayer only if you understand its Beta status and can tolerate potential breaking changes. ## Install pip install channels-redis uv add channels-redis poetry add channels-redis ## Installing channels-redis Before you install: Low friction install with four runtime dependencies (redis, msgpack, asgiref, channels). Package is actively maintained with recent commits and no known vulnerabilities. Requires Python 3.9 or later. License in practice: BSD permissive license allows commercial and private use with minimal restrictions—suitable for most projects. Quickstart: pip install channels-redis # In Django settings.py: CHANNEL_LAYERS = { "default": { "BACKEND": "channels_redis.core.RedisChannelLayer", "CONFIG": { "hosts": [("localhost", 6379)], }, }, } Requires a running Redis server; Django Channels must already be installed and configured in your project. Verify before relying: - Performance characteristics and throughput limits of each implementation (RedisChannelLayer vs. RedisPubSubChannelLayer) under load. - Whether the Beta status of RedisPubSubChannelLayer implies active breaking changes or stable-with-caution maturity. ## Package facts - License: BSD (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 4.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags django channels redis backend, asgi channel layer redis, websocket message queue django, redis pubsub channels, django asgi messaging, distributed channel layer, redis-backed asgi, django-asgi, websocket-messaging, distributed-systems [View on SkillFed](https://skillfed.io/packages/channels-redis) · [View on PyPI](https://pypi.org/project/channels-redis/)