Skip to main content
Module

x/statsd/mod.ts>UDPConfig

A simple StatsD client for Deno
Latest
interface UDPConfig
import { type UDPConfig } from "https://deno.land/x/statsd@0.5.0/mod.ts";

Information needed to connect to a UDP StatsD server.

Properties

proto: "udp"
optional
host: string

The server that we'll send our stats to.

optional
port: number

The server port number that we'll connect to.

optional
mtu: number

The Maximum Transmission Unit for the network connection.

We use this number when figuring out the maximum amount of data that we can send in a single network packet. A smaller number means more packets will have to be sent, but if we set this value TOO high, it might mean that packets won't arrive.

1500 bytes is usually safe enough for most server networks. Fancy networks that have Jumbo Frames enabled might be able to bump this value higher, like to 8932 bytes, but worse networks (like if these packets are routed through the wider internet) might need to reduce the MTU to 512. It all depends on the routers that these packets get routed through, and how they were configured.