UDP
Synopsis
Creates a server that accepts network messages over UDP connections. Supports high-volume message ingestion with configurable workers and buffering options.
Schema
- id: <numeric>
name: <string>
description: <string>
type: udp
tags: <string[]>
pipelines: <pipeline[]>
status: <boolean>
properties:
address: <string>
port: <numeric>
tenants:
- tenant_id: <string>
ip_blocks: <string[]>
reuse: <boolean>
workers: <numeric>
buffer_size: <numeric>
Configuration
The following fields are used to define the device:
Device
| Field | Required | Default | Description |
|---|---|---|---|
id | Y | Unique identifier | |
name | Y | Device name | |
description | N | - | Optional description |
type | Y | Must be udp | |
tags | N | - | Optional tags |
pipelines | N | - | Optional pre-processor pipelines |
status | N | true | Enable/disable the device |
Connection
| Field | Required | Default | Description |
|---|---|---|---|
address | N | "0.0.0.0" | Listen address |
port | Y | Listen port |
Access List
Datagrams from a denied source IP are silently discarded before parsing.
Tenants
The source IP is matched per datagram.
Advanced Configuration
To enhance performance and achieve better event handling, the following settings are used.
Performance
| Field | Required | Default | Description |
|---|---|---|---|
reuse | N | true | Enable socket address reuse |
workers | N | CPU count | Number of worker processes when reuse is enabled. Capped at the number of physical cores. |
buffer_size | N | 9000 | Network read buffer size in bytes |
Examples
The following are commonly used configuration types.
Basic
Creating a minimal UDP listener using defaults for address and buffer size:
Creating a simple UDP server... | |
High-Volume
Optimizing for high message volumes... | |
The worker count will be automatically capped at the number of available cores.
Multiple Ports
Multiple UDP servers with different ports and independent worker pools:
Listening on multiple ports using separate configurations... | |
When running multiple UDP servers, ensure that each configuration has a unique port number, and consider the total number of workers across all instances relative to the available system resources.
Multi-Tenant
One UDP port serving several customers, each identified by its source network. The matched tenant_id is attached for downstream routing:
Mapping source networks to tenants on a single UDP listener... | |
A datagram from 10.0.0.7 is tagged with the acme tenant; the source IP is preserved... | |