SlideShare a Scribd company logo
1 of 26
Download to read offline
Snabbflow: a scalable IPFIX exporter
A tour of the IPFIX exporter developed at SWITCH
Who we are
Alexander Gall
Network engineer at SWITCH,
Snabb contributor since 2014
alexander.gall@switch.ch
Max Rottenkolber
Works on Snabb since 2014
maximilian@igalia.com
Snabbflow
at SWITCH
Motivation, function,
deployment
Netflow at SWITCH
The concept of a “flow” is the primary mechanism used to analyze network traffic
● 5-tuple <src address, dst address, IP protocol, src port, dst port>
● Aggregates bytes/packets, additional custom fields (TCP flags, AS
numbers…)
● Evolved from Cisco-proprietary to IETF standard IPFIX
● Unsampled (process every packet) or sampled (process 1 in n packets)
In use at SWITCH since mid 1990s. Until a few years ago
● Provided in Hardware by the routers
● Unsampled
Modern routers moved to sampling to cope with high-volume traffic
Sampled vs Unsampled
Sampling approximates real values well for volume-based metrics. Why use
unsampled Netflow?
● Fine-grained analysis of security incidents
● Debugging of network problems for single flows, e.g.
○ TCP handshake
○ DNS transaction
Requires
● Move from router to external appliance for Netflow generation
● Find a scalable and cost-effective solution: Snabbflow
SWITCH Network
● Peak traffic values (aggregate external traffic, ingress + egress)
○ ~180Gbps
○ ~20Mpps
○ ~350k flows per second (>500kfps with aggressive port-scans)
● Aggregate IPFIX export data rate 200-300Mbps
● Average flow rate 200k/s, 1.5TiB flow data per day (~100 bytes/flow)
● Interface types: optical 10G, 100G soon 400G
● Until 2015 Netflow export on (Cisco) routers
● 2015-2020 commercial Netflow exporter using hardware acceleration
● Since 2020 Snabbflow
Per-PoP Exporter Architecture
● Optical taps on external interfaces to copy packets
● “Packet-Broker” to aggregate traffic to 2x100 Gbps links to Snabbflow
exporter
○ Use VLAN tags to identify original router ports
○ “Whitebox” switch
■ EdgeCore Wedge100BF-32x/AS9516-32D
■ Tofino/Tofino2 ASIC
■ P4-programmable
■ Separate project: https://github.com/alexandergall/packet-broker
● Snabbflow on commodity 1RU server
○ AMD Epyc or Intel Xeon, 12-24 cores, ~128GiB RAM for large flow tables
○ 2x100G Mellanox ConnectX-5 NICs
SWITCH
border router
Foreign BR1
8-port splitter
Packet Broker
Snabbflow
Foreign BR2
Foreign BR3
Foreign BR8
adds vlan for each
“color“ so we know
where packets came
from
Vlan
151
Vlan
152
Vlan
153
Vlan
154
Vlan
155 Foreign BRx
Vlan
156
Vlan
165
Vlan
166
Features of
Snabbflow
snabb ipfix probe
Scaling, configuration, monitoring
and their implementation
Built with
- A toolkit for building fast packet processing applications using a
high-level programming language
- Written in Lua (using the amazing LuaJIT compiler)!
- Packet I/O without going through the kernel (kernel-bypass /
userspace networking)
- Open source and independent (not sponsored by any $vendor)
● Simple > Complex
● Small > Large
● Commodity > Proprietary
Recording packet metadata in a flow table
function FlowSet:record_flows(timestamp)
local entry = self.scratch_entry
for i=1,link.nreadable(self.incoming) do
local pkt = link.receive(self.incoming)
self.template:extract(pkt, timestamp, entry)
local lookup_result = self.table:lookup_ptr(entry.key)
if lookup_result == nil then
self.table:add(entry.key, entry.value)
else
self.template:accumulate(lookup_result, entry, pkt)
end
packet.free(pkt)
end
end
Flushing ipfix records
-- Walk through flow set to see if flow records need to be expired.
-- Collect expired records and export them to the collector.
function FlowSet:expire_records(out, now)
local cursor = self.expiry_cursor
…
for i = 1, self.table_tb:take_burst() do
local entry
cursor, entry = self.table:next_entry(cursor, cursor + 1)
…
if entry then
…
self:add_data_record(entry.key, out)
end
end
if self.flush_timer() then self:flush_data_records(out) end
end
High-level overview
100G NIC
(Driver written in
Lua)
Snabb ipfix
probe
tun/tap
(Linux kernel
network stack)
ipfix
collector
Scaling via hardware RSS
100G NIC
(Driver written in
Lua)
Snabb
ipfix
probe
RSS forwards distinct sets of
flows to distinct Snabbflow
processes
Horizontal scaling!
Circle = CPU core
Scaling via software RSS
Snabb
ipfix
probe
IP
template
DNS/HTTP
template
Software RSS forwards distinct sets of flows
to distinct exporter processes extracting
different sets of metadata.
Isolate workloads! (Complex packet
inspection does not bog down basic
metadata export)
Circle = CPU core
“Apps” and multi-processing
ConnectX
Driver
App
ARP App
input
output
Snabb programs are organized in “apps”
(independent packet processing
components)
Communicate with each other via “links”:
p = link.receive(input)
link.transmit(output, p)
“Apps” and multi-processing (lib.interlink)
cpu core 1 cpu core 1
ConnectX
Driver
App
ARP App
Interlink
Transmitter
App
Interlink
Receiver
App
Interlink
Packets can be shared with low
overhead across CPU core boundaries
using “interlinks”.
Link interface remains orthogonal:
p = link.receive(input)
link.transmit(output, p)
lib.ptree
Control plane (manager)
Data plane (worker)
- Can query and update data-plane configuration
- Knows about data-plane state
- No particular latency requirements
- Manages multiple data-plane workers
(on dedicated CPU cores)
- Soft real-time! No messing around!
- Receives configuration updates from manager
- Writes state counters to shared memory
Data plane (worker)
Data plane (worker)
lib.yang
Application configuration and state are described in a YANG schema.
$ snabb config set my-process / < ipfix.conf
$ snabb config get-state my-process 
/snabbflow-state/exporter[name=ip]
packets-dropped 0;
packets-ignored 129326;
packets-received 499996;
template {
id 1512;
flow-export-packets 115;
flows-exported 1318;
packets-processed 12034;
…
snabb-snabbflow-v1.yang
module snabb-snabbflow-v1 {
…
container snabbflow-config {
description
"Configuration for the Snabbflow IPFIX exporter.";
list interface {
key device;
unique "name vlan-tag";
description
"Interfaces serving as IPFIX Observation Points.";
leaf device {
type pci-address;
description
"PCI address of the network device.";
}
…
- Schema defines both valid configuration
and state trees
- YANG is expressive: control-plane can
effectively reject invalid data-plane
configurations
- Snabb programs translate valid
configurations to app and link networks
running in data-plane
Flight recorder
- Minimal overhead: always on! (if you want it)
- Stores useful data
- JIT trace info
- Trace profiles (sampled)
- High-frequency event log (sampled)
- Can be analyzed while running or post mortem
- tar cf blackbox.tar /var/run/snabb; scp blackbox.tar …
Where does my program spend
its time?
Does the JIT have issues
generating efficient code?
Includes full IR / assembly
dump for each compiled trace!
Latency histograms derived
from event log
Here: ipfix app takes ~35us
to process a batch of
packets.
Useful for debugging tail
latencies.
Can add arbitrary
application-specific,
user-defined events.
If you write a Snabb program today
You can reuse all of these components and more!
Thanks for your
attention!
Questions?
GitHub: snabbco/snabb
Snabbflow:
alexander.gall@switch.ch
Commercial support for Snabb:
maximilian@igalia.com

More Related Content

What's hot

Introduction to OpenCL, 2010
Introduction to OpenCL, 2010Introduction to OpenCL, 2010
Introduction to OpenCL, 2010Tomasz Bednarz
 
Introduction to eBPF and XDP
Introduction to eBPF and XDPIntroduction to eBPF and XDP
Introduction to eBPF and XDPlcplcp1
 
IPv6 - Neighbour Discovery
IPv6 - Neighbour DiscoveryIPv6 - Neighbour Discovery
IPv6 - Neighbour DiscoveryHeba_a
 
Basics of firewall, ebtables, arptables and iptables
Basics of firewall, ebtables, arptables and iptablesBasics of firewall, ebtables, arptables and iptables
Basics of firewall, ebtables, arptables and iptablesPrzemysław Piotrowski
 
SDN Architecture & Ecosystem
SDN Architecture & EcosystemSDN Architecture & Ecosystem
SDN Architecture & EcosystemKingston Smiler
 
181114051_Intern Report (11).pdf
181114051_Intern Report (11).pdf181114051_Intern Report (11).pdf
181114051_Intern Report (11).pdfToshikJoshi
 
Ieee nfv-sdn-2020-srv6-tutorial
Ieee nfv-sdn-2020-srv6-tutorialIeee nfv-sdn-2020-srv6-tutorial
Ieee nfv-sdn-2020-srv6-tutorialStefano Salsano
 
DPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingDPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingMichelle Holley
 
Class notes fhrp,hsrp,vrrp
Class notes fhrp,hsrp,vrrpClass notes fhrp,hsrp,vrrp
Class notes fhrp,hsrp,vrrpSagarR24
 
GLBP (gateway load balancing protocol)
GLBP (gateway load balancing protocol)GLBP (gateway load balancing protocol)
GLBP (gateway load balancing protocol)Netwax Lab
 
The rise of Layer 7, microservices, and the proxy war with Envoy, NGINX, and ...
The rise of Layer 7, microservices, and the proxy war with Envoy, NGINX, and ...The rise of Layer 7, microservices, and the proxy war with Envoy, NGINX, and ...
The rise of Layer 7, microservices, and the proxy war with Envoy, NGINX, and ...Ambassador Labs
 
Ch 18 intro to network layer - section 3
Ch 18   intro to network layer - section 3Ch 18   intro to network layer - section 3
Ch 18 intro to network layer - section 3Hossam El-Deen Osama
 
Using GTP on Linux with libgtpnl
Using GTP on Linux with libgtpnlUsing GTP on Linux with libgtpnl
Using GTP on Linux with libgtpnlKentaro Ebisawa
 
The TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux KernelThe TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux KernelDivye Kapoor
 

What's hot (20)

Introduction to OpenCL, 2010
Introduction to OpenCL, 2010Introduction to OpenCL, 2010
Introduction to OpenCL, 2010
 
Rip presentation
Rip presentationRip presentation
Rip presentation
 
Introduction to eBPF and XDP
Introduction to eBPF and XDPIntroduction to eBPF and XDP
Introduction to eBPF and XDP
 
IPv6 - Neighbour Discovery
IPv6 - Neighbour DiscoveryIPv6 - Neighbour Discovery
IPv6 - Neighbour Discovery
 
Basics of firewall, ebtables, arptables and iptables
Basics of firewall, ebtables, arptables and iptablesBasics of firewall, ebtables, arptables and iptables
Basics of firewall, ebtables, arptables and iptables
 
SDN Architecture & Ecosystem
SDN Architecture & EcosystemSDN Architecture & Ecosystem
SDN Architecture & Ecosystem
 
GTPing, How To
GTPing, How ToGTPing, How To
GTPing, How To
 
CCNP Route EIGRP Overview
CCNP Route  EIGRP OverviewCCNP Route  EIGRP Overview
CCNP Route EIGRP Overview
 
181114051_Intern Report (11).pdf
181114051_Intern Report (11).pdf181114051_Intern Report (11).pdf
181114051_Intern Report (11).pdf
 
Ieee nfv-sdn-2020-srv6-tutorial
Ieee nfv-sdn-2020-srv6-tutorialIeee nfv-sdn-2020-srv6-tutorial
Ieee nfv-sdn-2020-srv6-tutorial
 
DPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingDPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet Processing
 
Class notes fhrp,hsrp,vrrp
Class notes fhrp,hsrp,vrrpClass notes fhrp,hsrp,vrrp
Class notes fhrp,hsrp,vrrp
 
GLBP (gateway load balancing protocol)
GLBP (gateway load balancing protocol)GLBP (gateway load balancing protocol)
GLBP (gateway load balancing protocol)
 
The rise of Layer 7, microservices, and the proxy war with Envoy, NGINX, and ...
The rise of Layer 7, microservices, and the proxy war with Envoy, NGINX, and ...The rise of Layer 7, microservices, and the proxy war with Envoy, NGINX, and ...
The rise of Layer 7, microservices, and the proxy war with Envoy, NGINX, and ...
 
Ch 18 intro to network layer - section 3
Ch 18   intro to network layer - section 3Ch 18   intro to network layer - section 3
Ch 18 intro to network layer - section 3
 
Using GTP on Linux with libgtpnl
Using GTP on Linux with libgtpnlUsing GTP on Linux with libgtpnl
Using GTP on Linux with libgtpnl
 
MPLS ppt
MPLS pptMPLS ppt
MPLS ppt
 
RISC-V Introduction
RISC-V IntroductionRISC-V Introduction
RISC-V Introduction
 
The TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux KernelThe TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux Kernel
 
Iptables in linux
Iptables in linuxIptables in linux
Iptables in linux
 

Similar to Snabbflow: A Scalable IPFIX exporter

FD.io Vector Packet Processing (VPP)
FD.io Vector Packet Processing (VPP)FD.io Vector Packet Processing (VPP)
FD.io Vector Packet Processing (VPP)Kirill Tsym
 
FD.IO Vector Packet Processing
FD.IO Vector Packet ProcessingFD.IO Vector Packet Processing
FD.IO Vector Packet ProcessingKernel TLV
 
D. Fast, Simple User-Space Network Functions with Snabb (RIPE 77)
D. Fast, Simple User-Space Network Functions with Snabb (RIPE 77)D. Fast, Simple User-Space Network Functions with Snabb (RIPE 77)
D. Fast, Simple User-Space Network Functions with Snabb (RIPE 77)Igalia
 
DPDK summit 2015: It's kind of fun to do the impossible with DPDK
DPDK summit 2015: It's kind of fun  to do the impossible with DPDKDPDK summit 2015: It's kind of fun  to do the impossible with DPDK
DPDK summit 2015: It's kind of fun to do the impossible with DPDKLagopus SDN/OpenFlow switch
 
DPDK Summit 2015 - NTT - Yoshihiro Nakajima
DPDK Summit 2015 - NTT - Yoshihiro NakajimaDPDK Summit 2015 - NTT - Yoshihiro Nakajima
DPDK Summit 2015 - NTT - Yoshihiro NakajimaJim St. Leger
 
Stacks and Layers: Integrating P4, C, OVS and OpenStack
Stacks and Layers: Integrating P4, C, OVS and OpenStackStacks and Layers: Integrating P4, C, OVS and OpenStack
Stacks and Layers: Integrating P4, C, OVS and OpenStackOpen-NFP
 
FlowER Erlang Openflow Controller
FlowER Erlang Openflow ControllerFlowER Erlang Openflow Controller
FlowER Erlang Openflow ControllerHolger Winkelmann
 
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*Michelle Holley
 
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitchDPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitchJim St. Leger
 
Practical virtual network functions with Snabb (SDN Barcelona VI)
Practical virtual network functions with Snabb (SDN Barcelona VI)Practical virtual network functions with Snabb (SDN Barcelona VI)
Practical virtual network functions with Snabb (SDN Barcelona VI)Igalia
 
Snabb, a toolkit for building user-space network functions (ES.NOG 20)
Snabb, a toolkit for building user-space network functions (ES.NOG 20)Snabb, a toolkit for building user-space network functions (ES.NOG 20)
Snabb, a toolkit for building user-space network functions (ES.NOG 20)Igalia
 
Practical virtual network functions with Snabb (8th SDN Workshop)
Practical virtual network functions with Snabb (8th SDN Workshop)Practical virtual network functions with Snabb (8th SDN Workshop)
Practical virtual network functions with Snabb (8th SDN Workshop)Igalia
 
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)Yuuki Takano
 
Lagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus presentation on 14th Annual ON*VECTOR International Photonics WorkshopLagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus presentation on 14th Annual ON*VECTOR International Photonics WorkshopLagopus SDN/OpenFlow switch
 
Introduction to DPDK
Introduction to DPDKIntroduction to DPDK
Introduction to DPDKKernel TLV
 
Hari Krishna Vetsa Resume
Hari Krishna Vetsa ResumeHari Krishna Vetsa Resume
Hari Krishna Vetsa ResumeHari Krishna
 
Ocpeu14
Ocpeu14Ocpeu14
Ocpeu14KALRAY
 
Analise NetFlow in Real Time
Analise NetFlow in Real TimeAnalise NetFlow in Real Time
Analise NetFlow in Real TimePiotr Perzyna
 
Pristine glif 2015
Pristine glif 2015Pristine glif 2015
Pristine glif 2015ICT PRISTINE
 

Similar to Snabbflow: A Scalable IPFIX exporter (20)

FD.io Vector Packet Processing (VPP)
FD.io Vector Packet Processing (VPP)FD.io Vector Packet Processing (VPP)
FD.io Vector Packet Processing (VPP)
 
FD.IO Vector Packet Processing
FD.IO Vector Packet ProcessingFD.IO Vector Packet Processing
FD.IO Vector Packet Processing
 
D. Fast, Simple User-Space Network Functions with Snabb (RIPE 77)
D. Fast, Simple User-Space Network Functions with Snabb (RIPE 77)D. Fast, Simple User-Space Network Functions with Snabb (RIPE 77)
D. Fast, Simple User-Space Network Functions with Snabb (RIPE 77)
 
DPDK summit 2015: It's kind of fun to do the impossible with DPDK
DPDK summit 2015: It's kind of fun  to do the impossible with DPDKDPDK summit 2015: It's kind of fun  to do the impossible with DPDK
DPDK summit 2015: It's kind of fun to do the impossible with DPDK
 
DPDK Summit 2015 - NTT - Yoshihiro Nakajima
DPDK Summit 2015 - NTT - Yoshihiro NakajimaDPDK Summit 2015 - NTT - Yoshihiro Nakajima
DPDK Summit 2015 - NTT - Yoshihiro Nakajima
 
Stacks and Layers: Integrating P4, C, OVS and OpenStack
Stacks and Layers: Integrating P4, C, OVS and OpenStackStacks and Layers: Integrating P4, C, OVS and OpenStack
Stacks and Layers: Integrating P4, C, OVS and OpenStack
 
FlowER Erlang Openflow Controller
FlowER Erlang Openflow ControllerFlowER Erlang Openflow Controller
FlowER Erlang Openflow Controller
 
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
 
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitchDPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
 
Practical virtual network functions with Snabb (SDN Barcelona VI)
Practical virtual network functions with Snabb (SDN Barcelona VI)Practical virtual network functions with Snabb (SDN Barcelona VI)
Practical virtual network functions with Snabb (SDN Barcelona VI)
 
Snabb, a toolkit for building user-space network functions (ES.NOG 20)
Snabb, a toolkit for building user-space network functions (ES.NOG 20)Snabb, a toolkit for building user-space network functions (ES.NOG 20)
Snabb, a toolkit for building user-space network functions (ES.NOG 20)
 
Practical virtual network functions with Snabb (8th SDN Workshop)
Practical virtual network functions with Snabb (8th SDN Workshop)Practical virtual network functions with Snabb (8th SDN Workshop)
Practical virtual network functions with Snabb (8th SDN Workshop)
 
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)
 
Lagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus presentation on 14th Annual ON*VECTOR International Photonics WorkshopLagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
 
Introduction to DPDK
Introduction to DPDKIntroduction to DPDK
Introduction to DPDK
 
OpenFlow Tutorial
OpenFlow TutorialOpenFlow Tutorial
OpenFlow Tutorial
 
Hari Krishna Vetsa Resume
Hari Krishna Vetsa ResumeHari Krishna Vetsa Resume
Hari Krishna Vetsa Resume
 
Ocpeu14
Ocpeu14Ocpeu14
Ocpeu14
 
Analise NetFlow in Real Time
Analise NetFlow in Real TimeAnalise NetFlow in Real Time
Analise NetFlow in Real Time
 
Pristine glif 2015
Pristine glif 2015Pristine glif 2015
Pristine glif 2015
 

More from Igalia

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Building End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEBuilding End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEIgalia
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Automated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded DevicesAutomated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded DevicesIgalia
 
Embedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceEmbedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceIgalia
 
Optimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdfOptimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdfIgalia
 
Running JS via WASM faster with JIT
Running JS via WASM      faster with JITRunning JS via WASM      faster with JIT
Running JS via WASM faster with JITIgalia
 
To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!Igalia
 
Implementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamerImplementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamerIgalia
 
8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in MesaIgalia
 
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIntroducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIgalia
 
2023 in Chimera Linux
2023 in Chimera                    Linux2023 in Chimera                    Linux
2023 in Chimera LinuxIgalia
 
Building a Linux distro with LLVM
Building a Linux distro        with LLVMBuilding a Linux distro        with LLVM
Building a Linux distro with LLVMIgalia
 
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsturnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsIgalia
 
Graphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesGraphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesIgalia
 
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSDelegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSIgalia
 
MessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the webMessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the webIgalia
 
Replacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersReplacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersIgalia
 
I'm not an AMD expert, but...
I'm not an AMD expert, but...I'm not an AMD expert, but...
I'm not an AMD expert, but...Igalia
 
Status of Vulkan on Raspberry
Status of Vulkan on RaspberryStatus of Vulkan on Raspberry
Status of Vulkan on RaspberryIgalia
 

More from Igalia (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Building End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEBuilding End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPE
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Automated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded DevicesAutomated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded Devices
 
Embedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceEmbedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to Maintenance
 
Optimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdfOptimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdf
 
Running JS via WASM faster with JIT
Running JS via WASM      faster with JITRunning JS via WASM      faster with JIT
Running JS via WASM faster with JIT
 
To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!
 
Implementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamerImplementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamer
 
8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa
 
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIntroducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
 
2023 in Chimera Linux
2023 in Chimera                    Linux2023 in Chimera                    Linux
2023 in Chimera Linux
 
Building a Linux distro with LLVM
Building a Linux distro        with LLVMBuilding a Linux distro        with LLVM
Building a Linux distro with LLVM
 
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsturnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
 
Graphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesGraphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devices
 
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSDelegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
 
MessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the webMessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the web
 
Replacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersReplacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shaders
 
I'm not an AMD expert, but...
I'm not an AMD expert, but...I'm not an AMD expert, but...
I'm not an AMD expert, but...
 
Status of Vulkan on Raspberry
Status of Vulkan on RaspberryStatus of Vulkan on Raspberry
Status of Vulkan on Raspberry
 

Recently uploaded

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 

Snabbflow: A Scalable IPFIX exporter

  • 1. Snabbflow: a scalable IPFIX exporter A tour of the IPFIX exporter developed at SWITCH
  • 2. Who we are Alexander Gall Network engineer at SWITCH, Snabb contributor since 2014 alexander.gall@switch.ch Max Rottenkolber Works on Snabb since 2014 maximilian@igalia.com
  • 4. Netflow at SWITCH The concept of a “flow” is the primary mechanism used to analyze network traffic ● 5-tuple <src address, dst address, IP protocol, src port, dst port> ● Aggregates bytes/packets, additional custom fields (TCP flags, AS numbers…) ● Evolved from Cisco-proprietary to IETF standard IPFIX ● Unsampled (process every packet) or sampled (process 1 in n packets) In use at SWITCH since mid 1990s. Until a few years ago ● Provided in Hardware by the routers ● Unsampled Modern routers moved to sampling to cope with high-volume traffic
  • 5. Sampled vs Unsampled Sampling approximates real values well for volume-based metrics. Why use unsampled Netflow? ● Fine-grained analysis of security incidents ● Debugging of network problems for single flows, e.g. ○ TCP handshake ○ DNS transaction Requires ● Move from router to external appliance for Netflow generation ● Find a scalable and cost-effective solution: Snabbflow
  • 6. SWITCH Network ● Peak traffic values (aggregate external traffic, ingress + egress) ○ ~180Gbps ○ ~20Mpps ○ ~350k flows per second (>500kfps with aggressive port-scans) ● Aggregate IPFIX export data rate 200-300Mbps ● Average flow rate 200k/s, 1.5TiB flow data per day (~100 bytes/flow) ● Interface types: optical 10G, 100G soon 400G ● Until 2015 Netflow export on (Cisco) routers ● 2015-2020 commercial Netflow exporter using hardware acceleration ● Since 2020 Snabbflow
  • 7. Per-PoP Exporter Architecture ● Optical taps on external interfaces to copy packets ● “Packet-Broker” to aggregate traffic to 2x100 Gbps links to Snabbflow exporter ○ Use VLAN tags to identify original router ports ○ “Whitebox” switch ■ EdgeCore Wedge100BF-32x/AS9516-32D ■ Tofino/Tofino2 ASIC ■ P4-programmable ■ Separate project: https://github.com/alexandergall/packet-broker ● Snabbflow on commodity 1RU server ○ AMD Epyc or Intel Xeon, 12-24 cores, ~128GiB RAM for large flow tables ○ 2x100G Mellanox ConnectX-5 NICs
  • 8. SWITCH border router Foreign BR1 8-port splitter Packet Broker Snabbflow Foreign BR2 Foreign BR3 Foreign BR8 adds vlan for each “color“ so we know where packets came from Vlan 151 Vlan 152 Vlan 153 Vlan 154 Vlan 155 Foreign BRx Vlan 156 Vlan 165 Vlan 166
  • 9. Features of Snabbflow snabb ipfix probe Scaling, configuration, monitoring and their implementation
  • 10. Built with - A toolkit for building fast packet processing applications using a high-level programming language - Written in Lua (using the amazing LuaJIT compiler)! - Packet I/O without going through the kernel (kernel-bypass / userspace networking) - Open source and independent (not sponsored by any $vendor)
  • 11. ● Simple > Complex ● Small > Large ● Commodity > Proprietary
  • 12. Recording packet metadata in a flow table function FlowSet:record_flows(timestamp) local entry = self.scratch_entry for i=1,link.nreadable(self.incoming) do local pkt = link.receive(self.incoming) self.template:extract(pkt, timestamp, entry) local lookup_result = self.table:lookup_ptr(entry.key) if lookup_result == nil then self.table:add(entry.key, entry.value) else self.template:accumulate(lookup_result, entry, pkt) end packet.free(pkt) end end
  • 13. Flushing ipfix records -- Walk through flow set to see if flow records need to be expired. -- Collect expired records and export them to the collector. function FlowSet:expire_records(out, now) local cursor = self.expiry_cursor … for i = 1, self.table_tb:take_burst() do local entry cursor, entry = self.table:next_entry(cursor, cursor + 1) … if entry then … self:add_data_record(entry.key, out) end end if self.flush_timer() then self:flush_data_records(out) end end
  • 14. High-level overview 100G NIC (Driver written in Lua) Snabb ipfix probe tun/tap (Linux kernel network stack) ipfix collector
  • 15. Scaling via hardware RSS 100G NIC (Driver written in Lua) Snabb ipfix probe RSS forwards distinct sets of flows to distinct Snabbflow processes Horizontal scaling! Circle = CPU core
  • 16. Scaling via software RSS Snabb ipfix probe IP template DNS/HTTP template Software RSS forwards distinct sets of flows to distinct exporter processes extracting different sets of metadata. Isolate workloads! (Complex packet inspection does not bog down basic metadata export) Circle = CPU core
  • 17. “Apps” and multi-processing ConnectX Driver App ARP App input output Snabb programs are organized in “apps” (independent packet processing components) Communicate with each other via “links”: p = link.receive(input) link.transmit(output, p)
  • 18. “Apps” and multi-processing (lib.interlink) cpu core 1 cpu core 1 ConnectX Driver App ARP App Interlink Transmitter App Interlink Receiver App Interlink Packets can be shared with low overhead across CPU core boundaries using “interlinks”. Link interface remains orthogonal: p = link.receive(input) link.transmit(output, p)
  • 19. lib.ptree Control plane (manager) Data plane (worker) - Can query and update data-plane configuration - Knows about data-plane state - No particular latency requirements - Manages multiple data-plane workers (on dedicated CPU cores) - Soft real-time! No messing around! - Receives configuration updates from manager - Writes state counters to shared memory Data plane (worker) Data plane (worker)
  • 20. lib.yang Application configuration and state are described in a YANG schema. $ snabb config set my-process / < ipfix.conf $ snabb config get-state my-process /snabbflow-state/exporter[name=ip] packets-dropped 0; packets-ignored 129326; packets-received 499996; template { id 1512; flow-export-packets 115; flows-exported 1318; packets-processed 12034; …
  • 21. snabb-snabbflow-v1.yang module snabb-snabbflow-v1 { … container snabbflow-config { description "Configuration for the Snabbflow IPFIX exporter."; list interface { key device; unique "name vlan-tag"; description "Interfaces serving as IPFIX Observation Points."; leaf device { type pci-address; description "PCI address of the network device."; } … - Schema defines both valid configuration and state trees - YANG is expressive: control-plane can effectively reject invalid data-plane configurations - Snabb programs translate valid configurations to app and link networks running in data-plane
  • 22. Flight recorder - Minimal overhead: always on! (if you want it) - Stores useful data - JIT trace info - Trace profiles (sampled) - High-frequency event log (sampled) - Can be analyzed while running or post mortem - tar cf blackbox.tar /var/run/snabb; scp blackbox.tar …
  • 23. Where does my program spend its time? Does the JIT have issues generating efficient code? Includes full IR / assembly dump for each compiled trace!
  • 24. Latency histograms derived from event log Here: ipfix app takes ~35us to process a batch of packets. Useful for debugging tail latencies. Can add arbitrary application-specific, user-defined events.
  • 25. If you write a Snabb program today You can reuse all of these components and more!
  • 26. Thanks for your attention! Questions? GitHub: snabbco/snabb Snabbflow: alexander.gall@switch.ch Commercial support for Snabb: maximilian@igalia.com