Web agent communication#

For successful server and web agent communication, you must have configurations on the server and agent sides.

In most cases, the installer configures the properties that are mentioned later. This section provides the additional information that you must consider if issues arise in server and agent communication.

Server configuration#

During the server installation, you specify a secure WebSocket connection. The connection information has the following format: agentcomm.uri=wss://physical-host:port. The information is stored in the server/conf/server/installed.properties file. The default port is 7919. This port serves WebSocket endpoints that servers and web agents use and a REST API that only web agents use. While setting the agentcomm.uri property, make sure it meets these requirements:

When you use web agents, each server in a cluster has a distinct URI and each server establishes a direct connection to every other server, which results in two connections between each server. The server-to-server connections advertise connected web agents to the cluster and exchange messages for them.

When a new server is added to a Web agent-enabled cluster, it connects to the previously defined servers. The other servers respond by connecting back to the new one. In normal operation, each server has two connections to each of its peers.

Web agent configuration#

When you install a web agent, you specify the agentcomm.server.uri property. If there is one server or if all servers share a URL, it can be configured directly, for example, agentcomm.server.uri=wss://examplehost.org:7919. Configure multiple servers as a comma-separated list that is embedded in a random scheme, for example, agentcomm.server.uri=random:(wss://examplehost1.org:7919,wss://examplehost2.org:7919).

Agents and relays connect to one or more servers at their respective URL ports. They can be configured to use a common URL, for example, a load balancer. However, servers must be configured with direct URLs. The agentcomm.proxy.uri property can define a single HTTP proxy URL or define a list in a random scheme. The property is optional if the agent connects directly to servers.

Note: JMS agents are not supported on a web agent relay.

The following diagram shows the default ports that are involved in communication between web agents, JMS agents, web agent relays, JMS agent relays, and servers.

A diagram of the ports that agents, agent relays, and servers use to communicate

Parent topic: Web agent configuration