Graham Laidler - 12 - Feb 3, 2015

Hi, I have been using a combination of Redis MQ and within the handler SSE to notify clients of progress updates.  This has been working fine until I scaled an Azure website out - obviously the HTTP connection that SSE relies on is only to a single instance, and the workload is shared across multiple servers - each client would only get notifications for tasks that their instance performed.

Is a potential way round this to use Redis PubSub as a “backplane” for the progress updates - the servers subscribe to a channel, and any progress from any server Publishes a message.  The appropriate OnMessage delegate then and broadcasts SSEs to all that instance’s clients.  Would this work?  If so, where would the RedisClient.CreateSubscription() code and delegates live - tried this in global.asax, but caused my IIS to hang, so clearly getting something wrong.  Any pointers greatly appreciated.


Hi Graham, have you seen docs on the RedisServerEvents  provider?

It enables using Redis to be used a back-end for Server Events which works transparently so all you’ll need to do is register a RedisServerEvents provider and all the API’s remain the same, e.g:

    container.Register<IServerEvents>(c => 
        new RedisServerEvents(c.Resolve<IRedisClientsManager>()));

Graham Laidler:

Hi - many thanks - how did I miss this? - I am already using this, so there must be another reason why these are failing when I scale out.  I will continue to dig.