The diagram below outlines the SVN MultiSite Plus architecture, in term of how the application is split up and how those component parts communicate with each other and the outside world.
SVN MultiSite Plus is installed to the following path by default:
/opt/wandisco/svn-multisite-plus/It's possible to install the files somewhere else on your server, although this guide will assume the above location when discussing the installation.
Inside the installation directory you'll find the following files and directories:
[DIRECTORY] drwxr-xr-x 2 wandisco wandisco 4096 Dec 5 01:16 bin-r-xr-xr-x 1 root root 9130 Feb 17 17:35 backup -r-xr-xr-x 1 root root 1630 Feb 17 17:35 rollback -r-xr-xr-x 1 root root 1569 Feb 17 17:35 svn-multisite-plus -r-xr-xr-x 1 root root 12571 Feb 17 17:35 talkback -rwxr-xr-x 1 root root 3764 Feb 17 17:35 watchdog[DIRECTORY]drwxrwxr-x 2 wandisco wandisco 4096 Dec 5 13:21 config-rw-r--r-- 1 wandisco wandisco 240 Feb 18 17:33 main.conf[DIRECTORY] -rw-rw-r-- 1 wandisco wandisco 256 Dec 5 13:56 lib-rw-r--r-- 1 root root 7142 Feb 17 17:35 init-functions.sh[DIRECTORY] -rw-rw-r-- 1 wandisco wandisco 256 Dec 5 13:56 local-ui-rw-r--r-- 1 wandisco wandisco 1049 Feb 18 17:36 ui.properties[DIRECTORY] drwxrwxr-x 2 wandisco wandisco 4096 Dec 5 14:20 logs-rw-r--r-- 1 wandisco wandisco 88 Feb 18 17:35 multisite.log -rw-r--r-- 1 wandisco wandisco 220 Feb 18 17:35 replicator.20140218-173532.log -rw-r--r-- 1 wandisco wandisco 15822 Feb 18 17:35 ui.20140218-173305.log -rw-r--r-- 1 wandisco wandisco 1902 Feb 18 17:35 watchdog.log[DIRECTORY] drwxr-xr-x 8 wandisco wandisco 4096 Dec 5 14:20 replicator[DIRECTORY]drwxr-xr-x 2 wandisco wandisco 4096 Feb 18 17:33 content [DIRECTORY]drwxr-xr-x 5 wandisco wandisco 4096 Feb 18 17:35 database [DIRECTORY]drwxr-xr-x 4 root root 4096 Feb 18 17:33 docs [DIRECTORY]drwxr-xr-x 2 wandisco wandisco 4096 Feb 18 17:33 export [DIRECTORY]drwxr-xr-x 6 root root 4096 Feb 18 17:33 gfr [DIRECTORY]drwxr-xr-x 2 root root 4096 Feb 18 17:33 lib [DIRECTORY]drwxr-xr-x 5 wandisco wandisco 4096 Feb 21 10:12 logs [DIRECTORY]drwxr-xr-x 2 wandisco wandisco 4096 Feb 18 17:35 properties [DIRECTORY]drwxr-xr-x 2 root root 4096 Feb 18 17:33 properties.dist -rwxr-xr-x 1 root root 7679 Feb 17 17:35 resetSecurity.jar -rw-r--r-- 1 root root 315294 Feb 17 15:49 svn-ms-replicator-fsfsrestore.jar -rw-r--r-- 1 root root 315280 Feb 17 15:49 svn-ms-replicator.jar -rw-r--r-- 1 root root 315292 Feb 17 15:49 svn-ms-replicator-updateinetaddress.jar -rwxr-xr-x 1 root root 23731 Feb 17 17:35 transformer-tool.jar -rw-r--r-- 1 root root 605 Feb 17 15:49 VERSION-TREE[DIRECTORY] drwxr-xr-x 3 root root 4096 Oct 17 15:29 resources[DIRECTORY]drwxr-xr-x 2 root root 4096 Oct 17 15:28 svn
The following files store application settings and constants that may need to be referenced during troubleshooting. However, you shouldn't make any changes to these files without consulting WANdisco's support team.
Temporary requirement:
If you (probably under instruction from WANdisco's support team) manually add either connectivity.check.interval or sideline.wait to the applications property file then you must add an "L" (Long value) to the end of their values so they are converted correctly. View our sample application.properties file to view all the properties that are suffixed as "Long".
SVN MultiSite provides a toolset for replicating SVN repository data in a manner that can maximise performance and efficiency whilst minimising network and hardware resources requirements. The following examples provide you with a starting point for deciding on the best means to enable replication across your development sites.
In contrast with earlier replication products, SVN MultiSite Plus is no longer based upon a network proxy that handles file replication between replica. Now, replication is handled at the filesystem level, via FSFS.
SVN MultiSite Plus differs from earlier WANdisco replication products on a number of levels.
SVN MultiSite Plus differs from earlier versions in that it replicates at the file system level.
SVN MultiSite is able to replicate on a per-repository basis. This way each site can host different sets of repositories and replicate repositories this means that you can have different repositories replicate as part of different replication groups.
No need for a synchronized stop - SVN MultiSite Plus allows replication groups to change their membership on-the-fly.
A repository can only replicate to a single replication group at any one time, although it is possible to move between replication groups as required - this can now be done on-the-fly, nodes can be added or deleted without the need to pause all replication (with a synchronized stop)
SVN MultiSite Plus offers a great deal of flexibility in how repository data is replicated. Before you get started it's a good idea to map out which repositories at which locations you want to replicate.
SVN MultiSite Plus is able to maintain SVN repository replication (and availability) even after the loss of nodes from a replication group. However, there are some configuration rules that are worth considering:
The unique Active-Active replication technology used by SVN MultiSite Plus is an evolution of the Paxos algorithm, as such we use some Paxos concepts which are useful to understand:
Learners:
Learners are the nodes that are involved in the actual replication of SVN repository data. When changes are made on the local repository copy these nodes raise a proposal for the changes to be made on all the other copies.
Learner Nodes are required for the actual storage and replication of repository data. You need a learner node at any location where SVN users are working or where you wish to store hot-backups of repositories
Types of Nodes that are learners: Active, Passive
Acceptors:
All changes being made on each repository in exactly the same order is a crucial requirement for maintaining synchronization. Acceptors are nodes that take part in the vote for the order in which proposals are played out.
Acceptor Nodes are required for keeping replication going. You need enough Acceptors to ensure that agreement over proposal ordering can always be met, even accounting for possible node loss. For configurations where there are a an even number of Acceptors it is possible that voting could become tied. For this reason it is possible to make a voter node into a tie-breaker which has slightly more voting power so that it can outvote another single voter node.
Types of nodes that are Acceptors: Voter Only
Nodes that are both an Acceptor and Learner: Active Voter, Passive Voter
Two-node replication groups are not fault tolerant, you should strive to replicate according to the following guideline:
The number of learner nodes required to survive population loss of N nodes = 2N+1
where N is your number of nodes.
So in order to survive the loss of a single node you need to have a minimum of 2x1+1= 3 nodes
In order to keep on replicating after losing a second node you need 5 nodes.
During the installation of each of your nodes you are asked to provide a Content Node Count number, this is the number of other learner nodes in the replication group that need to receive the content for a proposal before the proposal can be submitted for agreement.
Setting this number to 1 ensures that replication won't halt if some nodes are behind and have not received replicated content yet. This strategy reduces the chance that a temporary outage or heavily loaded node will stop replication, however, it also increases the risk that repositories will go out of sync (requiring admin-intervention) in the event of an outage.
Running with two nodes per site provides two important advantages.
WANdisco's replication protocol separates replication traffic into two streams, the coordination stream which handles agreement between voter nodes and the content distribution stream through which SVN repository changes are passed to all other nodes (that is "learner" nodes that store repository replicas).
SVN MultiSite Plus provides a number of tunable settings that let you apply different policies to content distribution. By default, content distribution is set up to prioritize reliability. You can, instead, set it to prioritize speed of replication. Alternatively you can apply a policy that prioritizes delivery of content to voter nodes. These policies can be applied on a per-site, per-repository and replication group basis providing a fine level of control providing that you take care to set things up properly.
In order to set the policy, you need to make a manual edit to SVN MultiSite Plus's Application properties file:
/opt/wandisco/svn-multisite-plus/replicator/properties/application.properties
Changes require a restart:
Changing the current strategy requires the modification of properties files that the replicator only reads at start-up. As a result any changes to strategy require that the replicator be restarted before the change will be applied.
content.push.policy=faster content.min.learners.required=true content.learners.count=1
Above is an example Content Distribution Policy. We'll breakdown what each of the settings does:
This property sets the priority for Content Distribution. It can have one of three options which set the following behavior. Each option tells MultiSite to use a different calculation for relating replication agreement to the actual delivery of replicated data.
For "reliable" policy that offers the upmost reliability, set this to "true".
true enforces the requirement
When content.min.learners.required is set to "true" SVN MultiSite Plus will not lower the content.learner.count in light of insufficient learner nodes being available.
Example:
content.learner.count=5, content.min.learners.required=true
After an outage there are now only 4 learner nodes in the replication group - replication will be halted because there aren't enough available learners to validate a content distribution check.
content.learner.count=5, content.min.learners.required=false
After an outage there are now only 4 learner nodes in the replication group - replication will not be halted because SVN MultiSite Plus will automatically drop the count to ensure that it doesn't exceed the total number of learners in the group.
Setting the corresponding "content.learner.count" value
For "Acceptors" policy this is ignored.
Setting the corresponding "content.min.learners.required" valueFor "Acceptors" policy this is ignored - learners do not factor into the policy, only voters (acceptors).
For Faster, set this to "false".
All the acceptors (voters) must also be learners (carry replica data that can be changed). If all the acceptors are not learners, we switch to 'reliable' policy with a log message. A node always includes itself in the count - in contrast with the "reliable" policy where a node never includes itself in the count.
Use this procedure to change between the above Content Distribution policies.
/opt/wandisco/svn-multisite-plus/replicator/properties/application.properties
file (Read more about the properties files).content.min.learners.required
, make it "true" for reliability, "false" for speed (default is true).When editing the property, add the state machine identity followed by '.content.push.policy'. e.g.
<machine_identity_name>.content.push.policy=faster
The system assigns policy by looking up the state machine policy followed by 'content.push.policy'. If none are available, 'reliable' is chosen. Conditional switch between 'faster' and 'reliable' remains in effect regardless of the policy.
Two-node Replication Group, NodeA (Active Voter) and NodeB (Active).
content.push.policy=faster content.min.learners.required=true content.learners.count=1
Four nodes split between two sites. On Site 1 we have NodeA and NodeB, both are Active Voters. On site 2 we have NodeC (AV) and NodeD (A).
content.push.policy=acceptors content.min.learners.required=true content.learners.count=1
Each replication group consists of a number of nodes and a selection of repositories that will be replicated.
There are now some different types of site:
Acceptors, Proposers and Learners?
The table below shows which node roles are acceptors, proposers or learners.
Node Type | Acceptor | Proposer | Learner |
---|---|---|---|
Active (A) | N | Y | Y |
Active Voter (AV) | Y | Y | Y |
Passive (P) | N | N | Y |
Passive Voter (PV) | Y | N | Y |
Voter Only (V) | Y | N | N |
Key
Learners are either Active or Passive nodes:
Learns proposals from other nodes and takes action accordingly. Updates repositories based on proposal (replication).
Proposers are Active nodes:
To be able to commit to the node the node must be able to make proposals.
Acceptors are Voters:
Accepts proposals from other nodes and whether or not to process or not (ordering/achieve quorum).
Copyright © 2010-2013 WANdisco plc.
All Rights Reserved
This product is protected by copyright and distributed under
licenses restricting copying, distribution and decompilation.
SVN MultiSite Plus
Last doc build: 17:55 - Wednesday 5th January 2014