NetRaft P4 Switch Offloads Raft Consensus Latency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Distributed systems face high latency due to consensus algorithms like Paxos and Raft, which require multiple rounds of communication, even without failures, and are not scalable when offloading consensus states and logic to hardware devices.

Innovation Solution

The network-assisted Raft consensus protocol (NetRaft) offloads partial Raft functionality to programmable P4 switches, using P4-based switches to reduce consensus latency and improve performance without sacrificing correctness or scalability.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If consensus algorithms (Paxos, Raft) are used to ensure strong consistency in distributed systems, then reliability is improved, but latency increases due to multiple rounds of communication

Engineering Contradiction:
Improveconsensus correctnessVSAvoidconsensus latency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the Raft consensus algorithm into two parts: a complete Raft algorithm executed by back-ends on servers, and a partial Raft algorithm executed by front-ends on P4 switches. This segmentation allows read requests to be handled by the switch front-end without involving the server back-end, reducing communication rounds and latency while maintaining consensus correctness for write operations.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The P4 switch front-end acts as an intermediary between clients and server back-ends. It can independently handle read requests and forward write requests to the leader server, reducing the number of communication rounds required for read operations and improving overall system latency without compromising consensus correctness.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If complete Raft algorithm is executed on server back-ends, then consensus correctness is maintained, but device complexity and scalability are worsened when offloading to hardware

Engineering Contradiction:
Improveconsensus correctnessVSAvoidhardware offloading complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent divides the Raft algorithm implementation between server back-ends (complete Raft) and P4 switch front-ends (partial Raft). The front-end handles state machine execution and read requests, while the back-end handles leader election and log replication. This segmentation reduces the complexity of hardware offloading by only requiring the switch to implement essential Raft functionality.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The P4 switch front-end implements only the necessary portion of the Raft algorithm required for handling read requests and basic log replication, rather than implementing the complete Raft algorithm. This partial implementation reduces hardware complexity and resource requirements while maintaining consensus correctness for the operations handled by the switch.

Inventive Principle:
Principle #16Partial or excessive action

3Reliability

If multiple rounds of communication are performed for consensus, then strong consistency is achieved, but productivity decreases due to communication overhead

Engineering Contradiction:
Improvestrong consistencyVSAvoidsystem throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments request handling between P4 switch front-ends and server back-ends. Read requests are handled entirely by the front-end without involving the back-end, eliminating unnecessary communication rounds and improving system throughput. Write requests maintain the necessary communication rounds with the leader server to ensure strong consistency.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The P4 switch front-end serves as an intermediary that can satisfy read requests locally without forwarding them to server back-ends, reducing communication overhead and improving productivity. The intermediary maintains the necessary state to answer read requests while preserving strong consistency guarantees for write operations.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11533220B2Network-assisted consensus protocol
Publication Date: 2022.12.20 AT&T INTELLECTUAL PROPERTY I L P
  • US11533220B2 patent drawing
  • US11533220B2 patent drawing
  • US11533220B2 patent drawing

AI summary

The concepts and technologies disclosed herein are directed to a network-assisted Raft consensus protocol, referred to herein as “NetRaft.” According to one aspect of the concepts and technologies disclosed herein, a system can include a plurality of servers operating in a server cluster, and a plurality of P4 switches corresponding to the plurality of servers. Each server of the plurality of servers can include a back-end that executes a complete Raft algorithm to perform leader election, log replication, and log commitment of a Raft consensus algorithm. Each P4 switch of the plurality of P4 switches can include a front-end that executes a partial Raft algorithm to perform the log replication and the log commitment of the Raft consensus algorithm. The back-end can maintain a complete state for responding to requests that cannot be fulfilled by the front-end. The requests can include read requests and/or write requests.