At least one replica of a block is in different rack and one datanode has one replica of a block at most and one rack has two replicas at least.Above policy can guarantee reliability and availability and performance of read and write for HDFS.