Service reliability model
Service scheduling and restart policies should maximize uptime while avoiding uncontrolled restart storms. Use restart limits and health checks instead of blind retries.
Recommended unit policy
- Restart=on-failure with bounded burst settings.
- Readiness checks before publishing endpoint readiness.
- Separate stdout/stderr capture with retention policy.
Operational cadence
Capture service state after each release and archive health snapshots before and after restart windows.
Service guard template
[Service]
Type=simple
Restart=on-failure
RestartSec=10
StartLimitBurst=5
StartLimitIntervalSec=120
WatchdogSec=30
EnvironmentFile=/etc/freescim/freescim.env
ExecStartPre=/usr/local/bin/freescim--health-check
Bound restart windows avoid runaway loops; health checks gate readiness before dependency consumers are signaled.