Session Host Server Teaming and Load Balancing
Session Team in HyWorks is a team or group of session host servers. Applications or desktop sessions are given from session host servers based on load balancing mechanism used in session server team configuration.
Manage session host servers team from Configuration > Server > Session Team.
Session Team Type: There are 2 types of teams:
-
Managed Team: This team is managed by HyWorks controller with provisioned session host pool, but administrator can change settings of teams and application assignments.
-
Un-managed Team: This is manually created and managed team, administrator can add, update and delete team manually.
Session teams can be created for Linux or Widows session host servers.
HyWorks Session Team Load Balancing
HyWorks Controller starts load balancing the sessions among the member session host servers once multiple servers are added to a single session team.
HyWorks Controller supports following types of load balancing:
-
Weighted Round Robin
-
Weighted Least Connection
-
Adaptive
Weighted Round Robin
Round Robin refers to a mechanism where sessions are given one by one from all servers, but in HyWorks the Weighted Round Robin load balancing uses a unique formula, where the load balancing is done in following manner:
Weighted Round Robin Load Balancing Mechanism
-
While adding session host servers to session team with Load Balancing Type as Weighted Round Robin, weight of each server is taken. The weight could be a number ranging from 2 to 100.
-
Controller performs addition of weight of all servers and stores this number and assigns a range to each server e.g. three session host servers say srv1, srv2 and srv3 are added with weight 10, 50 and 100 respectively. Then number range for each server could be:
-
Sum of weights = 10 + 50 + 100 = 160
-
Srv1 (Weight = 10): Range 1 -- 10
-
Srv2 (Weight = 50): Range 11 -- 60
-
Srv3 (Weight = 100): Range 61 -- 160
-
-
Whenever any session requests (Application/ Shared Hosted Desktop Session) comes to controller
-
Controller picks a random number between 1 to sum of weight of all servers (in above example number could be 1 to 160)
-
Controller verifies, picked number falls in which range and that range belongs to which session host server
-
Session is given from session host server in whose range the picked number falls
-
-
On every session request, the same process is repeated.
-
Starting version 3.3, HyWorks will select a random server in case weight of 2 or more server is same
Session Stickiness in Application Delivery in Remote App Mode
If applications are configured to be delivered in Remote Application mode, which means all the application sessions will be running in single RDS session, then controller stores the session host server details from where the application has been served.
If another application session request comes which can be delivered from the same server, then controller ignores the load balancing and provide the application sessions from the same server.
The phenomenon is called the session stickiness and is applicable only in application delivery in Remote App mode.
Reconnection (Shared Hosted Desktop Session and Application Sessions in Remote App Mode)
Another important phenomenon in HyWorks Controller, where controller will ignore load balancing mechanism is Reconnection.
In cases, when user's shared hosted desktop session or application sessions in Remote App mode is already lying in running or disconnected mode, then Controller ignores the load balancing and first provides the reconnection of same desktop or remote application sessions to the users.
Application Delivery in Shell Mode and True Load Balancing
As application delivery in Shell mode, launches each application session in new RDS session, HyWorks Controller does not consider session stickiness or reconnection phenomenon and calculates the most suitable session host server as per its Weighted Round Robin mechanism every time.
The application delivery in Shell mode is termed as True load balancing.
Cases in Which Controller Won't Provide Session from Eligible Session Host Servers
In few cases controller does not provide session from eligible session host server and recalculates the suitable session host server based on Weighted Round Robin load balancing mechanism, following is the list of such cases:
-
Session Host Server is down: Controller monitors the availability of each session host server and if session host server goes unreachable, it does not give session from that server though, session may fall in the range of eligible server.
-
Session Host Agent Service is down: If controller cannot communicate with session host server then also sessions from that server will not be given.
-
Session Host Service is inactive: If session host server is made inactive then sessions from that server will not be given.
-
CPU or RAM Threshold Reached: In session team if Limit session is enabled and memory or CPU or both resource utilization has crossed specified limit then, sessions from that respective session host server will not be given.
-
Limit of No. of Application Instances Per Server Has Reached: If number of application instances per server is configured and number of application sessions from one session host server has already reached, while providing that application session, then the server which has already reached the limit will be skipped and session from other servers will be given.
-
Max Session Limit is reached: HyWorks controller will stop giving new sessions to session host server, if it has reached Max session count.
Weighted Least Connection
Weighted least connection in HyWorks provides sessions from session host servers using following mechanism:
Weighted Least Connection Load Balancing Mechanism
-
While adding session host servers to session team with Load Balancing Type as Weighted Least Connection, weight of each server is taken. The weight could be a number ranging from 2 to 100.
-
Score for each server is calculated using the following formula and server with least connection will be given the sessions:
Score Calculation Formula: (No. of Sessions x 10000)/Weight
-
Whenever any session requests (Application/ Shared Hosted Desktop Session) comes to controller
-
With zero sessions, the score of session host server will also be zero (displayed as Hyphen "- ")
-
If all session host servers are having zero (-) score, controller will pick any session host server randomly to provide session
-
With one server is having zero sessions and zero (-) score, then that server will be used first
-
-
Once at least one session from each of the session host server is provided, then controller will check the score to provide the next session.
-
If servers are having same score, then again controller will randomly pick one of the session host server
-
If not having same score, then session from server with least score will be provided.
-
-
-
On every session request, the same process will be repeated.
Session Stickiness in Application Delivery in Remote App Mode
Session stickiness mechanism is same as the one specified for Weighted Round Robin and indicated in section Session Stickiness in Application Delivery in Remote App Mode
Reconnection (Shared Hosted Desktop Session and Application Sessions in Remote App Mode)
Reconnection mechanism in Weighted Least Connection will work in the same manner as being used in Weighted Round Robin load balancing mechanism. Refer Reconnection (Shared Hosted Desktop Session and Application Sessions in Remote App Mode)
Cases in Which Controller Won't Provide Session from Eligible Session Host Servers
Controller skips providing sessions from session host server in specific cases mentioned in detail in section Cases in Which Controller Won't Provide Session from Eligible Session Host Servers
Adaptive Load Balancing
Adaptive load balancing in HyWorks refers to mechanism for sessions from team of session host servers based on current load (CPU/Memory) consumption.
In Adaptive load balancing controller continuously updates its database with CPU and memory consumption of session host servers using monitoring service running on session host servers.
Score of each session host server is calculated based on current CPU and memory consumption and session is provided from session host server with least score.
Important
Adaptive load balancing should not be configured for Linux Session Teams, as Linux session host server does not have monitoring service integration.
Score Calculation Formula: CPU (%) + Memory (%)
Note
Monitoring service on session host server sends an average of last 3 memory and CPU usage in every 30 seconds and then sends the data to controller in every 30 seconds. Which means the controller uses a little old data, but this also helps in avoiding intermittent spikes in CPU or memory usage.
Adaptive Load Balancing Mechanism
-
Score for each server is calculated using the following formula and server with least connection will be given the sessions:
Score Calculation Formula: CPU (%) + Memory (%)
-
Whenever any session requests (Application/ Shared Hosted Desktop Session) comes to controller
-
If servers are having same score, then controller will randomly pick one of the session host servers
-
If not having same score, then session from server with least score i.e. server with least consumption will be provided.
-
-
On every session request, the same process will be repeated.
Session Stickiness in Application Delivery in Remote App Mode
Session stickiness mechanism is same as specified in section Session Stickiness in Application Delivery in Remote App Mode
Reconnection (Shared Hosted Desktop Session and Application Sessions in Remote App Mode)
Reconnection mechanism in Adaptive Load Balancing will work in the same manner as being used in Weighted Round Robin load balancing mechanism. Refer Reconnection (Shared Hosted Desktop Session and Application Sessions in Remote App Mode)
Cases in Which Controller Won't Provide Session from Eligible Session Host Servers
Controller skips providing sessions from session host server in specific cases mentioned in detail in section Cases in Which Controller Won't Provide Session from Eligible Session Host Servers
In addition to the cases mentioned above monitoring service (and resource consumption) becomes the critical and can affect session host server selection in following manger:
- Sessions will not be provided if Monitoring Service is down: Monitoring service is not considered in Weighted Round Robin and Weighted Least Connection load balancing types, but if session team is using Adaptive load balancing and monitoring service is not running on specific Session Host Server then sessions from that session host server will be skipped.
Default Teams
As specified in Organization section, that every organization has two default session teams: one for Windows session host servers and other for Linux session host servers
-
Default team cannot be deleted.
-
If any session team is deleted, then all session host servers of that team are moved to default teams
Default Team Configurations
The default configurations of default team in root (default) organization is as follows:
-
Team Name: Windows Default/ Linux Default
Note
-
If the organization is admin created organization, then the name of default team of that organization will follow below naming convention: Default Team_\<OrgName> e.g. if organization name is Accops, then name of the default team of organization Accops will be: Default Team Accops.
-
Modifying the organization name does not modify the name of default team.
-
-
Team Type: Shared Session Host (Read-Only)
-
Load Balancing Type: Weighted Least Connection
-
Limit session: Not enabled
-
Session Provider: List of session host servers (if any)
-
Applications: List of applications (if any)
Viewing Session Team Members and Management Options
Clicking on the session team name, opens page displaying all member session host servers and displaying some essential information to administrator:
-
At Title bar along with team name, load balancing type is specified
-
Displaying lists of session host servers with following details:
-
Name: Name of session host server
-
Address: IP or hostname of session host server
-
Version: Version of HyWorks Session Host Server module
-
Active: Show server is active or not
-
Server Status: If session host server is reachable on specified RDP port
-
Session Host Agent Status: If session host server module is up and running
-
Monitoring Service Status: Reachability of monitoring service from HyWorks Controller
-
Session Mode: Is new session is allowed or not on server
-
RDS Sessions: Number of application or shared hosted desktop sessions on session host server
-
CPU (%): CPU (%) usage on session host server
-
RAM (%): RAM (%) usage on session host server
-
Disk (%): Disk (%) utilization on session host server
-
Score: Current score of session host server (Calculated and displayed for load balancing types, Weighted Least Connection and Adaptive)
-
Weight: Weight of session host server (Weight is configured while adding session host server into team with load balancing type as Weighted Round Robin or Weighted Least Connection.
-
Administrator can use this information to analyze the overall status of the session host server, especially information of server status, session host agent and monitoring service status, sessions, resource (RAM, CPU and Disk) are important and should be monitored regularly.
Session Host Server Operations from Session Teams Page
Following options can be performed on Session Host Servers from Session Teams page:
-
Upgrade Session Host Server
-
Download Session Host Server Logs
Upgrade Session Host Server
Session Host Servers upgrade can be initiated from HyWorks Controller Management Console. Following prerequisites should be fulfilled to perform session host upgrade successfully from management console:
Prerequisites:
-
Session Host Server Agent is up and running
-
Session host upgrade file is available on HyWorks Controller (Usually copied during HyWorks Controller upgrade, but if provided separately, then should be copied at the following location:
< HyWorks Controller Installation Directory>/Accops/HyWorks/Service/SessionHost/
Below is the default location:
C:\Program Files (x86)\Accops\HyWorks\Service\SessionHost
Upgrade Process:
Once all the prerequisites are fulfilled, upgrade process is very simple as described below:
-
Select session host server to be upgraded from the list
-
Click Upgrade
-
Confirm Action dialog will be displayed, with following details:
-
If remote sessions exist on selected session host server, then it will prompt error for remote sessions and administrator must remove all sessions from server before initiating upgrade.
-
If no remote sessions exist on session host server then Confirm Action dialog will be displayed.
Important
-
Having existing remote sessions on session host server could affect installation of HyWorks components and it's recommended to logout all sessions before upgrade
-
Once upgrade is initiated no more sessions will be allowed on the respective session host server.
-
-
Confirm the upgrade option by clicking Upgrade
-
All remote sessions will be removed, and upgrade will be initiated
-
Refresh the session teams page to check the status of session host server upgrade
-
Session host server will go into maintenance mode for upgrade to avoid any connection requests during upgrade and after successful upgrade
-
-
Version of session host server should now be displaying newer version.
-
Check logs for more details on session host upgrade
Download Session Host Server Logs
Administrator can download the session host server logs from Session Teams page. To download session host server logs, follow the below steps:
-
Go to Server > Session Teams
-
Click Session Team name to view list of session host servers
-
Select the session host server
-
Click Download Logs
Logs will be downloaded in zipped format and success status will be shown.
Add New Session Team
-
Go to Server > Session Teams
-
Click Add Team
-
Provide the following details in Session Team Basic Info:
-
Team for: Select from option Windows/ Linux based on type of session host servers to be added into this team
-
Team Name: Any logical name for the new session team, following special characters are supported in Team Name field: _ SPACE () {} # @ : -
-
Team Type: Read-only field and default value is Shared Session Host
-
-
Following details to be filled in Load Balancing
-
Load Balancing Type: Select appropriate Load Balancing Type, following types of load balancing is supported
-
Weighted Round Robin
-
Weighted Least Connection
-
Adaptive
Refer HyWorks Session Team Load Balancing for details.
-
-
Limit session: Enable Limit session option to stop providing sessions from session host server reaching the either of the following two configurations
-
CPU Max Limit
-
RAM Max Limit
-
-
-
Assign application to team from Application Tab
- To add application click Add. select one or more applications from list and click Save.
- To remove selected application, select application(s) and click Remove Apps.
-
Click Save
New session team will be created and will be displayed in Session Teams page. The team now will also be displayed in Session Provider section while adding the Shared Session Host.
Modify Session Team
-
Go to Server > Session Teams
-
Select session team to be modified
-
Click Edit
-
Change the configurations as needed in Edit Session Team wizard, following configurations can be changed:
-
Session Team Basic Info tab:
-
Team Name
-
Power Management Mode (for managed teams)
-
-
Load Balancing tab:
-
Load Balancing Type
-
Limit session
-
-
Session Provider tab:
-
The list of session provider is shown
-
Status of each session provider is shown
-
It is possible to do following settings on session providers
-
Make Active or In-Active
-
Change the Weight of the server (Applicable for 'Not managed' session teams only)
-
Change Max Sessions (For 'Not managed' team only)
-
-
-
Application Tab:
- Add or remove applications to the team
-
-
Click Save
Session teams' configurations will be modified, and controller will start using new configurations from next session. Team information will be updated in all associated configurations e.g. Session Providers, Desktop Pools etc.
Impact of Changing Session Team Configurations
Changing Load Balancing Type could affect the configuration of the member session host servers in the following manner. Consider the following scenario:
-
Two session host servers are added into a session team (with adaptive Load balancing).
Note
- Adding session host servers into Adaptive load balancing team, it does not require any weight configuration, on the other hand configuration of Weighted Round Robin or Weighted Least Connection requires weight configuration.
-
Now if administrator is changing the load balancing type from Adaptive to Weighted Round Robin or Weighted Least Connection then session host servers will be required to have some weight configuration.
-
Impact on Member Session Providers: Default weight of a session host server will be set to 100 in following conditions
-
Load Balancing Type of session team is changed from Adaptive to Weighted Least Connection
-
Load Balancing Type of session team is changed from Adaptive to Weighted Round Robin
-
-
Impact on Associated Users (Built-In): No adverse impact is expected on user/group configuration.
-
Impact on running session: No adverse effect is expected
-
Impact on Built-in User Association: No adverse effect
-
Impact on Desktop Pools: No adverse effect
Delete Session Team
Administrator can delete a session team from Session Teams page, but default teams and managed teams cannot be deleted.
-
Go to Server > Session Teams
-
Select session team to be deleted
-
Click Delete
-
Confirm Action dialog will be displayed, click on Delete button to continue deleting the session team.
-
Session Team will be deleted and following impact could be there:
-
Impact on Member Session Providers:
-
Session host servers, members of deleted session team will move to Default session team
-
Default weight of a session host servers will be set to 100 in following conditions
-
Admin configured session team with Load Balancing Type as Adaptive is deleted and default team is of type Weighted Least Connection
-
Admin configured session team with load balancing type as Adaptive is deleted and default team is of type Weighted Round Robin
-
-
-
Impact on Associated Desktop Pools:
-
Desktop Pools will be deleted, and users won't be able to get new sessions from the same team (member session host servers) any more
-
Running sessions won't get disconnected/ removed
-
-
Impact on Applications:
- Applications and entitlements will remain same
-
Impact on Built-in users:
- Built-in Users association with session team will be deleted and thus the user accounts won't be able to get any new sessions. Pl. Note this behavior is for Built-in users only.
-
Add Session Host Server into Session Team
Session Host servers can be added into session teams from Session Provider section using Add or Edit Session Provider wizards.
Session host servers will get added to session team selected in Add/Edit Session Provider wizard -- Session Team dropdown.
Note
Session host servers can only be added into admin created session teams and can not be added into provisioned session teams.
RDP Throttling
In RDP launch from server, if number of session launch from same server at very high rate then windows server may give RDP busy message and session will not be launched. The error remote desktop service is busy visible in the RDP and windows will not to create new session.
This feature allows spacing before new RDP connection on same server. Advance setting flag for RDP throttling, Search RDP throttling (under Session Management group) and set value in millisecond , default value is 0 means no throttling.
Example:
-
Throttle Time is 2000 millisecond and load balancing type is Least Connection for a team
-
Application1 is published from Server1, Server2, Server3.
-
Each server having 10 running sessions.
-
Now added new server(server4 in team) and assigned same application and has no session running on the server.
-
User1 launches Application1 then HyWorks controller choose server4, because Server4 having least connection than the other servers in team.
-
User2 trying to launch same Application1 in next 1000 millisecond.
-
Then Hyworks will not select Server4, since 2000 milisecond spacing window yet to complete and it will chose next best least connection server.
Condition: If no server found if sessions launched from all servers in throttle time. So to manage this condition, added one more control flag, called Strict Remote Desktop Throttling.
Strict Remote Desktop Throttling: In RDP throttling if there is no server that meet the throttling criteria then HyWorks controller will not provide session. If this value is false then throttling criteria will not be enforced and next least available server will be provided .
To manage Strict Remote Desktop Throttling, go to advance settings-> search for Strict Remote Desktop Throttling flag under Session Management group.
RDP Throttling having many different scenario:
-
Application launch mode is either Remote App or Shell App from connection profile.
-
Application either launch in existing WTS session or create new WTS session for same user,
-
Strict Mode is on or off for RDP throttling.
Based on above scenario, HyWorks will check for RDP throttling and retry or reject connection, Check below table for more details.
Max connection on session host server
This feature allow maximum RDP connection from particular server. This will limit connection from server. If value is zero then will provide unlimited connection. default value is zero.
This feature useful to avoid server being over-utilized.
To enable this feature go to Advance settings -> search for Max connection on session host server under Session Management group.
Exporting Session Teams
HyWorks Controller v3.3 is having option to export CSV of all teams in current organization from management console. To export CSV of session teams:
-
Go to HyWorks Controller Management Console -> Server -> Session Teams
-
Click Export
-
Select Encoding type and columns
-
Click Export
-
CSV with details of all session teams will be downloaded.