[OPENDJ-6968] Backport OPENDJ-5439: LeastRequestsStrategy should distribute load randomly when idle Created: 14/Feb/20  Updated: 27/Feb/20  Resolved: 27/Feb/20

Status: Done
Project: OpenDJ
Component/s: core apis
Affects Version/s: 6.5.0, 6.0.0, 5.5.0
Fix Version/s: 6.5.4

Type: Bug Priority: Major
Reporter: Chris Ridd Assignee: Chris Ridd
Resolution: Fixed Votes: 0
Labels: Verified

Issue Links:
is a backport of OPENDJ-5439 LeastRequestsStrategy should distribu... Done
Story Points: 0.5
Dev Assignee: Chris Ridd
QA Assignee: carole forel


LeastRequestsStrategy select the server which has the less number of concurrent requests already assigned to it.
When all the servers have a same load (which is the case when idle) the request is currently sent to the first server of the list.

During startup, AM sends a request to get all blacklisted tokens. When multiple instances of AM are starting-up simultaneously, all these requests are forwarded to the same DJ server: the first one from the list.

A solution could be that when all server are idle, return a random server rather than the first one.

Generated at Thu Aug 13 11:21:30 UTC 2020 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.