Peer to peer mode

Starting from Patch 11, the BigFix client includes a new feature named PeerNest, that allows to share binary files among clients located in the same subnet.

While PeerNest is applicable in many use cases, we can consider as an example the use case of a branch office connected to the data center through a slow link. With earlier BigFix versions, the suggested configuration required a relay to be installed in the branch office in order to download and cache large payloads. With PeerNest, the BigFix clients can share downloaded binaries and therefore reduce the number of communications going outside of the branch office even if a relay is not installed locally.

When PeerNest is enabled, the BigFix clients are able to self optimize the download of the binaries required to execute actions. When multiple clients are executing actions requiring the prefetch of a binary file, they check with their peers if the file is already cached in the subnet. If the binary was not cached yet, the clients can elect one of them as responsible for downloading from the relay and then sharing with the peers. In this way, multiple clients generate on the relay the download load of a single client, because only one clients downloads from the relay and then shares the download with the peers.
Note: The BigFix clients are able to self optimize the download of the binaries required to execute actions only when the hash of the file is specified inside the prefetch statement.

Requirements to use this mode

PeerNest requires UDP communication to be enabled, in order to allow the BigFix clients to communicate with each other. If you are not allowing UDP communications and/or you are not opening the 52311 UDP port on your clients, you will not be able to leverage this new feature.

PeerNest also requires that the TCP port 52311 is open among peers, in order to allow the BigFix clients to download files from a peer. If this port is not open, the clients will not be able to download files from peers. It is recommended to set PeerNest in passive mode (using the _BESClient_PeerNest_IsPassive configuration setting) on clients that cannot open this port.

PeerNest also requires that the subnet supports multicasting. You will not be able to take advantage of this new feature on subnets that do not support multicasting functions.

Additionally, PeerNest requires an increased disk storage space.

Optimal efficiency to use this mode

The efficiency of the PeerNest feature is optimal in a subnet where all endpoints hosting the BigFix client use the same version of IP protocol. When this condition is not met,the same file might be downloaded from the BigFix relay by more than one client, and the time needed for all involved BigFix clients to be aligned getting the file cannot be minimized.

Enabling PeerNest

To enable the PeerNest feature, set to 1 the following configuration setting on the client:

_BESClient_PeerNest_Enabled = 1

The client enables all the PeerNest feature in order to locally optimize the download of binaries.

This configuration setting requires a restart of the client to be effective.

PeerNest flows

After enabling the PeerNest mode, the file download flow is as follows:
  1. While executing an action that requires a download, the clients broadcasts over the subnet a UDP message in order to check if the file is available. The broadcast is executed on the subnet broadcast address, on port 52311, which is the agent UDP port.
  2. Depending on the answer that the client receives:
    • One or more peers already have the file: The client chooses randomly one of the peers that have the file available and starts the download.
    • One peer is downloading the file from the relay: The client goes to sleep mode and waits for the download to complete.
    • No other peer is downloading the file: The client adds the file to a download pending list. It checks with the relay for the file availability. If the relay has it available, the client starts the file download.
  3. After completing the download, the client notifies its peers that the download is now available. The notification is performed sending a multicast UDP message over the subnet on port 52311.

Troubleshooting scenario 1

On BigFix clients hosted on an Operating System that has the Internet Protocol version 6 (IPv6) disabled or not configured:

If you want to use the PeerNest feature, you must:

  1. Set on these clients the _BESClient_Comm_IPCommunicationsMode configuration setting as follows:
    _BESClient_Comm_IPCommunicationsMode = OnlyIpv4
  2. Restart the clients for the changes to take effect.

Troubleshooting scenario 2

On BigFix clients that have an active polling set using the _BESClient_Comm_CommandPollEnable and _BESClient_Comm_CommandPollIntervalSeconds configuration settings:

If you want to use the PeerNest feature, you must not configure these clients to be "passive" PeerNest agents. Do not enable on them the _BESClient_PeerNest_IsPassive configuration setting. Otherwise, depending on the timing of the polling, multiple clients in a subnet can download the same binary, without sharing it.

Configuring the clients

You can configure the clients for peer to peer mode by using a few settings. For details, see Peer to peer mode.