View Complete Thread
  • Rovastar Rovastar

    5460 Posts

    MVP

    Moderator

    Re: Round Robin with Sticky Session. Is it possible?

    Dec 04, 2018 01:44 AM|Rovastar|LINK

    I have never tired to setup affinity with a HTTP variable I always use the cookies and as ARR assigns these I have never had your problem so unsure about the best way to solve it.

    However this is what I would do.

    I would created 2 farms instead of just 1 and with the same servers in each. Lets call these FARM1withHeader and FARM1withoutHeader

    FARM1withHeader rewrite rule: The first farms URL rewrite rule would be the same as yours is now but have an (additional) condition in there that is HTTP_STICKY_HEADER value exist then goto FARM1withHeader

    Then you have another rule that you place below the first one.

    FARM1withoutHeader rewrite rule: This is just a general round robin rule with the servers in.

    The logic is that if it contains the HTTP header it matches the conditions and goes to 1 farm and the next rule will therefore not have a header and round robin and goto the other farm. As both farms contain the same servers your traffic should sticky the correct/relevant ones.

    It is a little messier but should be simple enough to setup.

    Troubleshoot IIS in style
    https://www.leansentry.com/