The BitTorrent Engineering Team: Building Faster Releases

Adam Kelly —  February 19, 2014 — 2 Comments


3.4 is an exciting release for the uTorrent team.

3.4 is the first version to include a major change in the way that uTorrent chooses peers in a swarm. Designed by our own Arvid Norberg, Canonical Peer Priority is a way to help peers connect to the swarm faster, as well as reduce the average hop length from you to any other peer in the swarm.

When a bittorrent client joins a swarm, it needs a way to select which peers it connects to. If it chooses poorly, or if there are malicious actors in the swarm, the connections between clients are not well distributed through the swarm, leading to a large number of hops from node to node. That slows down the ability to each client to pass data on to the next.

You can read a more detailed technical discussion of the issues here, along with graphs and figures that drive home how bad the worst case can be. You can read more about graph connectivity here.

Perhaps one of the biggest changes, though, is one you cannot see. Our engineering team has been growing rapidly, and we have been busy changing our development and release processes. uTorrent 3.4 will mark the first release using improved processes that should allow us to release much more often, while keeping stability at the levels you have come to expect from the world’s fastest and lightest torrent client.

Our previous release cycle was slow. We followed the traditional alpha -> beta -> stable model that a lot of software development follows, for example large video games or operating systems. One of the problems with this style of development is as stabilization work continues on the features you just developed, new features are requested, or requirements change, and now you have to balance two lines of development in the same tree.

Also, with more developers, more changes can be made simultaneously … in theory. In reality, changes in unrelated modules (e.g. the installer) would impact when we could ship new code in other areas (e.g. the disk code), and of course, vice versa. This creates a vicious cycle, where each small problem creates a knock-on effect that impacts other features.

In a situation like this, instead of asking the business to “pick one thing and stick with it” the correct response is for the engineering team to change how they operate.

* On a small scale, picking one thing and sticking with it.
* On a larger scale Multiplexing the work into separate branches.

We needed a way to release changes fast and reliably. This implied quite a few things:
* Don’t mix changes
* Release fast, review results fast

This required us to build a few systems. Some of the larger ones:
* Our release system (code-named “Cherry”)
* Or automatic update system (code-named “The automatic update system”)

It also required programming policies into the smaller parts of the system that already existed
* The build server
* The version control system
* New test servers

These systems, working together, can now answer the question: Is this feature ready for release?
Will deploying this feature likely increase or decrease the crash rate?

We now build individual features in separate branches, which are automatically tested for stability before being integrated into the mainline. That gives us confidence that we won’t slow other engineers down, and that we won’t release a low-quality build to customers.

This effort would not have been possible without the support of the excellent engineering team at Bittorrent.

I look forward to covering these in detail in later posts.

From the uTorrent engineering team, and the rest of Bittorrent as a whole, Happy torrenting!

Adam Kelly


Adam is the lead software engineer on the µTorrent Windows client team. He also has the most experience battling sharks of any engineer in the office.
  • The_Mad_Prophet

    Why are you continuing to maintain two different (but eerily similar) clients? uTorrent is great, but I switched to the ‘official’ BT client awhile back, assuming it would be the priority when it comes to getting updates. But now it sounds like UT is back in the forefront. Surely the engineers would rather focus on one instead of both?

    In other news, I read the technical explanation of the new peer connection scheme and I’m impressed by the engineering aspect of it. Good job tackling, and apparently solving, a problem that has plagued bittorrent all these years. My concern though is that this is going to require major updates for all clients (and trackers) to be fully effective. A lot of developers just aren’t going to do it (or even if they do, many people just aren’t going to update their software).

    • adam_kelly

      Hi There, thank you for writing in! The lion’s share of the work goes into both clients, so we don’t feel bad about having two of them.

      You are exactly right that this feature is only useful once most of the clients have this feature, but I think we will start seeing benefits from it in the next 6-8 weeks.