ordering dependency
After= and Before=: the second of systemd's two dependency graphs. Requires=, Wants= and BindsTo= say which units must be pulled in; only After= says when. The manual is blunt — requirement dependencies "do not influence the order in which services are started or stopped". A unit carrying Requires=postgresql.service and no After= starts in the same millisecond as the database: Starting example-api.service at 09:06:10.094794, Starting postgresql.service at .096210, connect ECONNREFUSED 127.0.0.1:5432 at .125966, PostgreSQL up three seconds later. Requires= was honoured exactly as written, and never asked to be ready first. The fault hides, too: it passes on a test box where PostgreSQL listens in 200 ms and fails in production after a restore. systemctl list-dependencies --after prints this graph; the default tree does not.
Also written: After=, Before=
