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

Workspace instances should have a max lifetime #7318

Closed
csweichel opened this issue Dec 20, 2021 · 5 comments · Fixed by #8307
Closed

Workspace instances should have a max lifetime #7318

csweichel opened this issue Dec 20, 2021 · 5 comments · Fixed by #8307
Assignees
Labels
aspect: security Anything related to preventing vulnerabilities team: workspace Issue belongs to the Workspace team type: feature request New feature or request

Comments

@csweichel
Copy link
Contributor

csweichel commented Dec 20, 2021

Is your feature request related to a problem? Please describe

At the moment workspace instances can run an indefinite amount of time. This causes operational issues during cluster updates, and is seldom desired behaviour considering the ephemeral nature of Gitpod workspaces.

Describe the behaviour you'd like

Workspace instances should have a maximum lifespan after which they're shut down automatically. This shall be very large, 72 hours, so as to not impact users regularly.

Note: this affects workspace instances, i.e. your workspace would shut down and could be restarted immediately, much like a regular timeout.

Describe alternatives you've considered

Instead of making this general behaviour we could handle this on a case-by-case basis, but that makes Gitpod's behaviour less predictable and harder to communicate.

@csweichel csweichel added type: feature request New feature or request team: workspace Issue belongs to the Workspace team labels Dec 20, 2021
@atduarte
Copy link
Contributor

This is lifespan must be very large, e.g. two days (48h)

Just wanted to reiterate this as we don't want to invalidate Data Science use cases. I feel 2 days is reasonable [1] but believe we should research further.

@kylos101 kylos101 moved this to Scheduled in 🌌 Workspace Team Feb 1, 2022
@kylos101 kylos101 removed the status in 🌌 Workspace Team Feb 1, 2022
@atduarte
Copy link
Contributor

atduarte commented Feb 2, 2022

After some research I believe 2 days is reasonable, and we could go with 36 hours.

First, looking at the SaaS data from this year, we only had 0.00035% of the workspace instances living for more than 48 hours. If we were to set the max lifetime to 36h it would impact 0.0005%. And 24h, 0.017%.

Percentile Minutes
.5 17
.9 121
.999 769
.99999 3829

Additionally, from what I gathered most data science workloads would perfectly (!) fit in the 36h timeframe. In the cases it does not probably Gitpod SaaS is not appropriate, and better workspace resources or parallelisation is needed.


What would the experience be in those 0.00035% cases? Could we send an email to the user before the workspace is shutdown?

@kylos101
Copy link
Contributor

kylos101 commented Feb 9, 2022

@jldec hey there 👋 ,

@atduarte brings up an interesting point Re: setting user expectations if we forcibly stop a workspace due to it exceeding the max lifetime.

Notifying the end-user somehow feels like a feature that would live in a WebApp cluster. WDYT?

@atduarte in the meantime, I am going to schedule this, so that we get a configurable 3 day limit set.

@kylos101 kylos101 moved this to Scheduled in 🌌 Workspace Team Feb 9, 2022
@kylos101 kylos101 added the aspect: security Anything related to preventing vulnerabilities label Feb 9, 2022
@princerachit
Copy link
Contributor

Note: this affects workspace instances, i.e. your workspace would shut down and could be restarted immediately, much like a regular timeout.

Which component should trigger the shutdown? Can we inject some code in the workspace it self to shutdown or do you propose to do this via ws-daemon or ws-manager?

@princerachit princerachit self-assigned this Feb 17, 2022
@csweichel
Copy link
Contributor Author

it would be ws-manager - we already have timeouting behaviour for various workspace phases. This would basically add one for RUNNING (next to and independently of the heartbeating mechanism)

@princerachit princerachit moved this from Scheduled to In Progress in 🌌 Workspace Team Feb 18, 2022
Repository owner moved this from In Progress to Done in 🌌 Workspace Team Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aspect: security Anything related to preventing vulnerabilities team: workspace Issue belongs to the Workspace team type: feature request New feature or request
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants