For a long time a redcurrant issue has been that more often than not the default (first entry) route setup-node on prod cannot be dialed.
A simple optimization might be - when a setup-node cannot be dialed after the default number of dial attempts, move that setup-node key to the last position (len -1) and move all the other keys in that array forward
assuming that the second key was successfully dialed.
Additionally, we need some debug logging that indicates no setup-nodes could be dialed when all the setup-nodes in the list have been exhausted, before (I suppose) trying again to dial all of them in the original order.
I believe this is better than just randomizing the order of the keys as it's responsive to feedback of unsuccessful dial attempts.
For a long time a redcurrant issue has been that more often than not the default (first entry) route setup-node on prod cannot be dialed.
A simple optimization might be - when a setup-node cannot be dialed after the default number of dial attempts, move that setup-node key to the last position (len -1) and move all the other keys in that array forward
thus, the initial config:
would be re-ordered as follows and flushed to the file:
assuming that the second key was successfully dialed.
Additionally, we need some debug logging that indicates no setup-nodes could be dialed when all the setup-nodes in the list have been exhausted, before (I suppose) trying again to dial all of them in the original order.
I believe this is better than just randomizing the order of the keys as it's responsive to feedback of unsuccessful dial attempts.