Deployment design

A running process is not a ready model service

Connect startup, readiness and restart policy to the application’s actual state.

Name the startup stages

A model service can spend substantial time loading assets after Linux has launched its process. systemd distinguishes several service startup types, including a notification-based type for applications that signal readiness. Choose a mechanism the application actually implements. Calling a process active does not establish that it has a model loaded, a usable camera or a valid response path. Make these stages visible in logs so a maintainer can tell progress from a stalled initialization without guessing from the process list.

Use a meaningful readiness check

Define the smallest operation that establishes the service can do useful work. It might validate the loaded model identity and execute a small fixed input. Keep that check bounded and separate from an expensive full evaluation. Decide which dependencies are essential and what happens if one becomes unavailable after startup. A camera-dependent service and a text-only fallback may expose different readiness states; the caller needs the state that matches the function it is about to request.

Restart with a reason

systemd provides restart policy and restart delay controls. Apply them to a known failure model rather than enabling rapid retries for every exit. A temporary device issue may recover, while a missing model file is unlikely to appear because the service starts again. Preserve the exit reason and initialization stage before another attempt overwrites the evidence. Give repeated failure a visible operational state so the device does not spend an entire unattended interval loading and crashing without anyone noticing.

Test the stopping path

A service also needs a plan for requests already in progress when shutdown begins. Decide whether it drains work, cancels it or stops accepting new work first. Keep a timeout consistent with that policy and verify that the process leaves storage and devices in an expected state. Reboot and restore the service using the documented installation, then check the readiness signal. The deployment is complete when boot, useful operation, failure and shutdown form a coherent lifecycle.

Sources & publication notes

Retrospective period: November 2025. Written and published November 2, 2026. Product announcements establish release timing; support pages are linked as current references.

Related reading

← More guides & analysisCompare hardware →