|Manuals

Configuring Thinfinity Primary Broker

This article presents the steps to configure the Thinfinity Primary Broker.

1

Set Thinfinity Workspace Role as Primary Broker

Launch the Thinfinity Configuration Manager, navigate to the Services tab, select Primary Broker, and select Apply.

2

Set the Network ID Parameter

In the General tab, go to the Gateways section and enter the same Network ID used during the Gateway configuration.

3

Add Users and Permissions

In the Permissions tab:

  • Select Add in the Users and groups section.
  • Search and select the users or groups to be granted access.
  • Configure access by enabling the appropriate permissions.
4

Commit Changes

Select Apply to save the configuration.

Warning

All Thinfinity Workspace components must be installed on machines that belong to the same domain to ensure proper discovery and communication.

Registering Communications Gateway URLs

When the primary Gateway sits behind a load balancer, the Broker can be configured to hand out a Communications Gateway URL — the dedicated address used for the session data plane (WebSocket, file transfers, PDF viewer, virtual channels) instead of the load-balanced Gateway URL. The primary Gateway continues to serve the portal and web resources. Registering one or more Communications Gateway URLs is a Broker-side setting; for the Gateway-side counterpart (declaring the local gateway as a communications gateway), see Configuring Thinfinity Gateway.

Which Installations Need the List

The Communications Gateway list lives in each machine’s own settings.ini, and three kinds of processes read it there.

Each Broker process reads its own settings.ini and registers with the Communications Gateways it finds there. A Broker without the list doesn’t register with them, and sessions handled by that process aren’t reachable through the Communications Gateway — this applies to every Broker, primary and secondary.

The Agent service doesn’t register with the Communications Gateways, but it uses the addresses to build the Content-Security-Policy headers it serves, so that the browser is allowed to open the session connection to the Communications Gateway host. When the list is missing on an Agent, the policy falls back to the Agent’s own origin.

The session processes the Agent launches (RDP, VNC, and VirtualUI hosts) also depend on the Agent’s own settings.ini. When the Broker starts a session with url: '*' (see DefaultCommGatewayURL below), the session process expands that wildcard against its local file and registers with every Communications Gateway listed there. An Agent whose settings.ini is missing CommGatewayURL_N can’t have its session processes register with any Communications Gateway, even if the Broker’s own list is correct.

Warning

Set the same [Broker] entries on every Broker and every Agent installation, not only on the primary Broker. A machine without the list breaks Communications Gateway routing for the sessions it handles.

Configuring via settings.ini

Cloud-provisioned deployments overwrite the list

When the deployment is provisioned by a cloud adapter (Azure, Oracle Cloud), the adapter writes the [Broker] GatewayURL_N and [Broker] CommGatewayURL_N arrays from the instance metadata on every configuration sync. A manual edit to settings.ini is lost on the next sync, and a sync with an empty list clears the local one. Change the list at the source — the cloud instance metadata — in cloud-provisioned deployments; use the direct-edit flow below only for standalone installations.

When to use this method: on-premises deployments where the Gateway topology is managed manually, and you need to add or change Communications Gateway addresses after installation without reinstalling.

Edit settings.ini, located at:

C:\ProgramData\Cybele Software\Thinfinity\Workspace\DB\settings.ini

Open it with a text editor running as administrator, and set the following keys in the [Broker] section:

[Broker]
CommGatewayURL_0=https://comm-gw-1.example.com:443/
CommGatewayURL_1=https://comm-gw-2.example.com:443/

# Strongly recommended whenever any Communications Gateway is registered.
# Points the browser at a single public session-data address — typically
# a load balancer in front of the Communications Gateways, but also used
# in single-Communications-Gateway deployments. See the key reference
# below.
DefaultCommGatewayURL=https://comm-nlb.example.com:443/

