We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

IIS 8/URL Rewrite/ARR setting client affinity per contextRSS

3 replies

Last post Jul 07, 2017 07:44 AM by Yuk Ding

  • IIS 8/URL Rewrite/ARR setting client affinity per context

    Jun 29, 2017 06:25 PM|JobaFett2012|LINK

    So, here is our situation:  We are using IIS 8 as a web frontend for a number of java apps hosted in Apache Tomcat.  Some of those apps require client affinity (sticky sessions) while some need to remain stateless (web services, etc).  I haven't seen a way to set a client affinity flag on a per server basis.  I am trying to keep this at the web server layer as we use either Azure Load Balancing or NLB depending on the environment, and I would like to keep the solution consistent.

    I thought about maybe creating 2 server farms, and putting all the stateless app URL Rewrites in one farm, leaving client affinity off, and putting the other apps in a 2nd server farm, setting client affinity on. I don't like the idea of adding the extra server farm layer to what's already there, but I haven't been able to find a better, or even another approach.

    Any input/assistance would be appreciated.  Best practices, articles, anything!

    Thank you.

  • Rovastar Rovastar

    5495 Posts

    MVP

    Moderator

    Re: IIS 8/URL Rewrite/ARR setting client affinity per context

    Jun 29, 2017 07:53 PM|Rovastar|LINK

    My first questions is why not make them all sticky/client affinity?

    If you have a stateless app there is no issue having it with the sticky/client affinity in fact it often makes life easier for troubleshooting. The only scenario I can think of is if you have traffic from only 1 (or very few) clients and therefore the load will not be balanced evenly.

    As for a per server basis that is not really a thing. You are basing the setup on a service rather than a server.

    Multiple farms are common and often the way to go. It gives a better representation of how logically the traffic flows about.

    Troubleshoot IIS in style
    https://www.leansentry.com/
  • Re: IIS 8/URL Rewrite/ARR setting client affinity per context

    Jun 30, 2017 04:57 PM|JobaFett2012|LINK

    Rovastar

    My first questions is why not make them all sticky/client affinity?

    If you have a stateless app there is no issue having it with the sticky/client affinity in fact it often makes life easier for troubleshooting. The only scenario I can think of is if you have traffic from only 1 (or very few) clients and therefore the load will not be balanced evenly.

    As for a per server basis that is not really a thing. You are basing the setup on a service rather than a server.

    Multiple farms are common and often the way to go. It gives a better representation of how logically the traffic flows about.

    I have considered a fully sticky setup, however, some clients have the potential to trigger certain web services many, many times in a row, so having them bound to one server for every stateless request they make has the potential to being that instance to it's knees.

  • Re: IIS 8/URL Rewrite/ARR setting client affinity per context

    Jul 07, 2017 07:44 AM|Yuk Ding|LINK

    Hi JobaFett2012,

    I'd like to know what context do based to set the client affinity? request body? or just URL. If you only need to route the user access the specific URL to specific server, set a rewrite rule to rewrite the URL to specific IP address could be available. Just put the new rule above the server farm routing rule for a higher priority.

    Best Regards

    Yuk Ding

    Yuk Ding

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.