Multiple Servers

We have a Hangfire webserver thats been running great for sometime, but the server has 3 bound IP addresses.

I have a job that, unfortunately, is required to always come from one IP address and have no control over that.

I would like to stand up another instance of hangfire on a server with 1 IP and point it to the same database as our running hangfire and only have the job code on the one server with 1 IP and NOT on the other server.

Will this work or cause issues? Any other ideas? I’d rather not have two hangfire databases.


You could use one specific queue just on that server.
You can even enqueue the required jobs for that queue programmatically, see: Queue - Customize the Job Queuese

I saw that, but I was trying to do it without modifying other jobs and many run on the default queue so it would try to run them on the single ip server and the code for the job has to be on the server or hanfire is very unhappy.

Lesson learned, always use queues and were moving hangfire to single IP servers.