Hi, i have a couple of questions I would appreciate if someone could answer... 1) Are there any guidelines for estimating server load? I am going to be running a couple of RSync servers and don't even have an order of magnitude guess as to what kind of load they can handle, how many sessions I should allow at once, etc. The data set I'll be serving is about 7000 files, an update to them usually consists of no more than 100 files changing, and no more than about 10 megs 2) I will need to update my RSync server on a regular basis. I have been using rsync to send data to the rsync server (makes sense right?). Now and then a user has been downloading from the rsync server, as I am updating the data set, and they get a mix of the old and new update. This completely breaks my application. How is this handled normally? -- View this message in context: http://www.nabble.com/Two-Qustions%3A-RSync-Server-load---Atomic-Updates--tf4313304.html#a12280382 Sent from the Samba - rsync mailing list archive at Nabble.com.
On 2007-08-22 11:38 -0700, doxburger wrote:> 2) I will need to update my RSync server on a regular basis. I have > been using rsync to send data to the rsync server (makes sense > right?). Now and then a user has been downloading from the rsync > server, as I am updating the data set, and they get a mix of the old > and new update. This completely breaks my application. How is this > handled normally? --If you have the disk space, you could try --delay-updates to shorten the inconsistency window. -- Andr? Majorel <URL:http://www.teaser.fr/~amajorel/> Do not use this account for regular correspondence. See the URL above for contact information.
On 8/22/07, doxburger <doxburger@gmail.com> wrote:> 2) I will need to update my RSync server on a regular basis. I have been > using rsync to send data to the rsync server (makes sense right?). Now and > then a user has been downloading from the rsync server, as I am updating the > data set, and they get a mix of the old and new update. This completely > breaks my application. How is this handled normally?I recommend the following technique: 1. Upload each new revision of the module contents to a new directory. (You can --link-dest from the existing contents.) 2. Make a symlink that always points to the latest revision. Whenever you finish uploading a new revision, atomically overwrite the symlink to point to it. (Note: "ln -fs module.5 module" is not atomic; "ln -s module.5 module.tmp && mv module.tmp module" is.) 3. Specify the symlink as the module path in your rsyncd.conf . Each time the daemon gets a connection from a client, it will fork a server process which will chdir through the symlink into the latest revision of the module. Subsequent changes to the symlink will not affect the data seen by that connection. Once you are pretty sure that no open connections are using an old revision of a module, you can delete the revision. If you like, you can set up a special module on the daemon with pre-xfer and post-xfer commands to carry out this technique and then just upload to that module. Matt