Docs/System & infrastructure/High availability (server pools)
DartRelay 2.4 documentation
System & infrastructure

High availability (server pools)

DartRelay is built for high availability: run two or more DartRelay servers as an active/active pool, on one shared database, behind the load balancer you already trust — or behind the Relay Balancer (HALB) built into DartRelay, if you have none. This page explains what a pool gives you, what happens if a server goes down, how to add servers, and how to take one out for maintenance without a service window.

Run as a pool, behind the load balancer you already trust

DartRelay runs as an active/active pool. Install two or more DartRelay servers, point them at one shared database, and place them behind your load balancer. Every server serves the portal, signs people in and launches applications and desktops. To your users it is a single address. To you it is a single console.

Your load balancer, or ours

Most organisations that need high availability already run an application delivery controller, such as NetScaler, F5 BIG-IP, nginx, Kemp LoadMaster or Microsoft IIS ARR. Their network team already knows how to run it, monitor it and keep it redundant. DartRelay is designed to sit behind it as a first-class citizen, so you don't have to add and look after another HA layer.

No appliance? The Relay Balancer (HALB) New in 2.2 is built in. One server in the pool answers for it on a floating address or the portal's DNS name, shares the launches out, and another server takes over by itself if it stops.

What the pool gives you

If a server goes down

The load balancer sees it at once and sends every new sign-in and launch to the remaining servers. The portal stays up. Tabs whose connection ran through the failed server show Reconnecting to your session… and come back through another server by themselves. Because the Windows session is still waiting on the host, the reconnected tab is handed the same windows back, without starting a second copy of anything. New in 2.2

Good to know when planning a pool

What a pool needs

RequirementWhy
A shared database on SQL Server, MySQL or PostgreSQL that every server can reachAll configuration, sessions and seat counts live there. See Databases and migration.
A load balancer in front of the servers, or the built-in Relay BalancerGives people one address and sends each launch to a server that is up. See Load balancer and ADC integration or Relay Balancer (HALB).
The same DartRelay version on every serverSee above.
Every server able to reach your Windows hostsAny server may be asked to start any Resource.

Adding a server to a pool

Start with one working, activated installation that already uses a shared server database. Then, for each additional server:

  1. Run the installer on the new server. When it asks how the server is licensed, choose Another server for an existing installation (join a pool) ("This server shares a database with the others").
  2. Give it the details of the existing installation, including a join token from that installation. A join token can be used once and expires after 24 hours. The installer checks what you enter with the existing installation before anything is installed, and stops with a message if it would not work.
  3. Finish the installation. The new server joins the shared database. It does not need its own product key: it reads the licence from the database.
  4. Add it to your load balancer. Add the new server's address and port to the load balancer's server group, with the same health check as the others. With the Relay Balancer there is nothing to add: the new server joins in by itself (in DNS name mode, give it its own public address).
  5. Check it. Open the pool's address, sign in and launch something. In the browser's developer tools, the response header X-DartRelay-Node on the page request names the server that answered.
Note

Anything specific to one server, such as its identity in the pool, its database connection and whether it starts drained, is set by the installer in that server's own configuration file. Everything else is shared through the database. See Server configuration file.

What is shared and what belongs to one server

SettingWhere it lives
Resources, hosts, users, groups, themes, tenants, security settingsShared database: change once, applies everywhere.
Load balancer settings: trusted proxies, the appliance sign-in options, public URL, server name header, header sign-in and the sign-out addressShared, on System → Load balancer. A change reaches every server within about 30 seconds.
LicenceActivated once; every server reads it from the database.
Server identity in the pool, pool membership, the certificate that protects the pool's shared keys, start drained, database connectionEach server's own configuration file, written by the installer.

A value set in a server's configuration file overrides the console for that one server. That is meant as a break-glass measure only: a field set this way shows a set on this server marker on the Load balancer page and cannot be edited there. Keep load balancer settings in the console so every server behaves the same.

Taking a server out for maintenance (draining)

Draining tells the load balancer to stop sending new visitors to a server while leaving everyone already on it alone. When the last session on it ends, you can update or reboot that server without interrupting anyone.

DartRelay reports its state at /health/ready. A server answers 200 when it is ready for new work, and 503 when it is draining or cannot reach its database or remoting service. Your load balancer's health check should ask that address; see what any load balancer must do.

  1. Drain the server. On System → Load balancer, use Drain for the server you want to take out.
  2. Wait for the load balancer to notice. Its next health check gets 503 and it marks the server down. New sign-ins now go to the other servers.
  3. Wait for sessions to finish. Watch Monitoring live sessions or the Server column on System → Relay Seats until nothing is left on that server, or ask the remaining users to save and sign out.
  4. Do the maintenance.
  5. Put the server back. Undo the drain on System → Load balancer. The next health check returns 200 and the load balancer starts sending visitors to it again.
Important

Draining only works if your load balancer actively checks /health/ready and leaves existing connections alone when a server is marked down. Open-source nginx does neither by default; see the nginx section of Load balancer and ADC integration for what to do instead.

Licensing and seats in a pool

See Licensing and Relay Seats for the seat rule itself.

When a request reaches a different server

A session's connection belongs to the server that started it. If the load balancer sends it to another server, DartRelay passes it on to the right one, so the user notices nothing. Keeping each visitor on one server (cookie persistence) is still recommended: it saves that extra hop. If the right server cannot be reached, the user sees a message that the session is running on another server and can launch again.

Worked example

An accountancy firm has 120 staff and two DartRelay servers, relay-a and relay-b, behind a load balancer at relay.example.com, sharing a SQL Server database. On Tuesday evening the administrator needs to install Windows updates on relay-a. At 6 pm they drain relay-a. New sign-ins all go to relay-b. By 7:30 pm the last session on relay-a has ended; the administrator installs the updates, reboots, and undoes the drain. On Wednesday morning both servers take new sign-ins again. Nobody's work was interrupted. Had relay-a failed outright instead, the portal would have stayed up on relay-b; the tabs that ran through relay-a would have reconnected through relay-b by themselves and, with their Windows sessions still waiting on the hosts, carried on where they left off.

If something goes wrong

Users see "running on another server"

The connection reached a different server and the server holding the session could not be reached from it. Check that the servers can reach each other on their DartRelay port, and turn on cookie persistence (preferred) or source-address persistence on the load balancer. See what any load balancer must do.

Single sign-on from the load balancer works on one server only

A server's configuration file is overriding a shared setting. Open System → Load balancer on each server and look for fields marked set on this server.

Draining has no effect

The load balancer is not checking /health/ready, or it treats a down server by cutting its connections. Check its health monitor and its member-down behaviour.

Seat numbers look different on different servers

The servers are probably running different versions. Upgrade them all to the same version.

Every address in the audit log is the load balancer's

The load balancer is not in Trusted proxies, so DartRelay does not believe the client address it forwards. See Trusted proxies.

Still stuck? Email support@dartinnovations.com with what you were doing, what you expected and what you saw. A screenshot helps.