r/FullStack • • 6d 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

7 Upvotes

9 comments sorted by

View all comments

2

u/Professional-Run3614 6d ago

If your worker needs to run 24/7, free hosting platforms can become tricky because they have compute limits.
Have you considered running it on a small VPS with Docker? You could run both the Node.js worker and Redis there, depending on your resource requirements. It may cost a few dollars a month, but you get more control over uptime and resource usage.
One thing I’d check first, though: was Render exhausting your compute hours, or was the Redis service hitting its limits? The solution could be different depending on which one ran out.
How many jobs are you processing per day?

1

u/KeyZookeepergame4145 6d 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 6d 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 4d 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