Add support for replica sets.