# Optional, index-aligned parallel list — use when the registration URL
# above is internal (for example, behind NAT) and the browser must reach
# the Communications Gateway through a different public address:
# PublicCommGatewayURL_0=https://public-comm-1.example.com:443/
# PublicCommGatewayURL_1=https://public-comm-2.example.com:443/
  • CommGatewayURL_N — an indexed list of the Communications Gateway addresses the Broker registers with. The client uses one of these addresses at connection time for session data traffic. Numbering starts at _0 and must be contiguous — the Broker stops reading at the first gap, so an entry such as CommGatewayURL_3 after a missing _2 is ignored.
  • PublicCommGatewayURL_N — optional. An index-aligned parallel list of the public-facing URLs the browser should use in place of the registration URLs above. Set this when the registration URL is an internal address (for example, a private IP behind NAT) and the browser must reach the Communications Gateway through a different public address. Must have the same length and order as CommGatewayURL_N — otherwise the list is ignored.
  • DefaultCommGatewayURL — the public address the client is told to connect to for session data. A common use is a load balancer (NLB) sitting in front of the Communications Gateways, but the key is strongly recommended whenever any Communications Gateway is registered, including deployments with a single Communications Gateway and no load balancer. When this key is set, the Broker launches each session with url: '*', which tells the session process to register with every Communications Gateway listed in its own settings.ini; DefaultCommGatewayURL itself is not added to the registration set (an NLB address is not a registration endpoint). The URL is also used to build the browser’s Content-Security-Policy header. This key has no Configuration Manager equivalent — it can only be set in settings.ini.
  • PublicDomain — optional. The explicit Domain attribute set on the GWSID cookie, overriding the value otherwise derived from the request URL. Set this when the primary Gateway and the Communications Gateway are hosted under names that do not share a parent domain by default — gw1.example.com and comm.example.com share .example.com automatically, but gw1.example.com and comm.different-domain.com do not. A value such as PublicDomain=.example.com scopes GWSID to the shared parent so the browser sends it to both hosts, which the Communications Gateway requires to recognise authorised browsers (see the “Confirm the browser cookie reaches both hosts” verification step below).

