Does master-slave replication ensure that writes show up in later reads?
<p>Here's a very basic question about replication.</p>

<p>If you set up your database with master-slave replication where writes go to the master and reads go to the slaves, doesn't that mean that newly-written data won't necessarily show up in a read until some time later?</p>

<p>For example, suppose a user posts a comment on your website (a write: INSERT INTO comment ...) and then refreshes the page (a read: SELECT * FROM comment ...). The read goes to a slave where the INSERT statement hasn't been replicated yet, so the list of comments comes back without the new one in it. That would effectively violate the "Durability" part of ACID, at least temporarily.</p>

<p>Is that how it actually works? Or is there some way to ensure that users will always be able to read what they just wrote?</p>