refactor config module -- save replicaiton state

Signed-off-by: malw2020 <malw2020@163.com>