Refactor replication implementation to improve consistency.
Support replicating multiple entries per request.