Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce backend load created from session trackers #42324

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

rosstimothy
Copy link
Contributor

@rosstimothy rosstimothy commented Jun 3, 2024

Session trackers were originally added to facilitate joining sessions and enforcing moderation policies. When a session is created, a new tracker is written to the backend and a background routine is spawned to periodically update the status of the tracker until the session is terminated. This can cause a massive amount of backend activity for a cluster that is spawning large quantities of sessions per second. While in most cases where humans are starting the sessions this isn't a problem, any machine id heavy use cases could trigger backend throttling. Since non-interactive sessions and sessions started by tbot are not meant to be joined or moderated, the existence of a session tracker for them doesn't provide much benefit, especially now that session recordings are disabled for non-interactive sessions. To prevent excess backend writes session trackers are no longer created for non-interactive and tbot sessions.

changelog: reduce backend writes incurred by tracking status of non-recorded sessions.

@rosstimothy rosstimothy added backport/branch/v14 no-changelog Indicates that a PR does not require a changelog entry backport/branch/v15 backport/branch/v16 labels Jun 3, 2024
@rosstimothy rosstimothy force-pushed the tross/non_interactive_trackers branch 2 times, most recently from 0400e4c to 92fd283 Compare June 3, 2024 21:26
@rosstimothy rosstimothy marked this pull request as ready for review June 3, 2024 22:09
@github-actions github-actions bot requested review from camscale and ravicious June 3, 2024 22:09
@rosstimothy rosstimothy changed the title Reduce backed load created from session trackers Reduce backend load created from session trackers Jun 3, 2024
lib/srv/sess.go Outdated Show resolved Hide resolved
Session trackers were originally added to facilitate joining
sessions and enforcing moderation policies. When a session is
created, a new tracker is written to the backend and a background
routine is spawned to periodically update the status of the tracker
until the session is terminated. This can cause a massive amount
of backend activity for a cluster that is spawning large
quantities of sessions per second. While in most cases where
humans are starting the sessions this isn't a problem, any machine
id heavy use cases could trigger backend throttling. Since
non-interactive sessions and sessions started by tbot are not
meant to be joined or moderated, the existence of a session
tracker for them doesn't provide much benefit, especially now that
session recordings are disabled for non-interactive sessions. To
prevent excess backend writes session trackers are no longer
created for non-interactive and tbot sessions.
@rosstimothy rosstimothy force-pushed the tross/non_interactive_trackers branch from 854a9ce to d7384e1 Compare June 4, 2024 16:38
@rosstimothy rosstimothy enabled auto-merge June 4, 2024 16:41
@rosstimothy rosstimothy removed the no-changelog Indicates that a PR does not require a changelog entry label Jun 4, 2024
@rosstimothy rosstimothy added this pull request to the merge queue Jun 4, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 4, 2024
@rosstimothy rosstimothy added this pull request to the merge queue Jun 4, 2024
Merged via the queue into master with commit fb64a67 Jun 4, 2024
38 of 39 checks passed
@rosstimothy rosstimothy deleted the tross/non_interactive_trackers branch June 4, 2024 17:25
@public-teleport-github-review-bot

@rosstimothy See the table below for backport results.

Branch Result
branch/v14 Failed
branch/v15 Failed
branch/v16 Create PR

rosstimothy added a commit that referenced this pull request Jun 10, 2024
Session trackers were originally added to facilitate joining
sessions and enforcing moderation policies. When a session is
created, a new tracker is written to the backend and a background
routine is spawned to periodically update the status of the tracker
until the session is terminated. This can cause a massive amount
of backend activity for a cluster that is spawning large
quantities of sessions per second. While in most cases where
humans are starting the sessions this isn't a problem, any machine
id heavy use cases could trigger backend throttling. Since
non-interactive sessions and sessions started by tbot are not
meant to be joined or moderated, the existence of a session
tracker for them doesn't provide much benefit, especially now that
session recordings are disabled for non-interactive sessions. To
prevent excess backend writes session trackers are no longer
created for non-interactive and tbot sessions.
rosstimothy added a commit that referenced this pull request Jun 10, 2024
Session trackers were originally added to facilitate joining
sessions and enforcing moderation policies. When a session is
created, a new tracker is written to the backend and a background
routine is spawned to periodically update the status of the tracker
until the session is terminated. This can cause a massive amount
of backend activity for a cluster that is spawning large
quantities of sessions per second. While in most cases where
humans are starting the sessions this isn't a problem, any machine
id heavy use cases could trigger backend throttling. Since
non-interactive sessions and sessions started by tbot are not
meant to be joined or moderated, the existence of a session
tracker for them doesn't provide much benefit, especially now that
session recordings are disabled for non-interactive sessions. To
prevent excess backend writes session trackers are no longer
created for non-interactive and tbot sessions.
github-merge-queue bot pushed a commit that referenced this pull request Jun 11, 2024
Session trackers were originally added to facilitate joining
sessions and enforcing moderation policies. When a session is
created, a new tracker is written to the backend and a background
routine is spawned to periodically update the status of the tracker
until the session is terminated. This can cause a massive amount
of backend activity for a cluster that is spawning large
quantities of sessions per second. While in most cases where
humans are starting the sessions this isn't a problem, any machine
id heavy use cases could trigger backend throttling. Since
non-interactive sessions and sessions started by tbot are not
meant to be joined or moderated, the existence of a session
tracker for them doesn't provide much benefit, especially now that
session recordings are disabled for non-interactive sessions. To
prevent excess backend writes session trackers are no longer
created for non-interactive and tbot sessions.
github-merge-queue bot pushed a commit that referenced this pull request Jun 11, 2024
Session trackers were originally added to facilitate joining
sessions and enforcing moderation policies. When a session is
created, a new tracker is written to the backend and a background
routine is spawned to periodically update the status of the tracker
until the session is terminated. This can cause a massive amount
of backend activity for a cluster that is spawning large
quantities of sessions per second. While in most cases where
humans are starting the sessions this isn't a problem, any machine
id heavy use cases could trigger backend throttling. Since
non-interactive sessions and sessions started by tbot are not
meant to be joined or moderated, the existence of a session
tracker for them doesn't provide much benefit, especially now that
session recordings are disabled for non-interactive sessions. To
prevent excess backend writes session trackers are no longer
created for non-interactive and tbot sessions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants