Skip to content

Automatically keep active workspaces alive #2233

Closed
@ammario

Description

@ammario

In v1, we detected when users were engaging with workspaces to keep them alive.

This made for a great developer experience since the developer never had to think about "bumping". The workspace magically stayed on for however long they needed it. While this was great for developers, it was painful for those responsible for cloud costs. Tabs left open overnight and untraceable ghost activity beefed up cloud bills.

Organizations fall on both sides of this trade off.

I believe there's a way to get the best of both worlds here.

We could add a flag like coder config-ssh --keep-alive. Every tunnel command in the SSH config would carry along that --keep-alive flag, and every coder CLI spawned with the flag would periodically bump the workspace. Idempotent bumping (see #2230) is a necessary prerequisite.

Eventually we could bump within native IDE extensions. We could implement a similar keep-alive behavior on requests to coder_apps so browser customers get activity-based shutdown as well.


Implementation note: reuse the notification goroutine

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiArea: HTTP APIcliArea: CLI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions