# Receivers

Prepare a public IPv4 UDP receiver, allowlist its source addresses and configure socket buffers

Source: https://zerocopy.sh/docs/shredstream/receivers

Each receiver needs a public, routable IPv4 address, a UDP port and one
[metro](/docs/shredstream#metros). Shredstream does not support IPv6. You can give
each receiver a label of up to 64 characters in the console. A team can have up to
16 receivers. If you combine their streams, [deduplicate](/docs/shredstream/processing#deduplicate-valid-shreds)
across receivers because each gets its own copy.

## Firewall [#firewall]

Allow UDP traffic to the port only from the source addresses ZeroCopy gives you
for that metro. Anyone who can reach the port can send datagrams: the stream has
no transport authentication. Use [signature verification](/docs/shredstream/processing#verify-the-leader-signature)
to decide which shreds to trust.

## Socket and buffers [#socket-and-buffers]

Bind a UDP socket to the receiver's port and raise both the operating system's UDP receive
buffer and the socket's buffer. Read the socket promptly, in batches where your runtime
supports it, and keep logging and block processing off the receive path. Size the network
link for the stream and watch the host's UDP drop counters.

A bigger buffer cannot bring back a datagram that was already dropped.
[FEC recovery](/docs/shredstream/processing#recover-data-shreds) rebuilds some missing data shreds;
treat whatever it cannot rebuild as incomplete.

The [receiver example](/docs/shredstream/processing#receiver-example) binds a socket and reads the
common header.

## Check setup [#check-setup]

Once the receiver is active, compare what arrives with the
[figures in the console](/docs/shredstream/monitoring#receivers). If nothing arrives,
check the destination address and port, the allowlist and the bound port, then
ask for help on [Discord](https://discord.gg/zerocopy).
