title: How to Synch two databases in Microservice architecture in CQRS separate ones for read/write
body: <p>I was asked this question in this interview:</p>
  
  <p>How to Synch two database data? There will be time delays etc. How do we handle? </p>
  
  <p>The background: I mentioned about Microservice architecture and also using CQRS for performance (Separate Read/get query database) and separate write command database.</p>
  
  <p>Now, if the customer enters or modifies data, how it will be replicated/synched in to the read database? </p>
  
  <p>I was talking about stuffs like cosmos db options etc which prevents dirty read etc. I also mentioned about cache. But I am not certain what are all variousoptions to do synch. Interviewer specifically asked me in SQL DB level how do I synch between two DBs.</p>