I am trying to implement a multitenant application that uses hangfire for background jobs. I want the tenants to be isolated, so they won’t affect other tenants.
Currently, I achieve this behaviour by using a queue for each tenant and creating a server (for each tenant) that listens only on this queue. Can this result in performance issues? Will all the servers be querying the queues continuously?
There may be up to 100 tenants - resulting in 100 Hangfire Servers (that run on a single machine)
Is this how you would implement a behaviour like this?
Additionally, we want some jobs to run synchronous and some that run asynchronous in a queue. My idea for this would be to create two servers for each tenant, where one only has 1 worker count and the other one more than one.
But in this example, we would have to instantiate 200 Hangfire Servers for 100 tenants. Again, do you think that this results in performance issues?
Or is there any simpler solution for this problem?
Thanks in advance