How to create a proxy/mirror of a TeamCity server


We are in mid of one our project where we are facing some issue while publishing/downloading the artifacts to and from TC. Our business case is as below –

Current Setup:

We have a TC server with ~70 agents running ~300 builds every 5 hrs. These builds are dependent to each other in a way that they publish and download gigs of artifacts while running. This whole setup is located in same geographic location.

Problem Statement:

Now, we want to extend our infra in a way that we are looking to create more agent for the above said TC server, which is locate to a different location and in different data center. We were able to create agents and agents are working as expected but our builds are taking too much of time while publishing and downloading artifacts from TC. [the key here is that new agents are located to different data center in different location and TC server is located in different DC in other location].


o How can we make this publishing and downloading of artifacts more quick, as this is turning out to be a blocker for us?

o Is there a way by which we can create a proxy/mirror of TC server to our new location i.e. artifacts published in original TC should be synced back to proxy TC on other location, which can be then used by TC jobs running on agents without communicating back to original server?

o Or, there is any other recommended plugin or way to achieve this?

Any help on this is realy appricaited.

Comment actions Permalink

Hi Vishwas,

You can use TeamCity Torrent plugin to speed up downloading of artifacts from the TeamCity server. Please find more details in the related blog post.
Also please review some related notes in the online documentation and the blog post, which could help to improve download speed.

Comment actions Permalink

Thanks Alina,

We have now done a quick POC using the Torent and results seems positive. But we are still struglling with high publishing time of artifacts. Is there anything that we can do to enhance publishing performance too. Our sustem is taking ~10mins to publish artifacts of ~1.5GB.

Comment actions Permalink


What TeamCity version do you use? How often do you seen such behavior? Do you have antivirus software, firewalls and proxies between the server and the agents?

As TeamCity uses HTTP protocol for upload, it may have difficulties with large number of small files. Please try adding all files to zip archive by specifying pattern like this: */target/.jar =>

Could you try to publish files from agent machine to server manually (not using TeamCity) and measure the speed? I'd isolate everyting for publishing: publish a single file, not using archiving functionality. If you get different file publishing speeds between the same machines as TeamCity agent and server, this might be something we can look into. In this case please attach build log where we can see slow artifacts publishing. Also please take several thread dumps from both agent and server while this agent is publishing artifacts. If you do not want to share files publicly you can use our
support site.

Comment actions Permalink

We want to do something similar because our artifacts are even bigger > 12GB.  We have a huge server product with multiple large modules.  So if his 1.5GB artifact is taking 10 minutes.  We are going to have upload speeds of over an hour.  This is unacceptable.

It seems like this would not be that hard of a feature for TeamCity since it's data is in a standard SQL database and I know than MSSQL and Oracle have mirroring capabilities. 

Comment actions Permalink


Artifacts are stored in the data directory, not in database. It is likely to require non-TeamCity configuration to create an effective filesystem shared between agent and the server. You can specify Artifact directory path(s) on Administration > Global Settings page.

We have the related feature request

Comment actions Permalink

I'll have to wait for the new feature since setting the artifact directory path will not work for us.  It is a global setting so it would affect other remote data centers - if I set it one place then ALL the artifacts are local to it and other remote data centers have to access this remotely.  It's the same problem.


Please sign in to leave a comment.