Failover and follow leader implemented.