﻿# BindsTo with After couples service lifetime beyond start ordering

BindsTo with After couples service lifetime beyond start ordering. A focused service-reliability guide with the documented mechanism, a reproducible validation scenario, evidence and operational limits.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/sre-bindsto-after-activation-lifetime/
Language: en

Start ordering and continued dependency lifetime answer different questions. An inference worker can start after a prerequisite and still outlive it when that prerequisite disappears unexpectedly. BindsTo together with After expresses a stronger coupling than ordering alone. It is useful only when stopping the dependent service is the intended response to the prerequisite becoming inactive.

## The service-manager contract

The systemd.unit manual describes BindsTo as stronger than Requires: unexpected inactivity of the bound unit also stops the dependent unit. Examples include a disappearing device, an unmounted mount unit or a service terminating on its own. Combining BindsTo and After on the same prerequisite further requires that prerequisite to be active for the dependent unit to be active, including cases where the prerequisite was skipped by an unmet unit condition.

## Implementation details

Choose a concrete prerequisite whose manager state is meaningful for the worker's safety. Distinguish it from a remote endpoint that can remain nominally active while requests fail. Draw the dependency direction and define what the worker should do with in-flight requests when stopped. A stop caused by dependency loss is not automatically an application-level rollback. Preserve the causal unit transition so an operator does not diagnose the dependent worker as the original source of failure.

## A constructed validation case

Create a prerequisite service and a harmless dependent service with observable lifecycle events. Compare After alone with BindsTo plus After while the prerequisite exits unexpectedly. Add a condition-skipped prerequisite branch and an explicit operator stop branch. Record activation, inactivity and dependent stop separately. Then keep the prerequisite active while making its synthetic functional probe fail; this control should show that the dependency follows manager state rather than arbitrary application health. Do not simulate device loss on a production GPU host.

## Recovery limits

This mechanism can propagate an outage; that may be correct, but it is not redundancy. Test how service activation resumes after the prerequisite returns rather than assuming the dependency restarts every previously stopped worker. Review effective unit configuration and installed version. Application readiness, remote reachability and model correctness need separate evidence. Use lifetime coupling where continuing would be invalid, and preserve a recovery procedure that explains which actor requests the next activation.

## Primary references

[systemd systemd.unit documented interface](https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html); [systemd systemd.service documented interface](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html).

This is a proposed service-lifecycle validation, not an executed Retrivium benchmark. Preserve the implementation version and unresolved outcomes; interface documentation does not establish the availability or correctness of an inference service.

## Related reading

[Startup, readiness and liveness for a slow-loading model server](/journal/provider-startup-readiness-liveness-separation/); [Golden inference API fixtures: test the contract rather than prose](/journal/provider-golden-contract-fixtures/).
