You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by takuya morita <mr...@gmail.com> on 2021/09/29 07:20:36 UTC

Please let me know how limit the connection.

Hi, Guacamole.
I'm Takuya.

Thanks for always answering my questions.

I can connect from one PC to multiple PCs at the same time using Guacamole.
Is there a setting that allows me to connect to only one PC at a time?

Re: Please let me know how limit the connection.

Posted by takuya morita <mr...@gmail.com>.
Are you referring to the parameter "POSTGRES_DEFAULT_MAX_CONNECTI
ONS_PER_USER"?

If so, I used docker to create a container with the value of
"POSTGRES_DEFAULT_MAX_CONNECTIONS_PER_USER" set to 1.
However, the maximum number of connections for one user was not set to 1.

2021年10月1日(金) 10:53 Mike Jumper <mi...@glyptodon.com>:

> You can. There is a global setting in guacamole.properties affecting all
> balancing groups, and a field visible when you edit the balancing group
> that affects only that individual balancing group.
>
> The above limits apply only when you connect to the balancing group. There
> are also other, per-connection limits that you can define that affect the
> individual connections (regardless of whether they are in a group).
>
> - Mike
>
> On Thu, Sep 30, 2021, 18:38 takuya morita <mr...@gmail.com> wrote:
>
>> I see.
>>
>> Does that mean I can't limit the connection to a single arbitrary
>> balancing group?
>>
>> 2021年10月1日(金) 10:18 Mike Jumper <mi...@glyptodon.com>:
>>
>>> On Thu, Sep 30, 2021, 17:55 takuya morita <mr...@gmail.com>
>>> wrote:
>>>
>>>> As it turns out, that setting did not achieve the behavior I wanted.
>>>>
>>>> I am trying with the following environment.
>>>>
>>>> Balancing group A ___ Balancing group B
>>>>                                   |_ Balancing group C
>>>>
>>>> Set "maximum connections per user" to 1 for all groups
>>>>
>>>> Is it possible that the setting is not working?
>>>>
>>>
>>> No, you cannot nest balancing groups. A balancing group will balance
>>> across its child connections only. It will not attempt to balance
>>> recursively across its entire subtree.
>>>
>>> - Mike
>>>
>>>

Re: Please let me know how limit the connection.

Posted by Mike Jumper <mi...@glyptodon.com>.
You can. There is a global setting in guacamole.properties affecting all
balancing groups, and a field visible when you edit the balancing group
that affects only that individual balancing group.

The above limits apply only when you connect to the balancing group. There
are also other, per-connection limits that you can define that affect the
individual connections (regardless of whether they are in a group).

- Mike

On Thu, Sep 30, 2021, 18:38 takuya morita <mr...@gmail.com> wrote:

> I see.
>
> Does that mean I can't limit the connection to a single arbitrary
> balancing group?
>
> 2021年10月1日(金) 10:18 Mike Jumper <mi...@glyptodon.com>:
>
>> On Thu, Sep 30, 2021, 17:55 takuya morita <mr...@gmail.com> wrote:
>>
>>> As it turns out, that setting did not achieve the behavior I wanted.
>>>
>>> I am trying with the following environment.
>>>
>>> Balancing group A ___ Balancing group B
>>>                                   |_ Balancing group C
>>>
>>> Set "maximum connections per user" to 1 for all groups
>>>
>>> Is it possible that the setting is not working?
>>>
>>
>> No, you cannot nest balancing groups. A balancing group will balance
>> across its child connections only. It will not attempt to balance
>> recursively across its entire subtree.
>>
>> - Mike
>>
>>

Re: Please let me know how limit the connection.

Posted by takuya morita <mr...@gmail.com>.
I see.

Does that mean I can't limit the connection to a single arbitrary balancing
group?

2021年10月1日(金) 10:18 Mike Jumper <mi...@glyptodon.com>:

> On Thu, Sep 30, 2021, 17:55 takuya morita <mr...@gmail.com> wrote:
>
>> As it turns out, that setting did not achieve the behavior I wanted.
>>
>> I am trying with the following environment.
>>
>> Balancing group A ___ Balancing group B
>>                                   |_ Balancing group C
>>
>> Set "maximum connections per user" to 1 for all groups
>>
>> Is it possible that the setting is not working?
>>
>
> No, you cannot nest balancing groups. A balancing group will balance
> across its child connections only. It will not attempt to balance
> recursively across its entire subtree.
>
> - Mike
>
>

Re: Please let me know how limit the connection.

Posted by Mike Jumper <mi...@glyptodon.com>.
On Thu, Sep 30, 2021, 17:55 takuya morita <mr...@gmail.com> wrote:

