Base solution for your next web application
Open Closed

Webhooks management with multiple instances #10695


User avatar
0
Ricavir created
  • Abp 6.4
  • Angular
  • .NET 5
  • What is product framework type (.net framework or .net core)?

Hi support team,

I've implemented webhooks system on my dev machine. Everything works as exptected.

My question is how does this behave with multiple intance ? Don't we have a risk that a webhook is executed twice or more if multiple instance are active ?

I'm currently having some issues when switching to 2 or more instances like cache management and related features. This is also leading to performance issues...

I know that some related issues are existing in your github repos (aspboilerplate and zero), thus, I would like your advice before planning a deployment on production.

Tks


5 Answer(s)
  • User Avatar
    0
    musa.demir created

    AspNet Zero's webhook implementation handles sending a webhook(not subscribing to a remote server's webhooks). And it uses background jobs to send webhook to client. There is no risk in using multiple instances.

    What are the issues you faced?

  • User Avatar
    0
    Ricavir created

    Hi @musa.demir,

    Thanks for your answer. I'm having issue with backgroundworkers on multiple instances, see https://github.com/aspnetzero/aspnet-zero-core/issues/4103. Thefore, I just wanted to confirm if something similar could happen with webhooks. In fact, background job should not be an issue on multiple instance context.

  • User Avatar
    0
    musa.demir created

    Since the webhook runs on backgroundjobs, I am not sure whether you will get the same error. Let's investigate your issue at https://github.com/aspnetzero/aspnet-zero-core/issues/4103.

  • User Avatar
    0
    Ricavir created

    I'm seeing more and more questions about multiple instance management for aspnetboilerplate. It is a very common use case to scale out an application according to workload. I'm currently facing these issue with Azure App Service.

    When an application is scalled, you can have lots of issues, like :

    • cache management (needs a Redis)
    • background workers
    • background jobs
    • webhooks
    • and others features

    It will be nice if you guys could create some docs or guidelines about multiple instance management with zero and aspnetboilerplate

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @ricavir

    You are right, we should prepare a Guide for this. I will create an issue and put it to the one of the next milestones. Thank you for pointing it out.