When Resgate subscribes to a resource (due to client subscribe requests, add events on a collection, change events on a model, etc.), it will recursively follow any resource reference for that resource.
If a lot of resources are referenced, the service(s) may be overwhelmed by requests, failing to respond within Resgate's default timeout period of 3 seconds. This will in turn result in Resgate setting the references to a system.timeout error for any timed out resource.
Solution
It should be possible to throttle the number of concurrent requests being sent when following resource references. This can be done by introducing a single integer configuration value:
referenceThrottle - integer value telling how many concurrent requests to have running at the same time when following resource references for any single resource subscription.
Issue
When Resgate subscribes to a resource (due to client
subscribe
requests,add
events on a collection,change
events on a model, etc.), it will recursively follow any resource reference for that resource.If a lot of resources are referenced, the service(s) may be overwhelmed by requests, failing to respond within Resgate's default timeout period of 3 seconds. This will in turn result in Resgate setting the references to a
system.timeout
error for any timed out resource.Solution
It should be possible to throttle the number of concurrent requests being sent when following resource references. This can be done by introducing a single integer configuration value:
referenceThrottle
- integer value telling how many concurrent requests to have running at the same time when following resource references for any single resource subscription.