LP1912834 OpenSRF JS Max Parallel Requests user/berick/lp1912834-max-parallel-net-v2
authorBill Erickson <berickxx@gmail.com>
Fri, 22 Jan 2021 20:53:40 +0000 (15:53 -0500)
committerBill Erickson <berickxx@gmail.com>
Mon, 25 Jan 2021 21:27:44 +0000 (16:27 -0500)
commit6604bb506bcd3b3ff9d03866bdd10df1fbe3da09
tree140a7af2216d2ad2ab1e67039be0631110ef8a26
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