You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by scutting <sc...@messiah.edu> on 2020/09/24 17:12:09 UTC

Load balancing seems to not function

Hello, 

I have a guacamole server running on a Centos 7 box and have several RDP
connections setup in load balancing groups. I am not sure if the settings
are correct, but if the first machine in the list is down, Guacamole will
not proceed past it to attempt the next one. Is there a setting in the load
balancing configuration that I need in order for Guacamole to know that a
remote host is down and have it automatically proceed to the next one?



--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org


Re: Load balancing seems to not function

Posted by Nick Couchman <vn...@apache.org>.
On Mon, Sep 28, 2020 at 8:43 AM scutting <sc...@messiah.edu> wrote:

> Thank you both for your responses. Based on the information in the page
> that
> ivanmarcus provided, and confirmation from Nick, I have already begun work
> on a server-side script that will regularly check the status of all hosts
> in
> our environment and modify the weights based on the results of the check.
>
> It seems that the load balancing does not perform as I believe it should
> (on
> the healthy hosts).  I have the weights all set the same within a
> connection
> group, but when the group is selected, it seems to always start with the
> machine that is at the top of the list, rather than actually balancing the
> load across all hosts.  Is there something that am missing?
>
>
It's probably just a difference in algorithms between what you're expecting
and how we've implemented it.  The load balancing in Guacamole currently
operates most closely to a "Weighted Least Connection" (WLC) algorithm.  If
all weights are set to the same value, it is simply a "Least Connection"
algorithm.  That is, Guacamole Client will check the number of connections
for each of the members of the group and compare them, and then assign the
connection to you that has the least number of other users connected.  This
is multiplied by the weight of each connection (if the connections are
weighted) in order to determine which host should be preferred.  The actual
code that accomplishes this is here:

https://github.com/apache/guacamole-client/blob/0091bb1aea14c567c8166f0ed8eadf7c31b6bd6e/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/RestrictedGuacamoleTunnelService.java#L184-L212

So, if you are testing it with a single user/connection, you are very
likely to get the same connection each time.  There is also an "enable
session affinity" box that allows you to effectively pin the user session
to a particular connection for the duration of the user's login.

It sounds to me like you're expecting more of a Round-Robin/Weighted
Round-Robin algorithm, where the connections will be cycled through one
after the other, factoring in the connection weight to impact that
algorithm.  Adding different algorithms, including (W)RR has been on my
list of things to do for a while, but never quite bubbled up to the top.
There's a JIRA issue for it, but, alas, it has not received any attention
lately...

https://issues.apache.org/jira/browse/GUACAMOLE-322

-Nick

Re: Load balancing seems to not function

Posted by scutting <sc...@messiah.edu>.
Thank you both for your responses. Based on the information in the page that
ivanmarcus provided, and confirmation from Nick, I have already begun work
on a server-side script that will regularly check the status of all hosts in
our environment and modify the weights based on the results of the check.

It seems that the load balancing does not perform as I believe it should (on
the healthy hosts).  I have the weights all set the same within a connection
group, but when the group is selected, it seems to always start with the
machine that is at the top of the list, rather than actually balancing the
load across all hosts.  Is there something that am missing?

I appreciate your help!



--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org


Re: Load balancing seems to not function

Posted by Nick Couchman <vn...@apache.org>.
On Thu, Sep 24, 2020 at 4:06 PM ivanmarcus <iv...@yahoo.com.invalid>
wrote:

> I cannot comment directly because I've never used the facility myself,
> however the discussion around implementing this feature is extensive and
> may give you an insight as to whether it suits your use-case?:
>
> https://issues.apache.org/jira/browse/GUACAMOLE-102
>
> On 25/09/2020 5:12 a.m., scutting wrote:
>
> Hello,
>
> I have a guacamole server running on a Centos 7 box and have several RDP
> connections setup in load balancing groups. I am not sure if the settings
> are correct, but if the first machine in the list is down, Guacamole will
> not proceed past it to attempt the next one. Is there a setting in the load
> balancing configuration that I need in order for Guacamole to know that a
> remote host is down and have it automatically proceed to the next one?
>
> Guacamole Client itself does not do anything "health checks" on the
servers in a balancing group, and thus has no way of knowing that a
particular system is down.  If you want that sort of functionality you
would need to implement something that performs those health checks and
then updates the weight for a particular connection to a value that
de-prioritizes or disables that connection.

-Nick

Re: Load balancing seems to not function

Posted by ivanmarcus <iv...@yahoo.com.INVALID>.
I cannot comment directly because I've never used the facility myself, 
however the discussion around implementing this feature is extensive and 
may give you an insight as to whether it suits your use-case?:

https://issues.apache.org/jira/browse/GUACAMOLE-102


On 25/09/2020 5:12 a.m., scutting wrote:
> Hello,
>
> I have a guacamole server running on a Centos 7 box and have several RDP
> connections setup in load balancing groups. I am not sure if the settings
> are correct, but if the first machine in the list is down, Guacamole will
> not proceed past it to attempt the next one. Is there a setting in the load
> balancing configuration that I need in order for Guacamole to know that a
> remote host is down and have it automatically proceed to the next one?
>
>
>
> --
> Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
> For additional commands, e-mail: user-help@guacamole.apache.org
>