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 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. 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.
Besides deploying a complete desktop session over the network, two operating modes are also possible to run a single application in its top-level window. 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. X applications run in X agent appear to be "nested" inside the agent's window.
When a user chooses to run applications in rootless mode, nxagent lets the top-level windows to be children of the real root, so they appear undistinguishable from the local windows present on the same display. In rootless mode nxagent is still able to remove the round trips, enable the applications to be migrated to a different X server, let applications to be suspended and resumed, images to be streamed etc.