I'm currently using LShift's mercurial-server to host some mercurial repositories. It looks like the number of repositories as well as their size is expected to grow tremendously.

To combat that, I'm planning on hosting the repositories on a cluster of file servers separate from the machine hosting the mercurial-server app.


My big concern is how does the mercurial-server app handle requests from clients? Take a request like "hg clone ssh://hg@server/repo". I know it validates the key and ensure the user is allowed to clone that repo, but does it then handle the tunneling of the request or shunt that off to the file server?

Basically, does the mercurial-server machine need the capacity to transmit the GBs of data or just enough capacity to parse the requests?


Hey Paul, I realize my request wasn't super clear, so I'm taking another shot at it. I really want to know how mercurial-server will work when the repos are physically separate. Will the mercurial-server need to handle the bandwidth of the actual repositories flowing through it?

Initial Request:


Potential Implementation 1

File is passed through mercurial-server:


Potential Implementation 2

File is sent directly to requestor (not using mercurial-server bandwidth):


2 Answers 2


OK, so the protocol connecting the mercurial-server host to the file server hosts is Mercurial itself. In that case that host will need both lots of bandwidth and lots of storage.

Your question isn't really to do with mercurial-server - exactly the same considerations apply as if you were just using Mercurial over ssh without it. I'm afraid I'm going to stop here - I don't have a lot of time just now - I hope you're able to find a solution to your problem!


How will the mercurial-server host talk to the file servers? Over NFS, or some other remote filesystem protocol?

mercurial-server expects the repositories directory to look like a filesystem and (via Mercurial) uses ordinary filesystem operations to read and write them, but it doesn't care if it's a genuine local disk or for example an NFS mount.

  • Hey Paul, sorry about my confusing question, I just updated it to be a little clearer. If you would be willing to take a look I'd be very grateful. Thanks! Sep 10, 2010 at 22:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .