Workflow Instance correlation in load balanced scenario

Kilitli Workflow Instance correlation in load balanced scenario

  • 04 Ekim 2011 Salı 11:40
     
     

    Hello everyone,

    I have the following scenario in the Windows Server AppFabric environment:

    there are two hosts (A,B) which are load balanced with hardware LB (and have shared instance store). There is a WF service deployed on each of them. An instance of the service is autostarted on host A and it posts a message to the 3rd party service. Then it waits for the response with correlation handle initialized. So after a period of time it gets persisted and unloaded. Then a message arrives from the 3rd party service to the LB and it redirects it to the B host. At this point a redirection exception is thrown saying that the resource with some URL has been moved somewhere. But it seems that actually the service at host A is called after that.

    So the questions are:

    1. what is the suggested AppFabric environment configuration here (with LB)?

    2. is it possible to get rid of redirection exceptions?

    3. does IIS Web Farm support such scenarios and is it able to redirect the requests to the correct hosts?

    Thank you very much!

    Semion


    Semion

Tüm Yanıtlar

  • 04 Ekim 2011 Salı 16:04
     
     
    I have the same questions, hopefully someone has some answers.
  • 04 Ekim 2011 Salı 19:26
    Moderatör
     
     

    For redirection exceptions, is this just a 302 or is there more information?

     


    If this answers your question, please use the "Answer" button to say so | Ben Cline
  • 04 Ekim 2011 Salı 19:31
    Moderatör
     
     

    The AppFabric web farm guide at http://social.technet.microsoft.com/wiki/contents/articles/appfabric-web-farm-guide-intro.aspx mentions software-based NLB (http://technet.microsoft.com/en-us/library/bb742455.aspx). So I am wondering if your hardware NLB does things differently than traditional Windows NLB like with an F5 or other hardware-based accelerator?

    Are you sure the redirection exception is IIS or AppFabric based?

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
  • 04 Ekim 2011 Salı 19:38
     
     
    In my case we use F5 load balancers and I'm sure it's coming from AppFabric. I'll have to check with my F5 guys to see if we can get it to handle the redirect internally.
  • 05 Ekim 2011 Çarşamba 06:09
     
     

    Hello Ben,

    this is the exact exception I get, Is it thrown by IIS or AppFabric?:

    System.ServiceModel.Channels.RedirectionException: The requested resource has moved to the one of the following locations:
       http://.../Service.xamlx

       at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at System.ServiceModel.Activities.Dispatcher.ControlOperationInvoker.ControlOperationAsyncResult.End(Object[]& outputs, IAsyncResult result)
       at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeEnd(MessageRpc& rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage7(MessageRpc& rpc)
       at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

    The link which is mentioned in the exception points to another node in LB.

    Thank you.


    Semion
    • Düzenleyen Semion.A 05 Ekim 2011 Çarşamba 06:10
    •  
  • 05 Ekim 2011 Çarşamba 22:44
    Moderatör
     
     

    Semion, that stack trace is showing a WCF problem so I would guess that maybe your LB is redirecting to http when you expect https. Does this sound accurate to you? Or are you expecting an http endpoint?

    I am suggesting this because I have seen a similar scenario with F5 and WCF. Resolution depends on your hardware and configuration, but if I remember correctly it was resolved through WCF configuration by altering the security mode settings.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
  • 07 Ekim 2011 Cuma 06:43
     
     Yanıt

    Hi Ben,

    I dont use https in this case. It seems that there is some kind of instance locking problem here. I have set this setting

    <workflowIdle timeToUnload="00:00:00" /> to unload the instance immediatelly. And now I get Redirection exceptions rarely but the problem still exists. Is that true:

     that if a WF instance has been persisted and is still running on host A and a message arrives on host B (via LB) then AppFabric is unable to pass that message to the running instance (maybe because AppFabric has no knowledge of the LB hosts). So the only way to continue execution of the WF instance is to unload it to InstanceStore (from host A) and let the AppFabric on host B load it again?

    Thank you.


    Semion
    • Düzenleyen Semion.A 07 Ekim 2011 Cuma 09:00
    • Yanıt Olarak İşaretleyen Semion.A 15 Eylül 2012 Cumartesi 07:58
    •