Summertime. Kids are off school — 12 weeks they have here 😳. Settling into the routine.
channels_redis v3.3.0 this week. This adds support for Redis Sentinel and a new Redis Pub/Sub based channel layer.
I’m particularly excited about the latter.
We’ve had a long line of difficult to diagnose reports with the original channel layer. It manages channels and groups itself, and (I strongly suspect) doesn’t handle flaky connections/clients perfectly robustly.
Folks run into issues, but rarely do we get someone with both the technical chops and time needed to really dig into it. These issues are hard. Really hard. So, they sit unresolved, and slowly build up.
In contrast, Redis Pub/Sub is well battle-tested, and phenomenal really. We’ve designated the new channel layer beta to give us a little wiggle room but, essentially, for most users, for the basic use-cases, I think it’s the way to go.
Maybe there are cases where you want the extra control (expiry, capacity, …) that the original layer will give you but… — Meh, I don’t really think so.
What are the downsides? I don’t know, Pub/Sub will not make any allowances for you having a connection hiccup — you’ll just lose a message if you’re not connected. But I think you should embrace that: use something else (a Redis stream, say) if you need to be certain you didn’t lose a message. Rather, accept the at-most-once delivery and have a fallback to fill in the gaps if you spot one (or have a connection issue, or just periodically, or…) This is the Channels Way, and offloading the channel and group handling to Redis is a massive win.
Next up will be a Channels point-release.