SignalR data source throttling?

1 Answer 154 Views
Data Source ListView
iCognition
Top achievements
Rank 1
Iron
iCognition asked on 28 Sep 2021, 11:16 PM

Does Kendo support any sort of per-client throttling when it comes to SignalR?

We have a situation where there are 100s of data sources on a page attached to list views. Because these all attempt to read at once we get 414 errors and others and I suspect the easiest fix will be to prevent too many requests from happening at once.

Any ideas? I haven't been able to find a solution at the SignalR layer.

1 Answer, 1 is accepted

Sort by
0
Georgi Denchev
Telerik team
answered on 01 Oct 2021, 12:07 PM

Hello,

You could set the autoBind property of the ListView widgets to false, this way you can prevent them from making a Read request, until you manually call the dataSource.read() method.

Alternatively, you could attach a handler to the dataSource's requestStart event and prevent it based on a condition. This will also stop read requests from being made.

var stopReadRequest = true;                  

requestStart: function(e) {
    if(e.type=="read" && stopReadRequest) {
        e.preventDefault();
    }
}

There aren't any SignalR specific methods that can throttle the client, using the Widget's autoBind or dataSource functionalities is the only way to prevent certain actions/requests.

Let me know if you have any questions.

Best Regards,
Georgi Denchev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Data Source ListView
Asked by
iCognition
Top achievements
Rank 1
Iron
Answers by
Georgi Denchev
Telerik team
Share this question
or