We have a set of backends in an array. Each time using round-robin algorithm it picks one target.
Now the requirement is, if the target throws an error then the request will go to the next backend in the array. The target url is dynamically configured in the javascript.
Any idea how to implement that?