Hi, I need to run two or more instance of ABP (AspNetCore + Angular version >=9.1.0) hosted in Azure AppService (Docker or files deploy) with autobalancing. There are many things to consider when two instance are running simultaneously. AspnetZero provide a out-of-box solution for shared cache with native Redis support. But what about background and recurring jobs? And what about SignalR ? These services cannot run twice in the same time otherwise data locks, data duplicates and many other problems can happen.
How do you sugguest to setup AspNetZero to support this scenario? Thank you for your advices
8 Answer(s)
-
0
Hi @ivanosw1
- what about background and recurring jobs?
For this, you can use Hangfire or if you want to use ABP's default implementation, you can enable background jobs in just 1 instance and disable on others.
- what about SignalR ?
You can use Azure SignalR service which works out of the box with AspNet Zero.
-
0
I must do a clarification about the question no 1.
The instances are created by Azure loadbalancer automatically and I don't know which and how many instances are running at same time. So is not possible apply your suggestion.
All background/jobs's system I think should have an interface like the Cache, so you can replace with a external well known scheduler service.
-
0
Hi,
Yes, you can easily use Hangfire, see https://aspnetboilerplate.com/Pages/Documents/Hangfire-Integration.
-
0
Ok, That's a great thing !! I had missed this detail beacause we use quartz. Thank you.
-
0
But, wait a moment. Hangfire is integrated in Aspnet zero, so, two instance of aspnet zero has two instance of hangfire. The problem is still alive.
-
0
Hi, some news about this topic? Is very important for a cloud based installation.
Thank you.
-
0
Hi @ivanosw1
As far as I remember, latest version of Hangfire handles this situation. Did you have a chance to try it ?
-
0
Ok @ismcagdas
I'll look more deeply in Hangfire configuration.
I suppose your are interested too about this topic and I'll need your technical support to evaluate eventually changes to apply to AspNetZero in order to support multi instances.
It'll take some time and so for the moment I close the ticket.