Idle shutdown: wake-on-request API to start idle-stopped containers

Aperta
#529 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript, nginx
Ambito
api, backend, devops

Direzione di ricerca

Start by tracing the existing last-access API and the nginx agent paths for HTTP upstream errors and TCP/UDP stream access; the issue names no files or tests. Check how container stop reasons and provider startLxc are handled, then map the wake endpoint into those flows. Done means idle-stopped containers wake once with rate limiting across HTTP and TCP/UDP, manually stopped containers stay stopped, and the documented retry behavior matches the startup status.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement idle-shutdown

Part of the Idle Container Shutdown epic. Depends on the idle sweep job (stop reason tracking).

Summary

An API the proxy calls to start a container that was stopped for inactivity when a request arrives for one of its services.

Details

  • Endpoint e.g. POST /api/v1/services/:id/wake (auth: localhost or admin API key, same as last-access; remote site agents use the pinned agent key).
  • Only starts containers whose stoppedReason = idle. Manually stopped containers are not woken.
  • Any request may trigger a wake, rate-limited per container, and idempotent: if a start is already in progress, return its status rather than starting again.
  • Uses provider startLxc; clears stop state on success.
  • Returns a status the proxy can act on (starting / running / not-wakeable).
  • Hook into the nginx agent for HTTP (on upstream error) and TCP/UDP (stream access phase).
  • At this stage it is acceptable for the first several requests to fail while the container boots. TCP/UDP clients simply have to retry; document this.

Acceptance criteria

  • Request to an idle-stopped container's service starts it.
  • Manually stopped containers stay stopped.
  • Concurrent requests trigger a single start; wakes are rate-limited.
  • Works for HTTP and TCP/UDP services.
Lingua principale
JavaScript
Stelle
10
Fork
6
Merge medio
5g 14h
PR unite (30g)
5

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di mieweb/opensource-server

Tutte le issue di mieweb/opensource-server

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.