I need advice about performance using web-sockets together with redis pub/sub channels. I use tornado as web-server.
I have about 100 clients which listen status of some event. Each client have separate event and need to listen only own event. Socket connection is short-live, something about 1-20 seconds. I see two options:
Create separate pub/sub channel in redis for each socket-event pair. In this case I will have many channels.
Create one pub/sub channel, subscribe all clients to it and filter messages in controller to forward them to appropriate client. In this case I have many clients which listen one channel.
Which of these options is better for performance?