Skip to main content

DevOps and reliability

Deployment, operational safety and resilient systems.
Media engineeringReact and TypeScriptAI and retrievalDjango backendPython automationDevOps and reliability

Keep deleted URLs out of an XML sitemap

An XML sitemap should follow the content that remains public and indexable. When an article is deleted or returned to draft, a manually maintained sitemap can keep advertising an obsolete URL. Generate entries from the same publication rules used by public routes, then test those rules with a small fixture.

Schedule a maintenance command with a systemd timer

A scheduled maintenance command needs a visible exit status and a place to inspect its output. On a Linux host that uses systemd, a service unit can describe the command while a timer unit describes when to start it. Keep the command harmless during the first scheduling exercise.

Distinguish liveness from readiness in an application health check

A process that answers HTTP requests may still be unable to serve useful work. If its database is unavailable, a request to a trivial route can succeed while an order lookup fails. Give process health and dependency readiness distinct meanings so that an outage produces the intended operational response.

Verify a PostgreSQL backup by restoring it

A backup file can exist and still fail to restore. Test recovery into a separate disposable database, then check the records and constraints that the application needs. File size and a successful dump exit code are useful observations, but they do not show that the restored application can work.

Set proxy timeouts for a streamed API response

A streamed response can remain useful for several minutes while sending small updates. A proxy that buffers those updates can make the browser look idle, and a long pause between upstream writes can close the connection. Diagnose buffering and idle timeouts separately before changing a timeout value.

Keep deployment secrets out of a Docker image

A credential copied during a Docker build can remain in the resulting image history or a previous layer. Removing the visible file in a later instruction does not establish that the image is safe to distribute. Keep deployment credentials outside the build context and supply them only when the container starts.

Wait for database readiness in Docker Compose

A web container can start while PostgreSQL is still initializing its data directory. If the application opens its first connection during that interval, an otherwise valid release can fail with a connection error. Give the database a readiness check and make the application's initial startup depend on that check.