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>
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 |
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 |
flush_interval and queue.interval are Director service-level settings configured in vmetric.yml and cannot be overridden per device.
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.