[ 
https://issues.apache.org/jira/browse/GUACAMOLE-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15932605#comment-15932605
 ] 

Nick Couchman commented on GUACAMOLE-102:
-----------------------------------------

Next up, let's talk algorithms....

Currently, looks like Guacamole uses a Least Connection algorithm in the 
balancing groups, despite my earlier assumptions and assertions that it was 
Round Robin.  Moving from Least Connection to Weighted Least Connection is 
relatively easy from an implementation perspective and should be a good initial 
step in resource-based load balancing.

So, a couple of larger questions open up here:
- As we think about implementing load balancing, do we want to stick with a 
single algorithm, or implement several of them and allow them to be selected?  
The following common ones come to mind: Least Connection, Weighted Least 
Connection, Round Robin, Weighted Round Robin, Least Recently Used, and 
Weighted Least Recently Used.
- At a higher level in dealing with load balancing, I believe active 
connections are currently not stored in the database (or wherever they are 
configured) and are completely in memory inside the Guacamole servlet.  This 
definitely works at this point; however, as you think about scaling out a load 
balancer, and the possibility of HA or balanced Guacamole instances, it may be 
worthwhile to implement tracking of active connections inside the DB itself.  
This would allow you to point multiple instances of Guacamaole at a single 
database, but still be able to track how many total active connections you have 
to a given connection or connection group.
- I believe currently in the JDBC connection, the connection history only gets 
updated when a connection ends.  If we implement algorithms like LRU and WLRU, 
we'd need to have the initial population of the connection history happen upon 
connection, and then an update at the end of the connection, so that the (W)LRU 
algorithms work correctly.  Obviously if we don't want to implement (W)LRU, 
this really isn't much of an issue.

> Load balancing based on resource
> --------------------------------
>
>                 Key: GUACAMOLE-102
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-102
>             Project: Guacamole
>          Issue Type: New Feature
>          Components: guacamole, guacamole-auth-jdbc, 
> guacamole-auth-jdbc-mysql, guacamole-auth-jdbc-postgresql, guacamole-client, 
> RDP
>    Affects Versions: 0.9.10-incubating
>         Environment: CentOS Linux 7 (Core)
> Linux 3.10.0-327.10.1.el7.x86_64
>            Reporter: Werner Novak
>            Priority: Minor
>
> Implementation of an resource based (CPU, Memory, I/O, Loggedin User) 
> balancing in opposite to the current implemented guacamole connections round 
> robin. This is needed because of an large RDP infrastructure (300+ TS), where 
> the terminal server been accessed via multiple RDP load balancers during 
> migration.
> A prototype has been developed in a guacamole fork
> https://github.com/wnovak/incubator-guacamole-client.git



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to