Skip to main content
Version: 1.3.0

UDP

Push

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>
batch_size: <numeric>
queue:
interval: <numeric>

Configuration​

The following fields are used to define the device:

Device​

FieldRequiredDefaultDescription
idYUnique identifier
nameYDevice name
descriptionN-Optional description
typeYMust be udp
statusNtrueEnable/disable the device

Connection​

FieldRequiredDefaultDescription
addressN"0.0.0.0"Listen address
portYListen port

Advanced Configuration​

To enhance performance and achieve better event handling, the following settings are used.

Performance​

FieldRequiredDefaultDescription
reuseNtrueEnable socket address reuse
workersN<dynamic>Number of worker processes when reuse enabled
buffer_sizeN9000Network read buffer size in bytes

Messages​

FieldRequiredDefaultDescription
batch_sizeN1000Number of messages to batch before processing
queue.intervalN1Queue processing interval in seconds

Examples​

The following are commonly used configuration types.

Basic​

A basic server can be easily set up using the defaults for address, buffer size, and a single worker process.

Creating a simple UDP server...

devices:
- id: 1
name: basic_udp
type: udp
properties:
port: 514

High-Volume​

Performance can be enhanced using multiple workersi a larger buffer size, a larger batch size, and a longer queue interval.

Optimizing for high message volumes...

devices:
- id: 2
name: performant_udp
type: udp
properties:
address: "0.0.0.0"
port: 514
reuse: true
workers: 4
buffer_size: 32768
batch_size: 5000
queue:
interval: 2
note

The worker count will be automatically capped at the number of available cores.

Multiple Ports​

Multiple UDP servers can be used with different ports, separate workers, and independent message queues.

Listening on multiple ports using separate configurations...

devices:
- id: 3
name: udp_server_1
type: udp
properties:
port: 514
workers: 2

- id: 4
name: udp_server_2
type: udp
properties:
port: 515
workers: 2
note

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.