Can I have two hangfire servers on different machines

I want to add any number of background servers on demand, when load increase add new hang server(it’s a new vm) does it possible?
Other question so:
1 So basically can I have hangfire servers located on different machines and looking in same db.
2 And how job can be executed remotely on other machine if in storage we have only type, method name and args serialized…
So remote server should have same type impl within hangfire server so it can create an instance of it.

Yes you can have 2 instances of hangfire running on different computers but pointing to the same storage.

We don’t spin up new servers with load, but we do have a collection of 5 servers that all process the same hangfire queue. It’s still a pretty new set up but it seems to be working well, just a few hiccups when the job runs long.

1 Like