Balancing the replication factor with consistency