Mirroring is designed to provide fault tolerance, or a means of redundancy in case something goes wrong with the primary or "principal" server. If principal server unexpectedly goes offline, for example, the mirror server can take over. This process may be performed automatically, but it requires a third system, called a "witness" server. This machine monitors both servers and transfers all traffic to the mirror if an outage is detected with the principal server.
Server mirroring can also be used for planned maintenance, such as upgrading a server or running software updates that require services to be stopped or restarted. In these instances, a server admin can manually set the mirror as the principal server to avoid downtime. Some mirroring setups allow "role switching," in which the principal and mirror servers can be swapped at any time.
Another type of mirroring – FTP mirroring – simply provides one or more files from multiple servers. For example, a download page may list several "mirror" URLs, which all offer the same file. The mirrors are typically listed by geographical location, so you can select the one closest to you. While FTP mirrors still exist, they have faded in popularity as automatic location detection and content delivery networks have automated this process.