Skip to content

Feature request: suspend actor on inactivity #424

Open

Description

@bowei

ATE currently requires an explicit API call to suspend Actors, which works well for use cases where there is an external controller that knows clear resume and suspend lifetime cycle. This works less well for long-living but mostly idle Actors where we will want to be able to integrate automatic suspension via externally observable signals, such as request traffic or system activity (CPU).

There are a couple of layers/choice to this:

Does this functionality have to be built vertically into Substrate in a deep integration or we expose the right surface area to allow someone to implement this easily? Specifically, does Substrate offer just an API for idle suspend or enables enough visibility/triggers into Actor behavior that it is easy to build and integrate with.

An idle suspend API should be built that is generic to the idle signal: IMO it would be bad to have separate "idle suspend due to network", "idle suspend due to CPU" etc that are not coordinate with each other.

Activity

  1. EItanya commented on Jul 12, 2026

    @EItanya
    Collaborator

    100% on this feature.

    In terms of direct integration vs pluggable I'm a bit torn. Traditional signals may lag a bit too much for this sort of feature. Imagine a traditional telemetry gathering system with acceptable seconds of lag. Seconds of lag could lead to incorrect signals here. I think for this feature to be successful it needs to be able to respond quickly and accurately to "inactive" actors. This also has much less downside than a traditional inactivity mechanism because pause/resume should be much much faster.

    I don't have an answer for this yet, just putting some thoughts down

  2. levrado commented on Jul 13, 2026

    @levrado
    Contributor

    IMO It calls for something HPA-like, pluggable policy API that can combine signals such as traffic, in-flight work, CPU usage, and harness state. ateom could eventually provide runtime-local metrics as one of those signal sources.
    simpler than hpa since only 2 states of active/suspend ofc

    in regards of speed if its in ATE itself, should be able to respond very quickly if api is strict enough

  3. added
    kind/feature
    on Aug 12, 2026
  4. ajaysundark commented on Sep 11, 2026

    @ajaysundark
    Collaborator

    /cc

  5. raravena80 commented on Nov 13, 2026

    @raravena80

    #424 and #483 both describe automatic suspend. #424 takes the signal from outside (traffic, CPU) and #483 from the actor (/idlez).

    Could they share one idle policy, with the actor's /idlez answer as one of its signals? That fits Bowei Du (@bowei)'s point above about coordinated signals and Lev Rado (@levrado)'s HPA-like policy, and it avoids two paths that can disagree.

  6. sfunkenhauser commented on Nov 16, 2026

    @sfunkenhauser
    Collaborator

    #483 has evolved from the initial discussion, and the current plan of record is providing a /suspend API that actors can call. #483 (comment)

    If we decide to add the concept of an actor idle probe in the future (or some other self-reported idle status) it should be part of an overall idle policy.

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

    area/apiarea/schedulingkind/feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions