Skip to content

ArdiQ — a featherweight Python task queue with a Rust core

A featherweight task queue for Python, with a Rust core.

PyPI versionPython versionsCILicense: MIT

ArdiQ runs the worker loop and every Redis round-trip in Rust (via PyO3 + tokio), off the GIL; you write tasks in plain Python. The two meet at a single async callback, with the GIL held only for the microseconds it takes to start a task and read its result, so one process takes a lot of work without asking for much in return.

  • +41%dispatch throughput over Taskiq, the next fastest
  • 3xStreaq’s bulk enqueue, the only other batch API measured
  • 33 MBof memory per worker, against Taskiq’s 91

Benchmarked against Taskiq, Streaq, arq, Dramatiq and Celery on one machine, in one sitting: ArdiQ is the fastest of the six on CPU-bound work and on raw dispatch. On I/O-bound work it comes second by 1.7%, in a scenario already at 95% of its arithmetic ceiling, and the only queue here that holds less memory finishes last or second-to-last on every workload.

The performance guide has the full tables, the error bars, and the rows where the numbers flatter us and shouldn’t.

Rust core, off the GIL

The loop and every Redis round-trip run on tokio, in Rust: heavy concurrency without the memory bill.

Batteries included

Priorities, delayed, scheduled & cron tasks, automatic retries with backoff, per-task timeouts, results with TTL, and status introspection.

Sync & async tasks

async def tasks run on the loop; blocking def tasks run in a thread pool so they never freeze the worker.

At-least-once delivery

A task is acknowledged only after it terminates, so in-flight work on a dead worker is reclaimed and rerun, never dropped.

example.py
from ardiq import Ardiq
app = Ardiq(redis_url="redis://localhost:6379", queue_name="example")
@app.task()
async def add(a: int, b: int) -> int:
return a + b
Terminal window
$ ardiq run example:app

Made bytay.dev