Production high-performance networking with Snabb and LuaJIT

Presented by Andy Wingo
Friday 10:40 a.m.–11:25 a.m.
Target audience: Developer

Abstract

It used to be that to set up a serious network, you needed to stock racks and racks with specialized proprietary single-purpose boxes. This was because only specialized hardware could handle the hundreds of gigabits per second that might flow through any given box.

Things have changed. With the rise of cheap commodity Xeon-based servers and widespread availability of 10 gigabit network cards, an off-the-shelf server with a few NICs can now handle the workload. The age of open source software-driven routers is fully here -- but it doesn't look like what we thought it would, 10 years ago.

We thought it would be Linux everywhere, but it turns out that Linux's networking stack is just too slow. To get around this problem, modern high-speed software switches bypass the kernel entirely, instead booting network cards and handling traffic entirely from user-space. The up-side of this is that now we have the possibility of using pleasant, hackable, open source, standalone software stacks to deliver network applications that are tailored to specific needs.

This talk presents Snabb, a toolkit for building user-space network functions. Snabb is entirely written in the expressive Lua language, minimizing the amount of code that you have to write to get stuff done. Snabb specifically uses the LuaJIT implementation of Lua, giving us excellent code generation as well as efficient access to low-level binary data and AVX2 assembly generation.

Snabb's goal is to be "rewritable software": software that's so simple that you could explain it to someone and they could write their own. By the end of the presentation, you too should have this feeling.

We will also describe how Snabb is used in practice in major telecoms and ISPs to provide IPv6 transition technologies to entire countries. Using Snabb allowed a small team of open-source hackers to ship a product that competed favorably against offerings from traditional network vendors.

Presented by

Andy Wingo

Andy loves compilers. He has co-maintained the Guile implementation of Scheme since 2009, where he was able to iteratively transform Guile Scheme from a simple interpreter to a system with a state-of-the-art compiler. The compiler knowledge that he learned there made it possible to get started with JavaScript virtual machines, where he implemented and shipped a number of features upstream to the V8 and SpiderMonkey JavaScript engines.

More recently Andy has been applying his experience gained on dynamic language virtual machines to the domain of high-performance networking, building fast virtual switches on top of the the LuaJIT-based Snabb networking toolkit.

Andy just passed his five-year anniversary at Igalia, a consultancy out of Spain that is organized as a worker-owned cooperative. After all these years, Andy's favorite compilers paper is still "Lambda, the ultimate GOTO".

©2016 Linux Australia and linux.conf.au 2017. Linux is a registered trademark of Linus Torvalds. Site design by Takeflight. Image credits can be found on our Colophon.