A Go library for enqueueing background work and processing it with worker pools backed by Redis.
Overview
Asynq queues tasks from application code and processes them asynchronously with one or more worker servers. Clients enqueue work; servers pull from queues and run handler goroutines so many tasks execute concurrently across machines.
The design targets horizontal scaling with multiple workers and Redis brokers, plus scheduling, retries, crash recovery, weighted and strict priorities, deduplication, per-task timeouts and deadlines, batch grouping, middleware, queue pause, periodic jobs, and Redis Sentinel support.
Operations lean on fast Redis writes for low enqueue latency. Handlers follow a flexible interface similar in spirit to net/http, including mux-style routing.
Asynqmon provides a web UI to inspect and control queues and tasks, and a separate CLI offers dashboard-style inspection from the terminal. Redis 4.0 or newer is required; some Lua scripts may not suit Redis Cluster.
Key features
- Redis-backed task queues
- Scheduled and periodic tasks
- Retries and crash recovery
- Priority and weighted queues
- Task deduplication
- Per-task timeouts
- Handler middlewares
- Asynqmon web UI and CLI
Use cases
- Background job processing
- Distributed worker pools
- Deferred task scheduling
- Cross-machine work sharing
- Queue monitoring in production