Bug 8568 - Suggested agent list remains unchanged across session startup attempts
Summary: Suggested agent list remains unchanged across session startup attempts
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: VSM Server (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.19.0
Assignee: Tobias
URL:
Keywords: prosaic, samuel_tester
Depends on:
Blocks:
 
Reported: 2025-04-08 09:55 CEST by Tobias
Modified: 2025-04-22 12:59 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:
MUST: * Suggested agent list must update in between session attempts * Previously failed agents must be discarded * A grace period must strike a good balance between not overloading the session store and sufficiently updated agent lists


Attachments

Description Tobias cendio 2025-04-08 09:55:39 CEST
When a new session is requested, the load balancer suggests a list of agents to try based on the load balancer's criteria. This list however is stale across agent connection attempts, which is not ideal in particular during login storms where circumstances may change rapidly.
Comment 1 Tobias cendio 2025-04-08 09:59:49 CEST
The load balancer has been simplified (bug 4429) to base user distribution solely on current number of ThinLinc users. Acquiring this number requires requesting the session store for all public session data -- a request that one should be careful of repeating with high frequency.

Considering these attempts are likely separated in the order of 10s of seconds apart, depending on the agent problem, this kind of session store requests should not be too frequent to be an issue.
Comment 2 Tobias cendio 2025-04-08 11:08:28 CEST
If feedback from the agent is quick, i.e. for whatever reason session startup fails within a second or so, requesting an updated list of agents to try is likely not warranted and may approach dangerous levels of session store requests.

By virtue of that, a grace period within which the agent list is considered sufficiently fresh would be good. That way, we'd still be addressing the problem with long timeouts but avoid unpalatable side effects with short timeouts.
Comment 5 Tobias cendio 2025-04-08 16:17:39 CEST
>MUST:
>* Suggested agent list must update in between session attempts
✅︎ Yes, given we're past the short grace period. 
>* Previously failed agents must be discarded
✅︎ They are.
>* A grace period must strike a good balance between not overloading the session store and sufficiently updated agent lists
✅︎ It does. A grace period of 5 seconds was added, which should be sufficiently long to never overload the session store but short enough to catch any rapid agent user distribution changes.
Comment 6 Samuel Mannehed cendio 2025-04-10 13:20:59 CEST
Reopening due to some code-review comments.
Comment 13 Tobias cendio 2025-04-16 14:53:32 CEST
(In reply to Samuel Mannehed from comment #6)
> Reopening due to some code-review comments.

Reported issues have been addressed.
Comment 14 Samuel Mannehed cendio 2025-04-22 12:59:03 CEST
Looks good. Tested on a cluster with 3 CentOS 8 agents. This is a nice little improvement.

Note You need to log in before you can comment on or make changes to this bug.