Skip to content

Support per-Actor network bandwidth limits #2548

Open

Description

@l1b0k

Summary

Support configurable network bandwidth limits for each Actor.

A single worker Pod can host multiple Actors. CNI bandwidth limits apply to the Pod as a whole, so they cannot enforce a separate limit for each Actor within it.

Per-Actor limits are needed to prevent one Actor from consuming excessive bandwidth and affecting other Actors sharing the same Pod or worker.

Requirements

  • Configure ingress and egress bandwidth limits per Actor.
  • Enforce limits on each Actor’s network datapath, covering both gateway and direct traffic.
  • Reapply limits after suspend/resume or worker reassignment.
  • Require no changes inside the Actor.
  • Expose the effective limits and bandwidth usage for observability.

Activity

  1. added
    kind/feature
    on Oct 13, 2026
  2. l1b0k commented on Oct 14, 2026

    @l1b0k
    Author

    Proposal

    Add per-Actor ingress and egress bandwidth limits, with defaults on ActorTemplate and optional overrides on Actor.

    Limits apply to the aggregate traffic of all containers in an Actor. Directions are relative to the Actor: ingress is traffic received by the Actor,
    and egress is traffic sent by it.

    API

    Add the following message to the public API:

    // NetworkBandwidth configures aggregate bandwidth limits for an Actor.
    // Directions are relative to the Actor.
    message NetworkBandwidth {
    // Maximum incoming bytes per second.
    // Unset means inherit the template value; zero means unlimited.
    //
    // +k8s:optional
    // +k8s:minimum=0
    optional int64 ingress_bytes_per_second = 1;

    // Maximum outgoing bytes per second.
    // Unset means inherit the template value; zero means unlimited.
    //
    // +k8s:optional
    // +k8s:minimum=0
    optional int64 egress_bytes_per_second = 2;
    

    }

    Add an optional NetworkBandwidth network_bandwidth field to both ActorTemplate and Actor, using the next available field number.

    Resolution is independent for each direction:

    1. Use the Actor value if specified.
    2. Otherwise, use the template value.
    3. If neither is specified, leave that direction unlimited.

    On a template, unset and zero both mean unlimited. Explicit zero on an Actor overrides a template limit.

    Enforcement

    Enforce limits at each Actor’s private network boundary.

    The implementation must:

    • Cover gateway-mediated and direct traffic across all supported network protocols.
    • Share each direction’s budget across all connections and containers.
    • Install limits before starting or restoring the workload.
    • Fail activation if a configured limit cannot be installed.
    • Reinstall limits after suspend/resume or worker reassignment.
    • Remove enforcement state when the Actor’s network is torn down.

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/networkarea/nodekind/feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions