Building and scaling a live event platform with django-channels
summary
Built a BSL‑licensed virtual event platform called Venueless that runs entirely on django-channels and serves events up to ~5,000 concurrent attendees. Shares concrete tooling and fixes: load testing with k6, profiling with yappi and py‑spy, Redis channel layer using pub/sub and sharding, HAProxy + Daphne/Uvicorn, and a gunicorn max_requests pitfall that killed long‑running consumers. Describes a Redis setnx dedupe pattern for bursty “applause” events and grouped reconnects to avoid mass reconnect storms.
AI-written summary · about
chapters (20)
- 0:00Introduction
- 0:53What is Django Channels
- 4:01From Views to Consumers
- 5:27Groups and Channel Layers
- 7:12Building Venueless Platform
- 8:36Defining Wire Protocol
- 10:01Code Structure with Modules
- 11:49Planning for Failure
- 13:13Load Testing Approach
- 14:59N Squared Issue in Chat
- 16:22Deduplicating Events
- 18:50ORM and Async Overhead
- 20:17Caching Model Instances
- 20:38Infrastructure Instrumentation
- 22:26Channels Performance
- 23:31Redis Pub Sub vs Sets
- 24:12Redis Sharding Fix
- 25:1650 Minute Timeout Bug
- 26:20Final Infrastructure
- 27:03Q&A
related talks
45mKeynote: Architecting with Channels
22mDjango Channels Teaching a mature framework new tricks
29mBuilding real time applications with Django
38mButter smooth, interactive applications with Django...
12mHacking Django Channels for Fun (and Profit)
21mBuilding maintainable Django projects: the difficult teenage years
31mReinventing Django for the Real-Time Web
26mDjango 5.0: Elevating Experiences with Server-Sent Events – A Journey from Polling to Real-Time Vibe
