Mirroring vs Replication

前端 未结 3 1138
温柔的废话
温柔的废话 2020-12-29 10:59

How to decide whether to choose a Replication or Mirroring in SQL Server 2005 to provide data availabilty and performance at the same time.


To be more specific

3条回答
  •  渐次进展
    2020-12-29 11:15

    I don't know SQL Server 2005, but for general SQL Usage i would always prefer Replication. You have to separate reads/writes in your application (for MySQL there is MySQL Proxy which can do this in a proxy way for you), but gain a scalable system. (reads to slave(s), writes to master)

    Mirroring means master-master replication which leads to concurrency/transaction issues. Even in master-master scenarios you should NEVER send write queries to different servers. Depending on your project's size, the next steps would be adding more slaves, and then add another master+its slaves for redundancy.

    master --- master
      |          |
    slave       slave
      |          |
    slave       slave
      |          |
    slave       slave
    

    Even then you would only send write queries to one master, but in case of a failing master you could automatically promote the second master to your new write-query-target.

提交回复
热议问题