Skip to content

Proposal: Fold atelet into ateom #128

Closed

Description

@yuval-k

Background

Today the actor lifecycle is split across two tightly coupled components:

  • atelet: a node-level DaemonSet that the control plane talks to
  • ateom: the worker component inside the worker pod that actually runs, checkpoints, and restores actors

To create a single worker, the control plane today coordinates two RPCs:
one to atelet and one to ateom-gvisor. The two processes also share
state through a host bind mount at /run/ateom-gvisor so they can hand
off snapshot files.

Problem

This split presents three structural issues:

  1. Two-component coordination. Every worker-lifecycle operation is a
    distributed transaction across atelet and ateom. Failures and
    partial states have to be reconciled by callers, and upgrades have to
    keep the two binaries version-compatible. Debugging means reading two
    sets of logs and reasoning about the handoff between them.

  2. Backend lock-in. The split assumes the gVisor model (a node agent
    plus an in-sandbox helper). Adding a different worker backend
    (Firecracker, for example) will be harder as we will need to build the support for it in 2 components.

  3. Shared host /run mount is a blast radius. The atelet ↔ ateom
    handoff requires a host bind mount on /run/ateom-gvisor. A
    misbehaving sandbox that fills that directory can exhaust /run on
    the node and take down every other pod on it. With per-pod state
    (no host mount), one bad sandbox only takes itself down.

Proposal

Remove atelet and consolidate its responsibilities into ateom
(running per-worker-pod), exposing a single control-plane-facing
interface. Concretely:

  • Worker lifecycle RPCs (create / start / suspend / restore / destroy)
    become a single call to the per-pod agent.
  • The backend (gVisor today, others later) lives behind an interface
    inside ateom; new backends plug in there.
  • Snapshot/restore state stays inside the worker pod's own filesystem —
    no host mount needed.
  • In the future, we can potentially even standardtize the api that ateom exposes to allow out-of-tree ateoms.

Currently it is not possible due to how the ateom does networking, but once #110 is in, we can implement this proposal.

