talira

channels_redis

Redis channel layer backend for Django Channels

open sourceBSD-3-Clausefree

channels_redis provides channel layers for Django Channels that use Redis as their backing store, so Channels consumers in different processes and servers can send messages to each other and to groups. It ships two layers: RedisChannelLayer, the original, which handles channels and groups itself, and RedisPubSubChannelLayer, which uses Redis Pub/Sub. Both work with a single Redis server or a sharded set of servers, over plain or TLS connections, and through Redis Sentinel.

Problems it solves

  • send messages between Django Channels consumers running on different servers
  • broadcast WebSocket messages to a group of users across Django worker processes
  • a production channel layer for Django Channels instead of the in-memory one

Features

  • RedisChannelLayer: channel and group messaging over Redis
  • RedisPubSubChannelLayer using Redis Pub/Sub
  • single-server or sharded Redis hosts
  • TLS connections and Redis Sentinel support

Limitations

  • RedisPubSubChannelLayer is in beta and may get breaking changes1

Alternatives

The same job

These do what channels_redis does.

  1. Django Channels Add WebSockets, long-poll HTTP and other async protocols to a Django project

Compare channels_redis with the top 3