> As it turns out, that setting did not achieve the behavior I wanted.
>
> I am trying with the following environment.
>
> Balancing group A ___ Balancing group B
>                                   |_ Balancing group C
>
> Set "maximum connections per user" to 1 for all groups
>
> Is it possible that the setting is not working?
>

No, you cannot nest balancing groups. A balancing group will balance across
its child connections only. It will not attempt to balance recursively
across its entire subtree.

- Mike

Re: Please let me know how limit the connection.

Posted by takuya morita <mr...@gmail.com>.
As it turns out, that setting did not achieve the behavior I wanted.

I am trying with the following environment.

Balancing group A ___ Balancing group B
                                  |_ Balancing group C

Set "maximum connections per user" to 1 for all groups

Is it possible that the setting is not working?

2021年9月30日(木) 0:32 Mike Jumper <mi...@glyptodon.com>:

> On Wed, Sep 29, 2021, 08:26 takuya morita <mr...@gmail.com> wrote:
>
>> Thanks for your reply.
>>
>> When there is only one user, I think I can limit the number of
>> connections to one by setting the number of simultaneous connections to the
>> number of users (in this case, one) in the connection group settings.
>> However, I don't think this setting can limit the number of connections
>> to one for each user when there are multiple users.
>> I don't want one user to be able to have multiple connections at the same
>> time.
>>
>
> This is what the "maximum connections per user" setting does. If you set
> that value to 1, each unique user will only be able to have one connection
> open to that connection/group at any time.
>
> I believe this is already the default for balancing connection groups, to
> avoid any one user monopolizing the connections within the group.
>
> - Mike
>
>

Re: Please let me know how limit the connection.

Posted by Mike Jumper <mi...@glyptodon.com>.
On Wed, Sep 29, 2021, 08:26 takuya morita <mr...@gmail.com> wrote:

> Thanks for your reply.
>
> When there is only one user, I think I can limit the number of connections
> to one by setting the number of simultaneous connections to the number of
> users (in this case, one) in the connection group settings.
> However, I don't think this setting can limit the number of connections to
> one for each user when there are multiple users.
> I don't want one user to be able to have multiple connections at the same
> time.
>

This is what the "maximum connections per user" setting does. If you set
that value to 1, each unique user will only be able to have one connection
open to that connection/group at any time.

I believe this is already the default for balancing connection groups, to
avoid any one user monopolizing the connections within the group.

- Mike

Re: Please let me know how limit the connection.

Posted by takuya morita <mr...@gmail.com>.
Thanks for your reply.

When there is only one user, I think I can limit the number of connections
to one by setting the number of simultaneous connections to the number of
users (in this case, one) in the connection group settings.
However, I don't think this setting can limit the number of connections to
one for each user when there are multiple users.
I don't want one user to be able to have multiple connections at the same
time.

2021年9月29日(水) 23:53 Nick Couchman <vn...@apache.org>:

> On Wed, Sep 29, 2021 at 10:42 AM Mike Jumper <mi...@glyptodon.com>
> wrote:
>
>> On Wed, Sep 29, 2021 at 5:31 AM Nick Couchman <vn...@apache.org> wrote:
>>
>>> On Wed, Sep 29, 2021 at 3:21 AM takuya morita <mr...@gmail.com>
>>> wrote:
>>>
>>>> Hi, Guacamole.
>>>> I'm Takuya.
>>>>
>>>> Thanks for always answering my questions.
>>>>
>>>> I can connect from one PC to multiple PCs at the same time using
>>>> Guacamole.
>>>> Is there a setting that allows me to connect to only one PC at a time?
>>>
>>>
>>> I do not believe that there is any way currently to restrict a user to a
>>> maximum number of overall concurrent connections. You can restrict each
>>> connection or connection group such that users can only access the connect
>>> a single time, and you can set defaults on this that apply to all
>>> connections/connection groups which do not explicitly have a limit set, but
>>> I don't think you can limit the overall concurrent connections per user or
>>> client.
>>>
>>
>> There is an overall, absolute limit available via guacamole.properties
>> that can be enforced on connections defined through the database:
>>
>> https://guacamole.apache.org/doc/gug/jdbc-auth.html#jdbc-auth-concurrency
>> (See "mysql-absolute-max-connections",
>> "postgresql-absolute-max-connections", etc.)
>>
>> Setting that limit will restrict the total number of connections
>> maintained across the entire web application, regardless of which Guacamole
>> connections/groups are being used and regardless of which user(s) are using
>> them.
>>
>>
> My understanding from the original request was a limit to the number of
> connections that each user can have open at a time. So, it looks as if you
> can:
> * Restrict the total number of connections that all users of Guacamole can
> have open concurrently (total connection load)
> * On a per-connection or per-connection-group, restrict the number of
> times a user can be connected to that object.
>
> The ask is somewhere in between - restrict each user to a single session
> in the entirety of the Guacamole Client.
>
> -Nick
>
>>

