Archive

Engineering Notes

Short field notes distilled from routine Linux maintenance and static release pipelines.

Operations · 2026-10-14

Avoiding synchronized load spikes with systemd timers

Scheduling recurring maintenance at midnight UTC across dozens of hosts concentrates disk I/O and upstream API calls into a narrow window. Adding RandomizedDelaySec=15m and FixedRandomDelay=true spreads work evenly across the window while keeping each individual machine deterministic across reboots.

Always pair timer units with explicit TimeoutStartSec bounds and verify the effective schedule with systemd-analyze calendar before rollout.

Build Tooling · 2026-09-28

Deterministic static asset bundles

Comparing deployment artifacts by SHA-256 digest fails whenever archive metadata changes between builds. Passing --sort=name, --numeric-owner, --owner=0 --group=0, and a fixed --mtime derived from the source commit timestamp produces identical tarballs on any POSIX host.

When staging static content on a server, writing to a versioned release directory and atomically swapping a single symlink prevents half-written files from ever being served.

Observability · 2026-08-19

Keeping journald storage bounded on small disks

Compact cloud instances often ship with 10 to 20 GB root volumes where an unexpected retry loop can fill /var/log/journal within hours. Setting explicit SystemMaxUse=200M and MaxRetentionSec=14day in a drop-in under /etc/systemd/journald.conf.d/ provides a hard ceiling without sacrificing recent diagnostic history.

Networking · 2026-07-05

Interpreting negative DNS caching in stub resolvers

Lowering a record's own TTL before a planned migration does not shorten negative cache entries for names that did not previously exist. Recursive and stub resolvers cache NXDOMAIN responses according to the lesser of the SOA record TTL and the SOA minimum field, so pre-provisioning records ahead of cutover avoids unexpected lookup stalls.