UDP Message Distribution Using eBPF-Isolated Process Groups

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In Nginx-based streaming media servers, during application service upgrades or hot updates, multiple process groups can exist concurrently, leading to disorder in UDP message distribution, causing disruptions in live streaming and affecting service quality due to data being sent to incorrect process groups.

Innovation Solution

Implementing Extended Berkeley Packet Filter (EBPF) resources for each process group to ensure independent management of file descriptors (FDs), ensuring that UDP messages are distributed correctly by determining the appropriate target process group based on the quadruple extracted from the UDP message.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If multiple process groups are used for application services during upgrade or hot update, then service continuity and adaptability are improved, but UDP message distribution reliability deteriorates due to data being sent to incorrect process groups

Engineering Contradiction:
Improveservice continuity during upgradeVSAvoidUDP message distribution reliability
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent segments the file descriptor management by creating independent EBPF resources for each process group. Each process group has its own dedicated file descriptors and socket buffers, preventing cross-contamination of UDP messages between old and new process groups during upgrades. This segmentation ensures that messages are reliably routed to the correct process group while maintaining service continuity.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary mechanism (EBPF resource management layer) that sits between the UDP message reception and process group handling. This intermediary maintains a mapping between socket buffers and specific process groups, ensuring messages are correctly routed even when multiple process groups coexist during upgrades, thus resolving the reliability issue while preserving adaptability.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If EBPF resources are allocated for each process group, then UDP message distribution reliability is improved, but device complexity increases due to separate resource management

Engineering Contradiction:
ImproveUDP message distribution reliabilityVSAvoidresource management complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent creates a universal EBPF resource management framework that handles multiple process groups through a standardized interface. The same EBPF infrastructure and resource allocation mechanisms are reused across all process groups, providing reliable message distribution without proportionally increasing complexity. The system manages file descriptors and socket buffers uniformly for both old and new process groups.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent manages complexity by dynamically allocating EBPF resources based on process group state. When process groups are created or destroyed during upgrades, the system adjusts the number and configuration of EBPF resources accordingly. This parameter-based resource management ensures reliability while adapting the level of complexity to actual operational needs rather than maintaining fixed high complexity.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentEP4529137B1UDP message distribution method, device and readable storage medium
Publication Date: 2026.01.21 CHINANETCENT TECH
  • EP4529137B1 patent drawingFigure 1~2
  • EP4529137B1 patent drawingFigure 3A~4
  • EP4529137B1 patent drawingFigure 5~6

AI summary

A UDP message distribution method, a UDP message distribution apparatus and a computer readable storage medium are provided according to the present application. In response to there being multiple process groups for one application service concurrently, each of the multiple process groups has an EBPF resource independent from each other, and the EBPF resource is used to store information of an FD of each process in each of the multiple process groups. After a UDP message is received, a server is configured to determine a target process group from multiple process groups of a reuseport group according to a quadruple of the UDP message, select a target FD from the FD of each process of the target process group, and receive and transmit data by using the target FD. In this way, since each of the multiple process groups has an EBPF resource independent from each other, the processes belong to different process groups do not preempt the same FD, which ensures that the UDP message is not distributed in disorder in response to there being multiple process groups for one application service concurrently, thereby ensuring the service quality. Moreover, the problem of performance consumption due to soft interrupt caused by UDP connect can be solved, so that the concurrency capability is high.