I built a background job runner for Node.js that works without Redis or SQS

Introducing Sidequest.js: A Simplified Background Job Runner for Node.js Without External Dependencies

In the world of web development, managing background tasks efficiently is crucial for building scalable and responsive applications. Many developers rely on external queue systems like Redis or cloud-based solutions such as Amazon SQS to handle job scheduling and execution. However, these systems can introduce complexity, additional costs, and dependency management challenges.

Recognizing these pain points, a developer has introduced Sidequest.js, a lightweight and robust background job runner designed specifically for Node.js applications. This tool emphasizes simplicity, isolation, and seamless integration, enabling developers to run background jobs without relying on external message queues or vendor lock-in.


Background and Motivation

Previously, the creator developed node-cron, a popular library for scheduling recurring tasks in Node.js, which amassed over 5 million downloads per month. While useful, a recurring pattern emerged: many applications were executing background jobs within their main Express server processes. This often resulted in I/O blocking, duplicate job executions across multiple instances, and overall less reliable job management.

These issues highlighted the need for a dedicated solution that could run background tasks independently, without the drawbacks associated with integrating external queue systems.


What is Sidequest.js?

Sidequest.js is a modern, lightweight background job runner for Node.js that:

  • Operates without external queues like Redis or SQS
  • Runs jobs in isolated worker threads to prevent blocking the main event loop
  • Supports multiple databases such as PostgreSQL, MySQL, SQLite, and MongoDB
  • Provides a rich set of features including job retries with exponential backoff, snoozing, prioritization, concurrency control, and a monitoring dashboard
  • Ensures high availability by allowing another node to pick up jobs if one fails or goes down

This design ensures non-blocking API responsiveness and reliable job execution without the need for complex infrastructure.


Key Features

  • Unique Job Execution: Ensures that certain tasks do not run concurrently
  • Retries and Backoff: Automatically retries failed jobs with configurable exponential backoff strategies
  • Job Snoozing: Delays job execution until a specified time
  • Prioritized Queues: Enables prioritization for critical tasks
  • Concurrency Management: Controls how many jobs run simultaneously
  • Built-in Monitoring Dashboard: Provides real-time visibility into job statuses and history


Leave a Reply

Your email address will not be published. Required fields are marked *