liveBook · Manning

Flow steering

As explained in Latency

Flow steering is the directing of incoming network flows to selected queues or processors based on packet or request attributes.

Flow steering directs incoming network flows to selected queues or processors according to packet or request attributes. It supports low-latency multicore designs by keeping request processing near the responsible data partition and CPU. section 3.4 section 7.5.3

A NIC can inspect incoming requests and forward them to a queue bound to a specific CPU. This resembles CDN-style request partitioning, but occurs within one multicore machine. Steering also limits interference by preventing packet handling from moving unpredictably across application CPUs. section 3.4 section 7.5.3

Use flow steering to improve locality and remove avoidable network-processing work:

  • Partition application state across NUMA nodes or CPU cores, then steer requests to the partition responsible for each key or flow. section 3.4
  • Configure NIC queues and CPU affinity so the interrupt handler, network stack, and application thread avoid unnecessary cross-core movement. section 7.5.3
  • Use Linux eBPF networking when software steering is appropriate; use kernel bypass only when eliminating network-stack copies and processing justifies the added specialization. section 3.4 section 7.5.3
Figure 3.4 UMA and NUMA architectures. The left side of the figure represents a UMA architecture where all CPU cores have the same access latency to DRAM. The right side represents a NUMA architecture with two nodes. CPUs that are in the same node can access NUMA node local memory faster than memory in a remote node.
Figure 3.3: UMA and NUMA architectures. The left side of the diagram represents a UMA architecture where all CPU cores have the same access latency to DRAM. The right side, on the other hand, represents a NUMA architecture with two nodes. CPUs that are in the same node can access NUMA node local memory faster than memory in a remote node.

Use the UMA-versus-NUMA figure to relate flow steering to local and remote memory-access latency. section 3.4

How Latency covers it

How deep it goes
Explains request placement, queue affinity, CPU paths, eBPF, and kernel bypass without detailing a complete configuration procedure.
Examples
Uses MICA key-value storage, keyspace partitioning, NIC queues, eBPF networking, and a packet path spanning NIC, kernel, and application CPUs.
What you can do after
Operate/configure NIC or eBPF steering to align incoming flows with queues, CPUs, NUMA partitions, and application threads.
How it connects
Connects flow steering to NUMA, sharding, NIC queues, eBPF, network stacks, CPU affinity, and kernel-bypass networking.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Latency. The section links point to the parts of the book it draws on.