sql-serversignalrsignalr-backplane

Scaling SignalR with SQL server - how often can we clear data?


I'm looking to write a scaled out SignalR application using SQL Server, using this article as a guidline. After doing some testing, it looks like the table Messages_0 in the SignalR database that I created (per the article) could get pretty big.

What I'm wondering is, how often can this data be cleared out? I see there is an InsertedOn column so I would think after day or two the data wouldn't be relevant anymore. Is there any documentation or guidelines on this?

I'm wondering if I could just set up a job that would clear out anything older than a week just to prevent the table from getting too big over time.


Solution

  • The documentation seems to suggest (albeit briefly), that you should not delete rows yourself.

    SignalR manages the tables. As long as your application is deployed, don't delete rows, modify the table, and so forth.

    Take a look at: Scaleout With SignalR - asp.net