I am using Hangfire to upload data of excel file(small-large) to database table(Insert\update) as background process in Asp.Net MVC web application.
We have team of 6-7 developers and our project (.Net) is configured in local IIS (on each developers’s machine) for development phase. So we do not use built in .Net web server in development and we run project from local IIS.
Howerver, Our database is at one server (Dev DB server) and we all connect to that database during development.
The hangfire database is on that Dev DB server and we all connect to that server for hangfire related activities.As we all devs run our own instance of IIS application,we all will have our own separate instance of hangfire service.
Now all the hangfire services on different IIS points the same database for Jobs. In this case when my service is running in can pick up any scheduled task from hangfire database and try to execute that,which can occur in error if same resources are being used.
As One solution ( which we dont want to follow if any other is there), In development environment may be we can have own hangfire database on our own local DB instance instead of Dev DB server but when this will go to production where we have load balancers,I am not sure how it will behave and what is the best solution for this.
Please do the needful asap.