educative.io

Metadata and data replication - how to ensure they made it together in a replicated region?

In most distributed systems, we are storing metadata in a DB and data in a persistent store. Both get replicated to a different data center for redundancy as well as making the data available in other parts of the world for low latency access by the user in that region. How do you ensure both metadata and data made it to the replicated region and there is no inconsistency?