Can your code survive crappy 2G? This open-source traffic controller will test it

Check to see if your app-server stack copes across poor nets

A two-year project inside Facebook has culminated in the release of software to test how well applications and servers work under degraded network conditions – all the way down to rickety 2G.

The idea behind Augmented Traffic Control, open-sourced on GitHub, is to improve the delivery of material on under-performing networks.

The Social NetworkTM says work began back in 2013, when the biz followed up on a DEFCON project to create a conference-wide mobile phone network using open-source code.

In this blog post, the company's Manu Chantra and John Morrow explain that they wanted to “create networks of varying strength that we could use to optimize our apps for those conditions and allow our software engineers to empathize with people using Facebook in less-than-ideal network environments.”

While the FB engineers started out using secondhand 2G kit for their connections, they found it was easier to work with high-speed Wi-Fi to provide the network, and rate-limit packets to simulate degraded reception and connectivity.

As the demonstration shows (below), the idea is to give engineers an easy interface to create different network profiles, all the way down to dead-slow; test how well their software copes on each profile; and there's also a set of ATC APIs published for the project.

Facebook's Augmented Traffic Control UI

Slow, slower or slowest - Facebook's network simulation tool

The post explains that within Facebook, ATC lets engineers construct simple A/B tests to help them work out how long Messenger should wait for a response before it times out.

“They were able to quickly test the way that code behaved when attempting to download files across different network strengths, and used ATC to quickly re-create the results to ensure it was a consistent behaviour,” the post notes, and additionally, “developers were able to re-create issues that would happen only on extremely slow networks”.

• For software engineers needing low-latency analysis of huge amounts of data, Facebook has also improved the performance of its open-source Presto SQL engine. ®

Similar topics

Other stories you might like

Biting the hand that feeds IT © 1998–2021