Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Database mirroring: "witness" server what is it for?

What is a witness server used for? Why use it?

like image 399
001 Avatar asked May 06 '10 20:05

001


2 Answers

The witness is the one that brings the third vote into the mix in order to create a quorum. Principal and mirror each has one vote, so they can tie 1:1 and no decision can be made. With a witness there can be a quorum established 2:1 or 1:2 (or o:2 if the principal is unreachable) and therefore a decision can reached who should be the new principal. The net effect is that witnesses make automatic failover possible, because the mirror together with the witness can form a majority and decide to fail over if contact with the principal is lost.

like image 66
Remus Rusanu Avatar answered Oct 17 '22 00:10

Remus Rusanu


The witness is a third instance of a server that acts as an intermediary between the principal and the mirror to determine when to failover.

See http://technet.microsoft.com/en-us/library/ms175191.aspx

like image 40
Peter Mourfield Avatar answered Oct 17 '22 02:10

Peter Mourfield