Virtual Switch Peephole Optimization for DNS Query Latency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current systems experience high latency in processing lightweight protocols like DNS and DHCP queries due to the involvement of the host network stack, which adds unnecessary overhead and delays in response times, especially in microservice architectures where multiple DNS lookups compound latency.

Innovation Solution

Implementing peephole optimization by processing lightweight protocol traffic, such as DNS and DHCP queries, within a virtual switch (vSwitch) rather than relying on the host network stack, allowing for direct packet processing at lower layers without traversing kernel and user space, thereby reducing latency and optimizing performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If lightweight protocol traffic is processed through the host network stack, then protocol processing is standardized and reliable, but latency increases due to kernel-user space context switching

Engineering Contradiction:
Improveprotocol processing reliabilityVSAvoidquery response latency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the network packet processing path by creating a dedicated fast path in the kernel space that handles lightweight protocols directly, separating it from the standard user-space processing path. This segmentation allows critical DNS/DHCP queries to bypass the kernel-user-space context switching overhead while maintaining reliability through proper protocol handling in the kernel.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary mechanism (the fast path processing logic in the kernel) that mediates between the network interface and the standard network stack. This intermediary captures lightweight protocol packets and processes them directly without requiring full traversal through the standard protocol stack, reducing latency while maintaining processing accuracy.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If lightweight protocol queries are processed at higher layers (host network stack), then comprehensive protocol handling is achieved, but processing speed decreases due to multiple context switches

Engineering Contradiction:
Improveprotocol handling capabilityVSAvoidquery processing speed
Core Design Contradiction:
Adaptability or versatilityVSSpeed

Solution Approach 1:

The patent implements preliminary action by pre-configuring fast path processing rules in the kernel for identifying lightweight protocol packets. When a packet arrives, the kernel immediately checks against these pre-configured rules and routes eligible packets through the optimized path before they can trigger context switches to user space, thereby maintaining adaptability while increasing speed.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If DNS/DHCP queries are handled by the host stack, then full network protocol compliance is maintained, but latency compounds in microservice architectures

Engineering Contradiction:
Improvenetwork protocol complianceVSAvoidsystem response performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies local quality by implementing protocol-specific optimization only where needed - for lightweight protocols like DNS and DHCP in the kernel fast path - while leaving other protocols to follow the standard processing path. This localized optimization improves productivity for critical queries without compromising overall network protocol compliance, as each protocol type is handled according to its specific requirements.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS11075857B2Peephole optimization of lightweight protocols at lower layers
Publication Date: 2021.07.27 CISCO TECHNOLOGY INC
  • US11075857B2 patent drawing
  • US11075857B2 patent drawing
  • US11075857B2 patent drawing

AI summary

Techniques are described to provide a peephole optimization for processing traffic for lightweight protocols at lower layers by executing them inside a virtual switch rather than using the network stack of a host node. In one example, a method includes determining by forwarding logic of a virtual switch that a received packet is associated with a query for one of domain information or address information. Based on such a determination, the virtual switch determines whether the query is contained within a single Ethernet frame and is answerable. Based on a positive determination for both, the virtual switch determines whether a response to the query can be transmitted in a single packet within a single Ethernet frame. Based on a positive determination of a single packet response, a response packet for the query is formed and injected into the forwarding logic for the virtual switch for transmitting to a destination.