Multisite Repository Replication feature is based on VisualSVN Distributed File System (VDFS) technology and enables geographically distributed teams to work with Subversion repositories at LAN speeds. The VDFS technology is native on Windows and works out of the box!
Key advantages of VisualSVN Distributed File System technology are:
How replication works
The VisualSVN Distributed File System follows the classic master/slave replication architecture which is perfect for replication of Subversion repositories. Each VDFS repository can be created as either a master or a slave, not both. Commits performed to the master repository are automatically replicated to all the slave repositories.
Slave repositories are writable. When a commit is performed to the slave repository, the corresponding transaction is simultaneously committed both to the master and to the involved slave repository. Then the data becomes replicated to the other slave repositories.
Fully functional and writable distributed Subversion repositories
Distributed VDFS repositories are writable and functionally equivalent to regular Subversion FSFS repositories. End-users can perform all possible Subversion operations with both master and slave VDFS repositories:
- Checking out and updating working copies. These and all the other read operations, such as merge, log and blame, are always performed at LAN speeds.
- Сommitting changes. Commits and other write operations such as branch creation are available for both master and slave repositories. New transactions are transparently replicated to the corresponding master repository and other slaves in a consistent and high performance manner.
- Modifying revision properties. No matter where there was a modification of the unversioned revision property (such as the svn:log or svn:author), the appropriate changes will be automatically replicated to all the replication partners.
- Locking and unlocking files. Subversion’s locking feature is fully supported; locking and unlocking can be done through both master and slave repositories. These operations are guaranteed to be consistent and the locks themselves are replicated between the repositories in a very efficient way.
High-performance replication optimized for WAN connections
The performance characteristics of distributed VDFS repositories are the following:
- Read operations are always performed at LAN speeds. No over-the-WAN communication happens when the end-user performs a read operation for a master or slave repository.
- Data replication is optimized for WAN links. VisualSVN Distributed File System is able to fully utilize 100 Mbps WAN links when data is replicated between master and slave repositories. Data replication is performed at least 10 times faster, compared with svnsync.
- Excellent performance of commit to slave VDFS repository. Commits to a local slave VDFS repository are completed up to 10x faster than commits to a remote Subversion repository performed over the WAN.
Transparent replication and seamless security
Subversion uses pluggable model for data store backends. Historically there were two backends available:
- BDB (now deprecated) that keeps everything in a Berkeley DB and
- FSFS that stores data in ordinary flat files, using a custom format.
The VisualSVN Distributed File System is just another data store backend that transparently implements bi-directional data replication. Thanks to the Subversion's modular design, a VDFS-based repository looks and acts just like a regular Subversion repository. The replication is performed automatically and transparently. It's worth to notice that there is no data lock-in and you can instantly convert existing FSFS-based repositories into a VDFS repository and vice-versa.
Thanks to the above, VDFS repositories seamlessly integrate with all the security facilities built-in into VisualSVN Server. Your current security settings will be automatically applied for end users who connect to a VDFS repository. For example, end users will access a VDFS repository with their current Windows credentials if you have Integrated Windows Authentication feature enabled in your server. Secure SSL connections, enhanced logging and other features are also available for distributed VDFS repositories.
If you have Windows authentication enabled, access control settings can be automatically replicated from the master repository to all the slave repositories. This allows you to manage the centralized access control list on the master server and have the identical authorization settings for all the slave repositories. For more information read the KB122: Understanding access permissions for distributed VDFS repositories article.
Resilience and disaster recovery
The main failure resilience guarantee of the VDFS technology is that a master repository never depends on any of the slave repositories. Even if all the slave repositories are down or unavailable, the master repository remains readable and writable. It is also guaranteed that in case of network failures, the replication will be automatically recovered after the network is restored.
In case of a disaster that renders master repository permanently inoperable, the replication will halt and slave repositories will become read only. However, in the event of such hardware or software failure, it is possible to recover replication in a short time. VisualSVN Server provides PowerShell cmdlets to promote the most up to date slave repository to act as a temporary master, recover the lost repository and then promote it back to its master role. For more information read the KB93: Performing disaster recovery for distributed VDFS repositories article.
With VDFS you can be sure that the following statements are always true:
- a master repository is always readable and writable — even if some of the corresponding slave repositories become unreachable or fail,
- a slave repository is always writable if there is a connectivity to the corresponding master repository,
- read access to the slave repository does not require connectivity to the corresponding master repository,
- replication is resilient to temporary connectivity issues,
- it is possible to recover if a master repository is lost due to disaster.
All this makes the VDFS technology more competitive when compared with master-master replication solutions for Subversion.
Getting started with Multisite Repository Replication
The VisualSVN Distributed File System is native on Windows and works out of the box. There are only a few steps to get started, and Subversion repositories replication across multiple sites can be configured in minutes. For the more detailed getting started guidance please consider the KB136: Getting started with Multisite Repository Replication article.