title: Does MYSQL replication work in real time?
body: <p>I'm new to MYSQL replication. I know how to set it up (thanks to many books and other online resources) however, I need to understand how it really works on the low level.</p>
  
  <p>My question is, does it work in real time? Or is there a gap between changes on master and slave.</p>
  
  <p>So the scenario is: a record is inserted into master, does it immediately get inserted into slave and then the insert is completed or, is it inserted into master and the insert is finished and then later the changes are replicated to slave?</p>
  
  <p>The reason I am asking is because I know that there is a difference on the MS Sequel Server.
  On Sequel Server there is a concept called Mirroring where an query is executed first on master then on slave and then it completes. There is also replication where a query executes on master then a message is published to slave (usually extremely fast but not necessarily in real time) and the the slave (which subscribes to those messages) executes the same query.</p>