Skip to content

Auto-suspend actor on worker eviction #1707

Open

Description

Right now worker eviction is handled by sending SIGTERM to the actor. To gracefully exit, the actor needs to trap SIGTERM and self-suspend.

To improve the user experience, we should allow actors to configure how eviction is handled, starting with auto-suspend on eviction. This likely is dependent on #450 as there still needs to be some coordination with the actor, but it would avoid the need to trap SIGTERM.

The ultimate goal here is to simplify the custom logic actors require for handling eviction. For full memory snapshots we need some hook so the actor can flush, save state, etc... before suspend. Can we do better for disk only snapshots?

We should investigate if the suggestion from Brandon Royal (@brandonroyal) is possible.

Where rootfs, durdir snapshots are enabled, allow the SIGTERM to be handled by the application but trigger the suspend AFTER PID 1 returns exit code 0 (again, assuming this is possible)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions