UNPKG

1.1 kBMarkdownView Raw
1# Supported Servers
2
3StatsD supports pluggable server modules that listen for incoming
4metrics.
5
6StatsD includes the following built-in servers:
7
8* UDP (`udp`): Listens for metrics on a UDP port. One UDP packet contains at
9 least one StatsD metric. Multiple metrics can be received in a single packet
10 if separated by the \n character.
11* TCP (`tcp`): Listens for metrics on a TCP port. Metrics can span multiple TCP
12 packets, meaning each metric must be terminated by the \n character when
13 received over TCP.
14
15By default, the `udp` server will be loaded automatically. Currently only a
16single server can be run at once. To select which server is loaded, set
17the `server` configuration variable to the server module to load.
18
19Servers are just npm modules which implement the interface described in
20section [Server Interface](./server_interface.md). In order to be able to load the server,
21add the module name into the `server` variable in your config. As the name is also
22used in the `require` directive, you can load one of the provided servers by
23giving the relative path (e.g. `./servers/udp`).