Open Closed

Webhooks management with multiple instances #10695


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)
  • 0
    musa.demir created
    Support Team

    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?

  • 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.

  • 0
    musa.demir created
    Support Team

    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.

  • 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

  • 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.