Not only can servers balance the network load by distributing sessions among nodes,
but nodes can distribute the applications running in a session between different
application servers. This can happen either because a resource or an application is not
available on the original node, or because a resource is "closer" to the user
and so the shorter network path guarantees better performances.
A session can be identified with an agent running on a node. Agents are available for X,
RDP and RFB network protocols. Agents run in proximity of application servers
and accept connections from NX clients. Clients are the users' computers where
X Server runs. Only one (socket) connection to the X server is needed by each
agent. The case of RDP and RFB is straightforward. These protocols emulate a complete
screen and do not require communication between different applications connected to the
same X server. A node can connect any RDP and RFB sessions to a different Windows
Terminal Server computer or a different VNC server, balancing the load of
sessions among the available network resources.
In the case of X protocol, two operating modes are possible: when a user chooses to run a
session in a new virtual desktop, the agent itself acts as an X server. It
multiplexes X client connections into a single connection to the real X server.
X applications can be run on different nodes, acting as application servers.
Communication between X applications is resolved locally, on the side of the
agent. As this communication can be very verbose, the overall performances are
greatly improved. At the moment X applications run in X agent appear to be
"nested" inside the agent's window. A "rootless" agent,
that is an agent overcoming this limitation, is currently under development.
When a user chooses to run applications inside the
existing X session, windows are "floating" on the desktop and
integrate perfectly with local applications. In this case, NX operates as a
transparent proxy, compressing X traffic and tunnelling the add-on network
services (like multimedia and SMB protocol) but without offering local
resolution of X protocol's round-trips, made possible by NX agent.