support automatic failover.