agent-substrate / agent-substrate/substrate

Prefer workers with cached actor images during scheduling

Offen
#276 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area/api-machinery area/scheduling kind/feature
Vorherrschende Sprache
Go
Sterne
1.8k
Forks
316
Ø Merge
2 T. 43 Min.
Gemergte PRs (30 T.)
287

Beschreibung

## Description

Atelet maintains a node-local image cache, but the scheduler does not know which images are cached on each node. As a result, an actor may be assigned to a cold node and pull its images again, even when another eligible node already has them cached.

Image preparation happens synchronously during `ResumeActor`, so unnecessary pulls increase actor startup latency and registry traffic.

## Proposal

- Let atelet report its cached image digests to the control plane.
- Store cache information by node.
- After applying existing constraints, prefer available workers whose node has all required actor images cached.
- Fall back to the current random selection when no cache hit is available.

Local snapshot availability remains a hard constraint. Image cache affinity is applied only among nodes that can restore the selected snapshot.

A general scoring framework is not required: use cache-hit preference with fallback.

## Expected Outcome

Reduce unnecessary image pulls and improve Actor Resume latency and consistency.

## Related Issues

- #166 and #228 optimize node-local image/rootfs reuse.
- #135 discusses locality-aware scheduling for cached snapshots.
- #233 tracks cold image pulls exceeding the `ResumeActor` deadline.

This proposal complements those efforts by making worker selection aware of node-local image cache availability.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.