Re: Please let me know how limit the connection.

Posted by Nick Couchman <vn...@apache.org>.
On Wed, Sep 29, 2021 at 10:42 AM Mike Jumper <mi...@glyptodon.com>
wrote:

> On Wed, Sep 29, 2021 at 5:31 AM Nick Couchman <vn...@apache.org> wrote:
>
>> On Wed, Sep 29, 2021 at 3:21 AM takuya morita <mr...@gmail.com>
>> wrote:
>>
>>> Hi, Guacamole.
>>> I'm Takuya.
>>>
>>> Thanks for always answering my questions.
>>>
>>> I can connect from one PC to multiple PCs at the same time using
>>> Guacamole.
>>> Is there a setting that allows me to connect to only one PC at a time?
>>
>>
>> I do not believe that there is any way currently to restrict a user to a
>> maximum number of overall concurrent connections. You can restrict each
>> connection or connection group such that users can only access the connect
>> a single time, and you can set defaults on this that apply to all
>> connections/connection groups which do not explicitly have a limit set, but
>> I don't think you can limit the overall concurrent connections per user or
>> client.
>>
>
> There is an overall, absolute limit available via guacamole.properties
> that can be enforced on connections defined through the database:
>
> https://guacamole.apache.org/doc/gug/jdbc-auth.html#jdbc-auth-concurrency
> (See "mysql-absolute-max-connections",
> "postgresql-absolute-max-connections", etc.)
>
> Setting that limit will restrict the total number of connections
> maintained across the entire web application, regardless of which Guacamole
> connections/groups are being used and regardless of which user(s) are using
> them.
>
>
My understanding from the original request was a limit to the number of
connections that each user can have open at a time. So, it looks as if you
can:
* Restrict the total number of connections that all users of Guacamole can
have open concurrently (total connection load)
* On a per-connection or per-connection-group, restrict the number of times
a user can be connected to that object.

The ask is somewhere in between - restrict each user to a single session in
the entirety of the Guacamole Client.

-Nick

>

Re: Please let me know how limit the connection.

Posted by Mike Jumper <mi...@glyptodon.com>.
On Wed, Sep 29, 2021 at 5:31 AM Nick Couchman <vn...@apache.org> wrote:

> On Wed, Sep 29, 2021 at 3:21 AM takuya morita <mr...@gmail.com>
> wrote:
>
>> Hi, Guacamole.
>> I'm Takuya.
>>
>> Thanks for always answering my questions.
>>
>> I can connect from one PC to multiple PCs at the same time using
>> Guacamole.
>> Is there a setting that allows me to connect to only one PC at a time?
>
>
> I do not believe that there is any way currently to restrict a user to a
> maximum number of overall concurrent connections. You can restrict each
> connection or connection group such that users can only access the connect
> a single time, and you can set defaults on this that apply to all
> connections/connection groups which do not explicitly have a limit set, but
> I don't think you can limit the overall concurrent connections per user or
> client.
>

There is an overall, absolute limit available via guacamole.properties that
can be enforced on connections defined through the database:

https://guacamole.apache.org/doc/gug/jdbc-auth.html#jdbc-auth-concurrency
(See "mysql-absolute-max-connections",
"postgresql-absolute-max-connections", etc.)

Setting that limit will restrict the total number of connections maintained
across the entire web application, regardless of which Guacamole
connections/groups are being used and regardless of which user(s) are using
them.

Michael Jumper
CEO, Lead Developer
Glyptodon Inc <https://glyp.to/>.

Re: Please let me know how limit the connection.

Posted by Nick Couchman <vn...@apache.org>.
On Wed, Sep 29, 2021 at 3:21 AM takuya morita <mr...@gmail.com>
wrote:

> Hi, Guacamole.
> I'm Takuya.
>
> Thanks for always answering my questions.
>
> I can connect from one PC to multiple PCs at the same time using Guacamole.
> Is there a setting that allows me to connect to only one PC at a time?


I do not believe that there is any way currently to restrict a user to a
maximum number of overall concurrent connections. You can restrict each
connection or connection group such that users can only access the connect
a single time, and you can set defaults on this that apply to all
connections/connection groups which do not explicitly have a limit set, but
I don't think you can limit the overall concurrent connections per user or
client.

-Nick