Skip to content

(Universal) Idling for DevWorkspace based workspaces #20345

Open
@l0rd

Description

@l0rd

Is your enhancement related to a problem? Please describe

Workspaces controlled by the che-server are shut down when inactive for a specific period of time (specified by the customCheProperty CHE_LIMITS_WORKSPACE_IDLE_TIMEOUT) but there is no way at the moment to automatically shut down Workspaces controlled by the devworkspace operator.

Describe the solution you'd like

Workspaces idling should work with DevWorkspaces too. A possible solution would be to use a mechanism similar to Knative autoscaling system: expose workspaces activity metrics (e.g. editor requests per second) and at che-server level collect those metrics and decide which DevWorkspaces need to be scaled to zero.

Activity metrics should be exposed by editors (theia, jetbrains, vscode) extensions.

Scale to zero for workspaces without an editor or for workspaces with an editors but without metrics is out of the scope of this epic.

Describe alternatives you've considered

Currently the Web Terminal supports idling using activity ticks sent from the Console to the machine-exec activity rest API. This approach has a few drawbacks: couples machine-exec and the component that tracks the activity, machine-exec requires privileges to scale the dw to zero.

Metadata

Metadata

Assignees

No one assigned

    Labels

    engine/devworkspaceIssues related to Che configured to use the devworkspace controller as workspace engine.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions