Server Load Balancing

Introduction

The purpose of this document is to discuss the server load balancing solution and to provide some guidance on how they should be configured.

Important Considerations

Sticky Load Balancing
The primary consideration when configuring load balancing for server is that the load balancer must be configured to be ‘sticky’. Once a new session is started, a client session must have all HTTP interactions with the same server for the duration of the session. This is because the Telnet socket used by server to connect to the host cannot be shared between servers.

Load Balance Algorithm
Generally, we would recommend starting with a round-robin approach and monitoring the load on each server. The health monitor (see below) can help to ensure an even spread of the load.

Health Monitoring
The terminal emulator comes with a HTTP request that can be called by the load balancer to check on the health of the server (see Health Monitor Configuration below). If a server has all sessions in use, its health request will report that situation.

Minimum Servers
If your load balancer allows for managing the situation where all servers are ‘unhealthy’, then you should configure it so that one server always responds to requests. This will ensure that users see the ‘No sessions available’ error in the terminal emulator rather than receiving an HTTP 503 error.

Health Monitor Configuration

The URL for the health monitoring page is:

http:///FVTerm/FVHealth.aspx

There are 4 possible responses:

  • HTTP error or no response The server is offline.
  • ACTIVE – n Sessions Available The server is available and can accept n additional connections.
  • ON HOLD The server is currently on hold and will not accept new connections.
  • ALL SESSIONS IN USE The server is available but cannot accept any further connections.
  • Here is an example of the response returned by FVHealth.apsx:

    
    
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>>title>
     Check Health
    </title></head>
    <body>
        <div>
             Server=<span id="lblStatus">ALL SESSIONS IN USE</span>
        </div>
    </body>
    </html>
    
    
    

    Generally, looking for the string ‘ACTIVE’ in the response should serve to distribute requests to healthy servers.

    Using the F5 Load Balancer

    Introduction
    The following information should be taken as recommendations only. Consult your local F5 administrator for your local policies and procedures.

    Health Monitoring An F5 HTTP monitor, the request might look something like this:

    GET /FVTerm/FVHealth.aspx HTTP/1.1\r\nHost: host.domain.com\r\nConnection: Close\r\n

    Again, looking for the string ‘ACTIVE’ in the response should allow requests to be distributed to healthy servers.

    Session Persistence
    Configure a unique cookie for FVTerm, select ‘HTTP Cookie Insert’ as the cookie type and ensure it is a ‘Session Cookie’ rather than setting an expiry time.

    Placing a Server On Hold

    Servers can be placed on hold so that they will not accept new connections. This behaviour is useful if one or more servers needs to be taken down for some reason.

    Activating On Hold
    You can place a server on hold from the Administration console:

    When a server is on hold, any new connection from FVTerm will see a message indicating that the server is not accepting connections:

    The response from FVHealth.aspx (see above) will also reflect the on hold status.

    Deactivating On Hold You can bring a server back into service from the Administration console:

    Viewing Active Sessions
    Active sessions can be viewed in the Administration console. There are two settings under Admin Client settings that will make it easier to see how many active sessions there are on a server:

    Display Sessions – this range should be set to cover the maximum number of sessions allowed by the license on your server e.g. if your server is licensed for 500 sessions, then this range should be 1..500 or you will not be able to see all of your sessions.

    Active Sessions Only – checking this check box means that only active sessions will be displayed in the session view. If your server is licensed for a large number of sessions, checking this will make it easier to see when all sessions have logged off.