Actually I found another solution more appropriate for my use case. I put it here in case other people have the same issue.
So my use case was to stream binary data through websocket (soundfonts for the audio player on Jellynote.com) Instead of having one URL that redirects to the nearest servers according to the user IP, I have a pool of URL (for now 2, one in the US and one in UE). I create a connexion with all the URL un the pool and I keep only the first one to respond (the nearest obviously). Quite simple actually. :)
for host in @hosts
connection = new WebSocket "ws://#{ host }"
connection.onopen = (e) => #close every other connection