whens a pub/sub system the right choice over direct websocket connections for real-time features
Gael Mubara
·8314 views
hey everyone, im working on a new feature that needs real-time updates for lots of users. i've been going back and forth between just using WebSockets straight between clients and a service, or doing a publish/subscribe (pub/sub) thing with something like Redis Streams or Kafka. WebSockets seem pretty straightforward for direct chat, but im worried about scaling and handling tons of individual connections. a pub/sub system feels like it would scale better for broadcasting to a crowd, but its more complicated. what have you guys found? when was pub/sub the obvious choice for real-time stuff?
34 comments