LP1912834 OpenSRF JS Max Parallel Requests user/berick/lp1912834-max-parallel-net
authorBill Erickson <berickxx@gmail.com>
Fri, 22 Jan 2021 20:53:40 +0000 (15:53 -0500)
committerBill Erickson <berickxx@gmail.com>
Fri, 22 Jan 2021 22:01:14 +0000 (17:01 -0500)
commit780ed668406b1f4fc181100e47374b46238fe3f7
treee6e2a0a66826e2e4a23575060abefa3be6b16322
parentb459fffcfc5c15835c6565f926bcecbdf54d8fa7
LP1912834 OpenSRF JS Max Parallel Requests

Limit the number of active network requests coming from OpenSRF
(WebSocket, XHR) to avoid flooding servers with excessive numbers of
active requests.

The value is currently hardcoded to 5 in opensrf.js.

When the max number of requests limit is reached and new requests
continue to arrive, a warning message is logged to notify the developer
to consider refactoring the client code to use batched calls / API's.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
src/javascript/opensrf.js