A backend platform for asynchronous job processing, priority-based task distribution, automatic retries, and job monitoring built with Django REST Framework, Celery, Redis, and SQLite.
The Distributed Job Processing Platform allows users to submit background jobs through a REST API.
Django REST Framework handles job creation and retrieval, while Celery processes jobs asynchronously using Redis as the message broker. Jobs are assigned to priority-based queues and tracked throughout their lifecycle.
The platform also implements automatic retry handling for failed jobs and provides a web dashboard for monitoring job statistics and recent job activity.
┌─────────────────────┐
│ Client / Browser │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ Django REST │
│ API │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ Redis │
│ Message Broker │
└──────────┬──────────┘
│
┌──────────────┼──────────────┐
▼ ▼ ▼
HIGH Queue MEDIUM Queue LOW Queue
│ │ │
└──────────────┼──────────────┘
▼
┌─────────────────────┐
│ Celery Worker │
│ process_job() │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ SQLite │
│ Job Data/Status │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ Dashboard │
│ Job Monitoring │
└─────────────────────┘
- Asynchronous background job processing
- REST API for job creation and retrieval
- Celery-based task processing
- Redis message broker
- Priority-based queues
- HIGH, MEDIUM, and LOW job priorities
- Automatic retry mechanism
- Configurable maximum retry count
- Job failure handling
- Job lifecycle tracking
- Error message tracking
- Django monitoring dashboard
- Recent job monitoring
- Docker support
| Technology | Purpose |
|---|---|
| Python | Backend programming |
| Django | Web framework |
| Django REST Framework | REST API |
| Celery | Asynchronous task processing |
| Redis | Message broker |
| SQLite | Development database |
| Django ORM | Database operations |
| HTML/CSS | Monitoring dashboard |
| Docker | Containerization |
| Git & GitHub | Version control |
Client
↓
POST /api/jobs/
↓
Django creates Job
↓
Priority-based queue
↓
Redis
↓
Celery Worker
↓
Process Job
↓
Update Database
↓
SUCCESS
If processing fails:
Celery Worker
↓
Failure
↓
RETRYING
↓
Retry Attempt
↓
┌───┴────┐
↓ ↓
Success Failure
↓ ↓
SUCCESS RETRY
↓
Maximum Retries
↓
FAILED
QUEUED
↓
RUNNING
↓
┌───────────────┐
↓ ↓
SUCCESS RETRYING
↓
RUNNING
↓
FAILED
Jobs are routed to different Celery queues based on their priority.
HIGH
↓
high_priority
MEDIUM
↓
medium_priority
LOW
↓
low_priority
This allows jobs to be distributed according to their configured priority.
Failed jobs are automatically retried up to the configured maximum retry count.
The current implementation supports 3 retries by default.
Example:
Attempt 1
↓
Failure
↓
Retry 1
↓
Failure
↓
Retry 2
↓
Failure
↓
Retry 3
↓
Failure
↓
FAILED
The dashboard tracks the retry count for each job.
Example:
3 / 3
The API is available under:
/api/jobs/
POST /api/jobs/Example request:
{
"name": "Generate Sales Report",
"priority": "HIGH",
"payload": {
"task": "generate-report",
"month": "January",
"year": 2026
},
"max_retries": 3
}GET /api/jobs/GET /api/jobs/<job_id>/Example:
GET /api/jobs/JOB-67188FFB/{
"job_id": "JOB-67188FFB",
"name": "Final Retry Test",
"status": "FAILED",
"priority": "HIGH",
"retry_count": 3,
"max_retries": 3,
"error_message": "Simulated job failure"
}The Django dashboard is available at:
http://127.0.0.1:8000/
The dashboard displays:
- Total jobs
- Queued jobs
- Running jobs
- Successful jobs
- Failed jobs
- Retrying jobs
- Recent jobs
- Job IDs
- Job status
- Priority
- Retry count
- Creation time
The dashboard also provides a refresh option for retrieving the latest database state.
The retry mechanism can be tested by submitting a job containing:
{
"name": "Retry Test",
"priority": "HIGH",
"payload": {
"task": "retry-test",
"force_fail": true
},
"max_retries": 3
}When force_fail is set to true, the worker intentionally raises a simulated exception.
The job transitions through the retry process and is eventually marked as:
FAILED
after reaching the maximum retry count.
Distributed-Job-Processing-Platform/
│
├── config/
│ ├── settings.py
│ ├── urls.py
│ ├── celery.py
│ └── ...
│
├── jobs/
│ ├── migrations/
│ ├── models.py
│ ├── serializers.py
│ ├── views.py
│ ├── tasks.py
│ ├── urls.py
│ └── ...
│
├── templates/
│ └── jobs/
│ └── dashboard.html
│
├── .dockerignore
├── .gitignore
├── Dockerfile
├── manage.py
├── requirements.txt
└── README.md
git clone https://github.com/PulaBhavya/Distributed-Job-Processing-Platform.git
cd Distributed-Job-Processing-Platformpython -m venv venvvenv\Scripts\activatesource venv/bin/activatepip install -r requirements.txtpython manage.py migrateMake sure Redis is running before starting the Celery worker.
celery -A config worker --loglevel=info --pool=solocelery -A config worker --loglevel=infoOpen another terminal:
python manage.py runserverOpen the dashboard:
http://127.0.0.1:8000/
Open the API:
http://127.0.0.1:8000/api/jobs/
Check the Django configuration:
python manage.py checkRun database migrations:
python manage.py migrateCheck the API:
GET http://127.0.0.1:8000/api/jobs/
The project includes a Dockerfile for containerizing the Django application.
Docker can be used to create a consistent runtime environment for the application.
Redis is required for Celery message brokering.
- Designed a backend architecture for asynchronous job execution
- Developed REST APIs using Django REST Framework
- Integrated Celery for background task processing
- Configured Redis as the message broker
- Implemented priority-based job queues
- Implemented automatic retry handling
- Designed job lifecycle and status tracking
- Implemented failure and error handling
- Built a Django-based job monitoring dashboard
- Added Docker support
- Tested successful, failed, priority, and retry job scenarios
The platform was tested with multiple job scenarios:
| Test Scenario | Result |
|---|---|
| HIGH priority job | SUCCESS |
| MEDIUM priority job | SUCCESS |
| LOW priority job | SUCCESS |
| API job creation | SUCCESS |
| API job retrieval | SUCCESS |
| Celery worker processing | SUCCESS |
| Failed job handling | SUCCESS |
| Automatic retry mechanism | SUCCESS |
| Maximum retry handling | SUCCESS |
- PostgreSQL production database
- Multiple Celery worker nodes
- Job cancellation
- Scheduled jobs using Celery Beat
- API authentication and authorization
- Pagination and filtering
- Real-time updates using WebSockets
- Prometheus and Grafana monitoring
- Distributed tracing
- AWS deployment
- CI/CD using GitHub Actions
- Docker Compose for multi-service deployment
Bhavya Pula
- GitHub: https://github.com/PulaBhavya
- Portfolio: https://pulabhavya.github.io/
GitHub Repository:
https://github.com/PulaBhavya/Distributed-Job-Processing-Platform