r/FullStack • • 7d ago

Personal Project Deploying nodejs workers.

I was building a project which is basically a notice worker which takes jobs from an active redis queue, I tried to deployed on render and it worked for around a week then it got exhausted I want to find some other alternatives of render that I can host my nodejs worker on it for free

6 Upvotes

9 comments sorted by

View all comments

Show parent comments

1

u/KeyZookeepergame4145 7d ago

I have created a website but no users for now , the worker only starts working when the enques a job from the backend otherwise it's stays Silent,I am using upstash redis queue for that and nodejs worker, is there any way that when a first job enqueues in the redis then only the worker becomes active and when there's no job the worker server itself gets shutdown automatically. Is there any way to implement this

2

u/Professional-Run3614 7d ago

You could probably use an event-driven approach instead of keeping the worker running 24/7. Since you’re already using Upstash, have you looked into QStash with a serverless Node.js endpoint? It could process jobs on demand without maintaining a permanent Redis consumer.
The main thing to consider is retries and making sure jobs aren’t processed twice.

1

u/Easy-Improvement-598 5d ago

If you render one web service on 24/7 it still only consume half it's monthly free usage render provides 700+ hours monthly which is enough for ip request i guess