As network interface cards (NICs) advance toward 200 Gbps and beyond, the performance of individual CPU cores has largely plateaued. This creates a significant bottleneck for stateful network functions (NFs), such as TCP connection tracking or DDoS mitigation, which require consistent state updates across packets. Traditional parallelization techniques often fall short: sharding via Receive Side Scaling (RSS) fails when traffic is dominated by a few "elephant flows," while lock-based state sharing suffers from severe performance degradation due to memory contention.
State-Compute Replication (SCR) is a novel architecture designed to achieve linear throughput scaling for stateful packet processing, even under highly skewed traffic conditions.
Architecture and Methods
SCR models each CPU core as a replica of a deterministic finite state machine. The core innovation lies in decoupling the expensive packet "dispatch" (moving data from the driver to the application) from the relatively "lightweight" state updates.
The architecture relies on a Sequencer, typically implemented on a programmable NIC or a Top-of-the-Rack switch. The sequencer assigns a global sequence number to every incoming packet and maintains a small buffer of the most recent packet headers.
When the sequencer sends a packet to a specific core (using round-robin distribution), it "piggybacks" the headers of the last $N$ packets as metadata. Upon receiving its assigned packet, the core uses this history to "fast-forward" its local state, catching up to the current flow state before performing the heavyweight processing for its specific packet. This approach ensures that each core can independently reconstruct the necessary state without explicit cross-core communication or locking.
Key Results and Performance
The authors evaluated SCR against traditional sharding (RSS/RSS++) and lock-based sharing using real-world (CAIDA) and synthetic data center traces designed to simulate extreme traffic skew.
The results demonstrate that SCR achieves near-linear throughput scaling across various applications. While traditional methods plateau or collapse under the pressure of elephant flows, SCR maintains performance by distributing the workload evenly across all available cores regardless of traffic patterns.
For instance, a DDoS mitigator using SCR scaled from ~8 Mpps on a single core to ~50 Mpps on 14 cores. In contrast, lock-based sharing often saw performance drops when adding more than a few cores due to cache bouncing and contention. The sequencer itself proved highly efficient, using less than 1% of logic resources on an FPGA implementation while meeting 200+ Gbps timing requirements.
Limitations and Future Work
While SCR offers a powerful solution for scaling stateful NFs, it introduces some overhead. Piggybacking history increases packet size, which can impact PCIe bandwidth if the history length is excessive. Additionally, the system currently requires manual refactoring of packet-processing code to be "SCR-aware," suggesting a need for future compiler-based automation to handle state transformations and non-deterministic elements like local timestamps.
Despite these challenges, SCR represents a major step forward in high-speed network processing, providing a robust mechanism to leverage multi-core CPUs for the next generation of high-bandwidth networks.
Summary updated