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

Đang mở
#529 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 4 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, nginx
Lĩnh vực
api, backend, devops

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
JavaScript
Star
10
Fork
6
Merge trung bình
5 ngày 14 giờ
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của mieweb/opensource-server

Tất cả issue của mieweb/opensource-server

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.