Skip to main content

Redis-backed ASGI channel layer implementation

Project description

An ASGI channel layer that uses Redis as its backing store, and supports both a single-server and sharded configurations, as well as group support.

Usage

You’ll need to instantiate the channel layer with connection details, which include:

  • hosts: The server(s) to connect to, as either URIs or (host, port) tuples. Defaults to ['localhost', 6379]. Pass multiple hosts to enable sharding, but note that changing host list will lose most sharded data.

  • prefix: Prefix to add to all Redis keys. Defaults to asgi:.

  • expiry: Message expiry in seconds. Defaults to 60.

Example:

channel_layer = RedisChannelLayer(
    host="redis",
    db=4,
)

TODO

  • Expire/clean out groups

  • Prune channel lists on write/periodically as well as on read

  • Efficient send_group implementation with Lua

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

asgi_redis-0.8.tar.gz (1.6 kB view details)

Uploaded Source

File details

Details for the file asgi_redis-0.8.tar.gz.

File metadata

  • Download URL: asgi_redis-0.8.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for asgi_redis-0.8.tar.gz
Algorithm Hash digest
SHA256 9f134946434c583f0425bfbb04b4dd884636e2b5ee90c6acf8dd4c357d6a70de
MD5 e4e67e2dc0e4489d01e1ce89b77da2f6
BLAKE2b-256 9c6c3db668835832bc24c7b7da3a7ba01fd79082e34c19fdb8ff866b52c67499

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page