Load Balancing between Hangfire Servers

I have 3 Hangfire servers that all are connected to the same database. Once nightly I have a Recurring job that will trigger multiple Enqueued jobs.

For example I have server A,B, and C, at 10 pm my Recurring job runs on server A and it Enqueues 15 Background Jobs. However, all 15 jobs will process on server A. I want there to be 5 jobs on A, 5 on B and 5 on C.

Is it possible to balance the load like this?

Hello @hasmyr91,
Have you managed to realize the load balancing between hangfire servers?
Thanks for answer.
Best regards.
Victor

@hasmyr91 or @izvictor : Were you guys managed to identify this?

Hello @shahhd,
The only thing I managed is to define 3 job queues :

  1. queue 1 - treated by server 1
  2. queue 2 - treated by server 2
  3. queue 3 - treated by server 3

When the job is created you should dynamically add the job to the corresponding queue based on the number of jobs on each server.
You can get the processing job and on each server the job is running so you can count the number of jobs per server.
Hope this can help.