Every URL in these keys must include the scheme (http:// or https://), the host, the port, and a trailing slash: https://host:port/. This is the canonical form Configuration Manager writes, and the PublicCommGatewayURL_N substitution pairs entries by exact string match — a CommGatewayURL_N written in a non-canonical shape doesn’t pair with its PublicCommGatewayURL_N counterpart, and the public substitution is silently dropped. Use HTTPS on port 443 when the Communications Gateway has a TLS certificate installed; use HTTP on port 9443 when it doesn’t.

Set DefaultCommGatewayURL even for a single Communications Gateway

When DefaultCommGatewayURL is empty, the Broker hands the session process a single Communications Gateway URL and the process registers only with that one gateway. broker-auth — the command that delivers the session profile and credentials to the pool — is sent through a primary Gateway, not through a Communications Gateway, so it never finds the pool and the session fails to start without an obvious error. Setting the key triggers the url: '*' launch path, which registers the session process on every gateway in its own settings.ini and lets broker-auth reach it.

Save and close the file, then restart the Broker service for the new values to take effect.

DefaultCommGatewayURL vs. PublicGatewayURL

Both keys are public addresses, but they answer different questions and are read by different components, so they aren’t interchangeable.

Aspect [Broker] DefaultCommGatewayURL [Broker] PublicGatewayURL
Question answered Where does the browser send session data? What is the public address of the entry point?
Points to The Communications Gateway, or the load balancer in front of it The primary Gateway, or the load balancer in front of it — the URL users type
Used for The gateway field of getServerUrl; triggers url: '*' session launches SSO redirect URIs, email notification links, the URL the gateway forwards to pools, the gateway’s own GeoIP location
Read by Broker Broker and gateways
Where configured By hand, in settings.ini of each Broker Configuration Manager, Notifications tab, Public URL
Changes session routing? Yes No
Warning

Neither is a registration address — don’t list either in CommGatewayURL_N or GatewayURL_N.

How the Broker Picks a Communications Gateway

With one or two CommGatewayURL_N addresses registered, GeoIP distance lookup is off and the Broker distributes sessions among the registered Communications Gateways by pool load alone.

With three or more addresses, the Broker auto-enables GeoIP-based distance routing — even if [Protection] GeoIpEnabled is left at its default false. For each new session it measures the distance from the user’s browser to every registered Communications Gateway, keeps the ones within roughly 100 km of the one closest to that browser, and uses pool load as a tie-breaker within that set. The practical consequence is that a user is only routed to Communications Gateways that are nearly as close to them as the nearest one — so load distribution happens within each user’s local cluster of gateways, not across the full global list.

Three or more Communications Gateways also turn on GeoIP filtering

The flag that enables distance routing also controls the GeoIP request filtering described in GeoIP Filtering. With three or more Communications Gateways configured, that filtering is active as well, whether or not you set it explicitly.

Tuning: [Redirection] WaitForPool.Timeout

[Redirection] WaitForPool.Timeout (default 1000 ms) is how long the Broker waits for a newly-launched session process to appear in the gateway after a getServerUrl call. On a slow link between the Broker (or Agent) and the Communications Gateway, the default may expire before the session process has finished registering, which surfaces to the client as a short delay and a retry. If this happens routinely in your deployment, raise the value — 3000 ms is a common operational choice. The companion key [Redirection] WaitForPool.RetryTime (default 1000 ms) controls how long the client waits before retrying after a miss.

Configuring at Install Time or via Cloud Provisioning

When to use this method: cloud deployments provisioned from a VM template or auto-scaling group, or any scripted/unattended installation where hand-editing settings.ini after the fact isn’t practical.

The same setting is also available as the commGatewayUrls JSON parameter (paired with gatewayUrls for the primary gateway) — set at silent-install time as a command-line argument or a JSON file, or populated automatically on Azure and Oracle Cloud from instance metadata. See the JSON Parameters Reference and the Secondary Broker Forwarding Metrics example.

Verifying the Configuration

After registering Communications Gateway URLs, verify that the setup is active:

1

Check the getServerUrl response.

Make a request to GET /<vpath>/getServerUrl for any profile that runs through a Communications Gateway. The response body should contain a "gateway" field with the Communications Gateway URL — if the field is absent or empty, the Broker did not resolve a Communications Gateway for that profile.

2

Confirm on the browser side.

Open the browser’s developer console during a session and read the client state:

  • THIN.httpConnection — a non-empty URL pointing at the Communications Gateway host.
  • THIN.hasSecondaryGateway — true.

An empty httpConnection means the session is running same-origin against the primary Gateway; the Communications Gateway is not in effect.

3

Check traffic separation in DevTools.

On the browser’s Network tab during an active session, requests should split by host:

  • HTML, CSS, JavaScript, and other web resources — served from the primary Gateway (the page origin).
  • Session traffic — cmd?, ft/, the PDF viewer, and the WebSocket — served from the Communications Gateway host.

If every request goes to a single host, the traffic split is not active.

4

Confirm broker-auth reached the session process.

On the machine running the session (the Agent, or a standalone deployment), open the session process log and search for the broker-auth line that is written when a connection starts:

  • Delphi hosts (RDP, VNC, VirtualUI) log TThinWebServerEx.ProcessGatewayServerCmd broker-auth profile:<profile JSON>.
  • The Go RDP client logs broker-auth: profile received.

A missing broker-auth line while a session is being attempted means the Broker’s command never reached the session process. The common cause is that DefaultCommGatewayURL is not set, so the Broker handed the client a single Communications Gateway URL and the session process registered only there — broker-auth, which the Broker sends through a primary Gateway, cannot find it.

5

Confirm the browser cookie reaches both hosts.

Open the browser’s Application tab during an active session and inspect the cookies for both the primary Gateway host and the Communications Gateway host. The GWSID cookie must be present on both — the Communications Gateway uses it to recognise browsers the Broker has authorised. If GWSID is absent on the Communications Gateway host, the browser cannot pair with the Broker’s authorisation and requests return 403 (or 405 for the WebSocket upgrade). A common cause is that the two Gateway hosts are not under a shared parent domain; in that case the cookie needs an explicit domain, configured on the Broker side.

6

Check the gateway log on the Communications Gateway machine.

Every Broker should register cleanly against the Communications Gateway. A log line reading Invalid network ID indicates that the registering process has a Network ID that does not match the one configured on the Communications Gateway — see Configuring Thinfinity Gateway.