How do failed jobs, retries, timeouts, and backoff work?
Answer
Clear, interview-ready explanation
A job fails when it throws an exception and exhausts its allowed attempts, exceeds a configured timeout, or is explicitly failed. Laravel can record failed jobs for inspection and retry them after the underlying cause is fixed; failed() methods are useful for focused cleanup or notification.
Retries control how many attempts Laravel makes, timeouts bound how long one attempt may run, and backoff spaces attempts to avoid immediate repeated failure. Configure them on the job, worker, Horizon supervisor, or Laravel 13 attributes as appropriate. Jobs should be idempotent because a retry may occur after partial external side effects.