infrastructure

Job Queue

A job queue is a buffer that decouples producers (tasks submitted by clients) from consumers (workers that execute the tasks), enabling asynchronous, scalable processing.

In a scraping platform, job queues separate request acceptance from execution. A client submits a scrape job to the API; the API writes the job to a queue (Redis List, RabbitMQ, SQS, Celery); a pool of worker processes reads from the queue and executes the scraping work independently. This architecture allows the API to respond immediately (202 Accepted) without blocking on the scrape, and allows workers to be scaled independently of the API tier.

Queues provide back-pressure control: when workers are busy, jobs accumulate in the queue rather than causing the API to time out. Priority queues let high-tier jobs bypass lower-priority work. Dead-letter queues capture repeatedly failing jobs for debugging without dropping them permanently.

AlterLab uses a Redis-backed job queue to dispatch scraping tasks to a pool of specialised workers. Each worker picks up a job, executes the appropriate scraping engine (HTTP, browser, or full-browser tier), and writes the result to a storage backend before acknowledging the job as complete.

Examples

# Python: enqueue a scrape job with Celery + Redis
from celery import Celery

app = Celery("tasks", broker="redis://localhost:6379/0")

@app.task
def scrape_url(url: str) -> dict:
    # worker executes this asynchronously
    return fetch_and_parse(url)

# Client side — returns immediately
result = scrape_url.delay("https://example.com")
print(result.id)  # task ID for polling

Related Terms

Extract Job Queue data from any website

AlterLab returns clean, structured data from any public URL — no scraper infrastructure needed. Start free, no credit card required.

View API docs

Your first scrape.
Sixty seconds.

$1 free balance. No credit card. No SDK.Just a POST request.

terminal
curl -X POST https://api.alterlab.io/v1/scrape \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "formats": ["markdown"]}'

No credit card required · Up to 5,000 free scrapes · Balance never expires

    Job Queue — Web Scraping Glossary | AlterLab