Skip to content

docs: drain transcode nodes before stopping or upgrading them - #188

Merged
zZebrahz merged 6 commits into
mainfrom
docs/node-drain
Oct 18, 2026
Merged

zZebrahz merged 6 commits into
mainfrom
docs/node-drain

Conversation

@Quick104

@Quick104 Quick104 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Closes #187

The transcode nodes guide tells admins to turn a node's switch off for maintenance, and the manual doesn't say how long Docker should wait when Silo stops. Silo-Server/silo-server#2340 lets an admin drain a transcode node, and a node now drains on its own when it's stopped. Silo-Server/silo-server#2343 makes the main server fail readiness and keep serving for a few seconds before it stops. Both have merged.

Pages changed

Page Change Preview
Add and check transcode nodes Drain steps and stop behavior in "Maintain a node" Open
Read node status Draining and Drained states, and the drain status line Open
Check server health Readiness row for shutting_down Open
Docker deployment reference stop_grace_period and SILO_SHUTDOWN_DELAY in "Distributed and external services" Open

What changed on each page

Add and check transcode nodes

  • "Maintain a node" opens with four steps: select the pause icon in Admin > Nodes, wait for Drained · safe to stop, stop or upgrade the node, then select the play icon to resume it. A drained node stays drained after a restart until it's resumed.
  • Step 3 says a stopped node shows Unhealthy, and that in a group it holds new transcodes off the whole group until it's back.
  • One line gives the admin API actions, POST /api/v2/admin/nodes/{id}/drain and /resume.
  • A paragraph covers stopping a node directly. It drains for up to SILO_NODE_DRAIN_TIMEOUT (default 10m; 0 turns the drain off), a second stop signal stops it at once, and the node's stop_grace_period should be the timeout plus a minute.
  • "Turn a node's switch off..." now applies to proxy nodes, which don't drain.
  • The re-probe sentence says to drain the node first, since Silo refuses a re-probe while the node is transcoding.

Worth checking: the group note in step 3 isn't in #187. It follows from how groups already work (a stopped node that's still switched on is Unhealthy), and drain-then-stop is when an admin would run into it.

Read node status

  • Draining and Drained rows in the state table. A draining node gets no new work, but unlike a disabled one it stays in its group and Silo keeps checking it.
  • A new paragraph lists the line under the node's address: Draining · 2 transcodes left, Drained · safe to stop, Drained · no work left for a node that's stopping, Draining · not answering, and Drain requested for a drained node whose switch is off. Turning the switch back on doesn't resume it.
  • "A node's state only says whether Silo can reach it" now ends "and whether it's draining".

Check server health

  • New readiness row: HTTP 503 with "status":"shutting_down" while Silo is stopping and waits out SILO_SHUTDOWN_DELAY.

Worth checking: #187 doesn't list this page. The readiness table lists every answer, and the new Docker text links to it.

Docker deployment reference

  • "Distributed and external services" says Docker kills a container 10 seconds after asking it to stop, and gives each Silo service's stop_grace_period: 2m for silo and the silo-proxy example, 11m for the silo-transcode example.
  • The silo item covers SILO_SHUTDOWN_DELAY (default 5s), setting it to 0 on a single server, and that a restart from the web app skips the wait.

Left out on purpose

  • Kubernetes (terminationGracePeriodSeconds, probe paths): the manual has no Kubernetes page, and docs: drain transcode nodes before stopping or upgrading them #187 leaves adding one out of scope.
  • Sizing SILO_SHUTDOWN_DELAY against a load balancer's probe interval: no page covers several API servers behind a load balancer.
  • That a quality change in the Silo apps moves a stream off a draining node, and that a paused stream keeps counting until Silo closes it: mechanism, deeper than the rest of the page.
  • A transcode node's health answer reads draining or drained instead of ok during a drain: no page documents node health answers.
  • Drained doesn't account for prepared downloads stored on the node, which are unavailable while it's stopped. That holds for any stopped node, so it belongs with the prepared-downloads section docs: add Manage download storage and per-node prepared-file storage #148 adds.

Coordination

Evidence

Source reviewed, not tested on a live server or device: Silo-Server/silo-server#2340 merged as f16f51fe2 and Silo-Server/silo-server#2343 merged as 812aca49d, rechecked at silo-server origin/main 2bf1fb0fe; siloserver.org 544f388.

Needs a hands-on check: nothing. The labels, defaults and Compose values were compared with the merged code at 2bf1fb0fe.

bun run test:docs passed (8 tests); bun run build built 105 pages with the link check; git diff --check clean.

Evidence: https://evidence.siloserver.org/r/siloserver-org/node-drain/

Follow-ups

Risks

None identified. Documentation only.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.

AI Disclosure

  • Harness: Claude Code in T3 Code
  • Tool(s): Claude Code
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated; not yet verified by a person
  • Adversarial review: n/a

🤖 Generated with Claude Code

Note

Document drain workflow for transcode nodes and shutdown behavior

  • Replaces the old maintenance guidance in transcode-nodes.md with a full drain workflow: initiate a drain from the admin UI, wait for the Drained state, stop or upgrade, then resume the node. Covers drain and resume admin API actions, automatic draining on direct stop, the default and configurable drain timeout, immediate termination on a second stop signal, and the required container grace period.
  • Adds Draining and Drained states to the status table in node-status.md, including remaining-work indicators, unhealthy and disabled-node drain states, and how to resume a node.
  • Documents Compose stop grace periods for Silo, proxy, and transcode services in docker.md, including Silo readiness behavior during shutdown and the single-server exception.
  • Adds the HTTP 503 shutting_down readiness response to the response table in server-health.md.

Macroscope summarized 4eb7bc7.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a6904952-2dc6-4444-9fb8-b73d8b2582a8
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@silo-kody

silo-kody Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌
⚠️ 2 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Scope polling setup steps to installable source capabilities
  • Preserve retired documentation URLs with tested redirects

@Quick104

Copy link
Copy Markdown
Contributor Author

Draft until Silo-Server/silo-server#2340 and Silo-Server/silo-server#2343 are merged into main. The docs describe those changes, and their labels or defaults may still change in review.

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Preview removed after this pull request was closed. Its address now redirects to siloserver.org, though some visitors may still see the old preview for a while.

@silo-triage silo-triage Bot added documentation Improvements or additions to documentation triaged High-confidence review completed; does not mean fixed, validated, or accepted for release. labels Oct 12, 2026
@zZebrahz
zZebrahz marked this pull request as ready for review October 18, 2026 04:34
@silo-triage silo-triage Bot added the size/S 0–49 added + deleted lines (all files); change volume, not priority. label Oct 18, 2026
@silo-kody

silo-kody Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌
⚠️ 2 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Scope polling setup steps to installable source capabilities
  • Preserve retired documentation URLs with tested redirects

@zZebrahz
zZebrahz merged commit 112feed into main Oct 18, 2026
5 checks passed

This branch was previously deployed

1 inactive deployment
Preview — 4eb7bc76 Deployed Oct 18, 2026 by zZebrahz via teardown #89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/S 0–49 added + deleted lines (all files); change volume, not priority. triaged High-confidence review completed; does not mean fixed, validated, or accepted for release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: drain transcode nodes before stopping or upgrading them

2 participants