so-reuseport() options (312810)

Title

Description

What are the so-reuseport() options and what does it do?

Resolution

so-reuseport()

Type: 1 (enabled) or 0 (disabled)Default: 0 (disabled)

so-reuseport() supports both the syslog() and network() sources.

Description: Enables SO_REUSEPORT on systems that support it. When enabled, the kernel allows multiple UDP sockets to be bound to the same port, and the kernel load-balances incoming UDP datagrams to the sockets. The sockets are distributed based on the hash of (srcip, dstip, srcport, dstport), so the same listener should be receiving packets from the same endpoint. For example: