PeerConstants

Shared compile-time constants used across the peer state machine: multicast transport parameters, datagram framing limits, and beacon rate limiting.

Values are frozen: changing any of them without coordinated updates to every running Krill node in a swarm will partition the swarm (new nodes will not see old nodes and vice versa).

Properties

Link copied to clipboard
const val BEACON_MIN_INTERVAL_MS: Long = 1000

Minimum time between successive beacons from the same source, in milliseconds. Enforced at the emit side to prevent a misbehaving node from flooding the multicast group.

Link copied to clipboard
const val MAX_DATAGRAM_SIZE: Int = 2048

Maximum datagram size (in bytes) the beacon receivers are willing to buffer. Sized well above a typical beacon payload; packets larger than this are silently truncated by the socket.

Link copied to clipboard

IPv4 multicast group used by Krill beacons.

Link copied to clipboard
const val MULTICAST_PORT: Int = 45317

UDP port on which beacons are emitted and listened for.

Link copied to clipboard
const val MULTICAST_TTL: Int = 1

IP multicast TTL for beacon packets. Set to 1 so beacons never cross a router — Krill discovery is LAN-scoped by design.