(cvs.info.gz) Write proxies
Info Catalog
(cvs.info.gz) Connecting via fork
(cvs.info.gz) Remote repositories
2.9.8 Distributing load across several CVS servers
--------------------------------------------------
CVS can be configured to distribute usage across several CVS servers.
This is accomplished by means of one or more "write proxies", or
"secondary servers", for a single "primary server".
When a CVS client accesses a secondary server and only sends read
requests, then the secondary server handles the entire request. If the
client sends any write requests, however, the secondary server asks the
client to redirect its write request to the primary server, if the
client supports redirect requests, and otherwise becomes a transparent
proxy for the primary server, which actually handles the write request.
In this manner, any number of read-only secondary servers may be
configured as write proxies for the primary server, effectively
distributing the load from all read operations between the secondary
servers and restricting the load on the primary server to write
operations and pushing changes to the secondaries.
Primary servers will not automatically push changes to secondaries.
This must be configured via `loginfo', `postadmin', `posttag', &
`postwatch' scripts ( Trigger Scripts) like the following:
ALL rsync -gopr -essh ./ secondary:/cvsroot/%p &
You would probably actually want to lock directories for write on
the secondary and for read on the primary before running the `rsync' in
the above example, but describing such a setup is beyond the scope of
this document.
A secondary advantage of a write proxy setup is that users pointing
at the secondary server can still execute fast read operations while on
a network that connects to the primary over a slow link or even one
where the link to the primary is periodically broken. Only write
operations will require the network link to the primary.
To configure write proxies, the primary must be specified with the
`PrimaryServer' option in `CVSROOT/config' ( config). For the
transparent proxy mode to work, all secondary servers must also be
running the same version of the CVS server, or at least one that
provides the same list of supported requests to the client as the
primary server. This is not necessary for redirection.
Once a primary server is configured, secondary servers may be
configured by:
1. Duplicating the primary repository at the new location.
2. Setting up the `loginfo', `postadmin', `posttag', and `postwatch'
files on the primary to propagate writes to the new secondary.
3. Configure remote access to the secondary(ies) as you would
configure access to any other CVS server ( Remote
repositories).
4. Ensuring that `--allow-root=SECONDARY-CVSROOT' is passed to *all*
incovations of the secondary server if the path to the CVS
repository directory is different on the two servers and you wish
to support clients that do not handle the `Redirect' resopnse (CVS
1.12.9 and earlier clients do not handle the `Redirect' response).
Please note, again, that writethrough proxy suport requires
`--allow-root=SECONDARY-CVSROOT' to be specified for *all*
incovations of the secondary server, not just `pserver'
invocations. This may require a wrapper script for the CVS
executable on your server machine.
Info Catalog
(cvs.info.gz) Connecting via fork
(cvs.info.gz) Remote repositories
automatically generated byinfo2html