Skip to content

NTyagi710/distqueue

Repository files navigation

DistQueue — Distributed Job Queue System

A production-grade background job queue built with Bun, TypeScript, and MySQL.

Features

  • REST API to submit jobs
  • 10 concurrent workers processing jobs in parallel
  • Automatic retry with exponential backoff (up to 3 attempts)
  • Live dashboard showing real-time queue stats
  • Load tested at 500+ jobs/minute

Tech Stack

  • Runtime: Bun
  • Language: TypeScript
  • Database: MySQL
  • Frontend: Vanilla HTML/JS

Setup

  1. Clone the repo
  2. Run bun install
  3. Copy .env.example to .env and fill in your MySQL credentials
  4. Run mysql -u root -p < schema.sql to create the database
  5. Run bun run server.ts to start the API
  6. Run bun run worker.ts to start the workers

Usage

Submit a job: ``` curl -X POST http://localhost:3000/jobs
-H "Content-Type: application/json"
-d '{"type": "send_email", "payload": {"to": "user@gmail.com"}}' ```

Open dashboard.html in your browser to monitor jobs live.


**3 — Create a `.gitignore` file:**

node_modules/ .env bun.lock

About

Distributed background job queue — Bun, TypeScript, MySQL | REST API + 10 concurrent workers + retry logic + live dashboard

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors