Well,

since you would still have to hit the server to verify if you can connect or not, I would suggest to go with the LightstreamerClient connection, then listen for the DISCONNECTED* events and change the server on the connectionDetails element to try the next one ( http://www.lightstreamer.com/distros...tServerAddress )

Since both the events and the API calls are asynchronously executed, a new connection may be created before the server address setting is changed, so I would add an explicit disconnect call before changing the server and a connect call after it.

Note that the connection efforts might fail immediately or might remain pending. In the latter case a timeout is waited before giving up the connection. You could reduce such timeout ( http://www.lightstreamer.com/distros...ConnectTimeout )

Also, when connecting, the client by the default sends an http request and concurrently opens a websocket. You might want to delay the websocket ( http://www.lightstreamer.com/distros...yWSOpenEnabled )

HTH