Redis
Last updated
Last updated
is an open-source in memory data source used by Harmony for scaling Harmony.SignalR application. Clients served by the Harmony.Api app, connect to an instance of Harmony.SignalR application to receive instance updates via WebSocket. is used to support the scenario where you may have multiple instances of Harmony.SignalR app and different clients have been connected to different instances. Applications send messages to Harmony.SignalR via RabbitMQ messages.
Follow the official installation for installing Redis on your environment. The easiest way to run a Redis instance locally is by using a docker container. Expose a port outside the container so that other apps can connect to it.
Next configure the RedisConnectionString connection string in the appsettings.json for Harmony.SignalR project. The following configuration connects to a local Redis instance listening to the default 6379 port.
Important! After configuring Harmony.SignalR, set the signalrHostUrl property inside the appsettings.json file existing in the Harmony.Client project in the www folder. This is Harmony.SignalR project's host URL and clients will try to connect to it in order to receive instant updates via WebSockets. By default when running through Visual Studio, Harmony.SignalR will listen on port 7262.
Read next - Configure RabbitMQ