Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Transports

Xylem supports multiple transport layers for network communication.

Supported Transports

  • TCP - Reliable byte stream transport
  • UDP - Unreliable datagram transport
  • Unix Domain Sockets - Local inter-process communication
  • ntcp - User-space TCP over a TUN device, a DPDK port or AF_XDP sockets (Linux, ntcp, ntcp-dpdk and ntcp-af-xdp build features)

Transport Selection

Specify transport in each [[traffic_groups]] section of your TOML profile. It defaults to "tcp". Groups sharing a thread must use the same transport:

[[traffic_groups]]
transport = "tcp"
name = "main"
protocol = "redis"
target = "127.0.0.1:6379"
# ...

For Unix sockets:

[[traffic_groups]]
transport = "unix"
name = "main"
protocol = "redis"
target = "/var/run/redis.sock"
# ...

For ntcp, which also needs a top-level [ntcp] section with one TUN device and address per thread:

[[traffic_groups]]
transport = "ntcp"
name = "main"
protocol = "redis"
target = "10.73.0.1:6379"
# ...

[ntcp]
endpoints = [{ ifname = "ntcp0", local_ip = "10.73.0.2" }]

See Also