ESP health check validates connectivity before processing
Why it matters
An email worker that starts processing jobs before validating its ESP credentials discovers a misconfiguration only when the first real send fails in production — potentially after dozens of jobs have been dequeued, acknowledged, and logged as in-flight. A rotated API key, a wrong environment variable, or a network policy blocking outbound HTTPS to the ESP creates a failure that only surfaces under load. ISO-25010:2011 reliability.availability requires that faults are detected at startup rather than at runtime, where the blast radius is larger.
Severity rationale
Low because the failure is discovered quickly (on first job attempt) rather than going undetected, but the absence of a startup check delays diagnosis and allows job state to become inconsistent.
Remediation
Add a pre-startup health check in workers/email.worker.ts that exits the process with a non-zero code if the ESP is unreachable:
async function startEmailWorker() {
const healthy = await emailProvider.healthCheck()
if (!healthy) {
logger.fatal('ESP health check failed — not starting')
process.exit(1)
}
logger.info('ESP connectivity verified — starting worker')
const worker = new Worker('email', processEmailJob, { connection })
worker.on('error', (err) => logger.error(err, 'Worker error'))
}
startEmailWorker().catch((err) => {
logger.fatal(err, 'Failed to start email worker')
process.exit(1)
})
Verify all configured ESP providers, not just the primary, before the worker accepts its first job.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Sending Pipeline & Infrastructure Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- iso-25010:2011 · reliability.availability — Availability
Taxons
History
- 2026-04-18·v1.0.0·Initial import from sending-pipeline-infrastructure·automated