Activity

  1. ahmedtd commented on May 29, 2026

    @ahmedtd
    Collaborator

    Benjamin Elder (@BenTheElder)

    I think we are trending towards keeping atelet for a few reasons:

    • Even once ateom has the ability to run a normal gRPC over TCP server, it may be prohibitive for ate-api-server to maintain open gRPC connections to all ateoms. Sending the traffic through atelet would reduce the number of outbound gRPC connections by a factor of the number of pods per node (commonly 110 or 256).
    • Similarly, for high-scale scheduling, we may need atelet to act as an aggregation point for statistics and which ateoms are free.

    I don't think the current division of work between atelet and ateom is particularly gVisor specific. atelet downloads everything (including the virtualization binaries), and ateom executes them. Firecracker or cloud hypervisor will have to be structured very similarly, because they have the same problem of snapshots not being guaranteed to be portable forwards and backwards across hypervisor versions.

    It's very possible that we may change the division of work between atelet and ateom. However, even in a world where ateom does the image pulls, some sort of host volume is going to be needed in order to share the image pull cache among different ateoms (although, different flavors of ateoms might use different host volumes).

  2. BenTheElder commented on May 29, 2026

    @BenTheElder
    Collaborator

    Agreed with all of #128 (comment)

    Shared host /run mount is a blast radius. The atelet ↔ ateom
    handoff requires a host bind mount on /run/ateom-gvisor. A
    misbehaving sandbox that fills that directory can exhaust /run on
    the node and take down every other pod on it. With per-pod state
    (no host mount), one bad sandbox only takes itself down.

    This is addressable without removing atelet, and we definitely expect atelet to evolve.

  3. thockin commented on May 31, 2026

    @thockin
    Collaborator

    Even once ateom has the ability to run a normal gRPC over TCP server,

    You say this as if it is solved - is it? Last I heard this was still a problem. As I understood it, please tell me if I am getting it wrong:

    In order to "talk to" the ateom over IP, it needs to consume a socket to listen() on. That socket is then unavailable for the actor itself (gvisor or uVM or whatever) to listen on. Best case it would get an "in use" error. Worst case it would appear to succeed in the sandbox, but in-bound traffic would not actually reach the sandbox (stopping at ateom).

    Is that right? If so, is there a reasonable solution? Atelet is the proverbial "another level of indirection" here.

    I suppose it would be OK to claim a single port, but that sort of intrusion into the actor's space is something I would prefer to avoid.

    Another possible option would be to have multiple IPs per pod (no standard k8s API for that).

    Or we could intercept traffic and look at L7 (e.g. host headers) toi decide if ateom should eat the packet or forward it.

    Or... ?

  4. ahmedtd commented on May 31, 2026

    @ahmedtd
    Collaborator

    I think we are much closer to a solution with the veth PR (#110). Right now, it just unconditionally forwards port 80 into the workload, but I think we should have a list of listening ports declared in the ActorTemplate. We will then be free to claim some likely-unused port (1, 2, etc) for ateom to run a server.

    This also opens the door to running more than one workload per ateom --- it could work Borg-style, where each workload just says that it needs N ports, and ateom doles out free inbound ports to each workload.

    Even if we retain the UDS for inbound ateom communication, so that ateom doesn't consume a listening port, having ateom able to make outbound connections without stepping on the workload is a significant quality-of-life improvement

  5. thockin commented on May 31, 2026

    @thockin
    Collaborator

    IMO declaring ports is problematic - agents are very general, so they may not know what ports they use. OTOH we need to do wakeups on SOME port.

    it could work Borg-style, where each workload just says that it needs N ports, and ateom doles out free inbound ports to each workload.

    Oh please no. The ip-per-port model was born as a reaction to that mess.

    Outbound is less of an issue because they are usually ephemeral ports, but they CAN be explicitly chosen by a client.

    One of the things we can do (slow path) is feed requests back to kubernetes on what we need to make this stuff work better. Perhaps there needs to be a way to request multiple pod IPs.

  6. yuval-k commented on Jun 1, 2026

    @yuval-k
    Author
    • Even once ateom has the ability to run a normal gRPC over TCP server, it may be prohibitive for ate-api-server to maintain open gRPC connections to all ateoms. Sending the traffic through atelet would reduce the number of outbound gRPC connections by a factor of the number of pods per node (commonly 110 or 256).
    • Similarly, for high-scale scheduling, we may need atelet to act as an aggregation point for statistics and which ateoms are free.

    These reasons still doesn't mean the logic should be split. The daemonset can be a point of aggregation, and all the logic can be in the worker pod. I.e. the proposal above does not contradict these goals.

    It's very possible that we may change the division of work between atelet and ateom. However, even in a world where ateom does the image pulls, some sort of host volume is going to be needed in order to share the image pull cache among different ateoms (although, different flavors of ateoms might use different host volumes).

    What's the advantage of the atelet pulling the OCI images vs something like OCI volumes?
    There's a lot that goes into image management - and it would be nice to re-leverage kubelet for this, so all the image lifecycle (pulling, pull-secrets, caching, GC) is handled for us.

  7. yuval-k commented on Jun 2, 2026

    @yuval-k
    Author

    Example from today:
    We are trying to debug an issue where an actor doesn't start.

    I wanted to create a binary that starts the actor directly on my laptop (without k8s) so I can debug it without k8s layers getting in the way.

    Today it's hard to do as the logic is split across these 2 components.

  8. bowei commented on Jun 2, 2026

    @bowei
    Collaborator

    Can we not have Ateom have a leg in the outer network namespace? We can have atelet send it an FD for a socket that is outside and not have to mix the Actor networking with the ateom stuff.

  9. BenTheElder commented on Jun 2, 2026

    @BenTheElder
    Collaborator

    I'm going to come back to this in more detail soon, but quickly pointing out:

    What's the advantage of the atelet pulling the OCI images vs something like OCI volumes?

    OCI volumes are defined when creating the pod, we re-use pods for performance reasons.

    You cannot dynamically leverage kubelet's OCI volumes (or any other volumes) unless you create new pods.

    There's a lot that goes into image management - and it would be nice to re-leverage kubelet for this, so all the image lifecycle (pulling, pull-secrets, caching, GC) is handled for us.

    Yes, I'd love to reinvent as little as possible, but those things are not insurmountable, and unfortunately using them requires putting the Kubernetes API back into the hot path (in which case, I suggest taking a look at agent sandbox).

  10. yuval-k commented on Jun 3, 2026

    @yuval-k
    Author

    OCI volumes are defined when creating the pod, we re-use pods for performance reasons.

    yes, I know - Doing what i'm suggesting this would mean different worker pools for different base images.

    unfortunately using them requires putting the Kubernetes API back into the hot path

    I don't think we will have k8s api in the hot path in the common case - we can still cycle actors that share the same base image in and out of the same worker, using something like overlay-fs to re-use the same mounted OCI image.

    A trade-off here is that we will end up with potentially more worker pool pods; something that we can mitigate with a smarter controller that can scale idle ones to zero.

    happy to hear your thoughts!

  11. thockin commented on Jun 3, 2026

    @thockin
    Collaborator

    what i'm suggesting this would mean different worker pools for different base images.

    IMO this path is DOA. This is one of the inefficiencies we need to get past. What we need is fungibility.

    I wanted to drop a quick note here, because I know this is a HOT topic that we really need to pin down urgently. Several people for the Google team dreamed up a fairly different model for how we might be able to be even better behaved WRT IO, but it's different enough that we need to try to model it and see if it's worth pursuing.

    If we were to pursue that model, and decisions we make around the ateom/atelet relationship might be invalidated. I am trying to not waste anyone's time if I can avoid it.

    Hopefully we will have some preliminary indicators with a couple of days -- I would ask everyone to hang tight for just a little longer.

    I will emphasize a few things:

    1. Having pluggable alternatives to gVisor is 100% in the cards.
    2. We want to simplify and streamline as much as we can, too.
    3. As soon as we have clear tradeoffs to discuss, we will share the data and the decision. :)
  12. yuval-k commented on Jun 12, 2026

    @yuval-k
    Author

    To clarify, my suggestion above is one idea. we can achieve this same goal with more minimal changes.
    The main goal that's relevant here, is having one component to debug/operate (this ideally will also mean that running locally will be easier).

    Another proposal that can work:

    • Ateom is there, but it's invoked by the atelet
    • ateom has an ephemeral volume it uses for image cache
    • atelet asks ateom to pull images
    • ateom once pulled, ateom makes that available using an R/O bind mount

    I'm not fully sure if above plan will work - just trying to illustrate the boarder point - the idea is to make it easier to debug and operate (bonus points if can also run it locally)

  13. added
    kind/cleanup
    on Aug 13, 2026
  14. added a commit that references this issue on Nov 7, 2026
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/nodearea/schedulingkind/cleanupprio/P1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions