Laravel's queue system transforms slow, unreliable tasks into fast, reliable workflows by moving work off the request cycle. The system follows a pipeline: dispatch jobs, serialize them into JSON payloads, store them via connectors (Redis, Database, SQS), pop them with workers, execute through middleware, and acknowledge or retry with backoff strategies. Redis uses lists and sorted sets for main queues, delayed jobs, and reserved jobs with visibility timeouts. Workers run as long-lived processes that handle job lifecycle, retries, and failures. Advanced features include job chains for sequential execution, batches for parallel processing with progress tracking, unique jobs, and overlapping prevention through cache locks.

17m read timeFrom wendelladriel.com
Post cover image
Table of contents
IntroductionWhy Queues MatterCore ConceptsHigh-Level ArchitectureDispatch LifecyclePayload and SerializationQueue Connectors Deep DiveWorker InternalsFailures, Retries, and BackoffDelays, Visibility, and TimeoutChains and BatchesConclusion

Sort: