[JES] Add options for new failover stuff. Add option for user to specify a preferred endpoint See merge request !41