0

I have a public IP mapped to my router and 3 servers in LAN connected to the Router. 1st Server is ARR LoadBalancer and 2nd and 3rd Servers are hosted with a Website on port 80. Doing port forwarding on router for port 80 to ARR LoadBalance Server.

I have selected Load Balance Algorithm as: Weighted Round Robin, and Load distribution as Even distribution on both the Server Farms.

Always the top URL Rewrite is hit, the load is not distributed in RoundRobin fashion.

I have written URL Rewrite as below: gc80 is ServerFarm for Server1. gc2_80 is ServerFarm for Server2.

<rewrite>
            <globalRules>
                <clear />                
                <rule name="PublicIP_to_Server1_80" stopProcessing="true">
                    <match url=".*" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{HTTP_HOST}" pattern="PublicIPHere*" />
                    </conditions>
                    <action type="Rewrite" url="http://gc80/{R:0}" />
                </rule>
                <rule name="PublicIP_to_Server2_80" stopProcessing="true">
                    <match url=".*" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{HTTP_HOST}" pattern="PublicIPHere*" />
                    </conditions>
                    <action type="Rewrite" url="http://gc2_80/{R:0}" />
                </rule>                
            </globalRules>
        </rewrite>
        <proxy enabled="true" />

Please let me know if i am missing anything for LoadBalancing?

Mahen
  • 3
  • 5
  • https://learn.microsoft.com/en-us/iis/extensions/configuring-application-request-routing-arr/http-load-balancing-using-application-request-routing That can tell what mistakes you made. – Lex Li Jul 31 '20 at 13:58
  • Thanks for the link. I got it working now. – Mahen Jul 31 '20 at 19:58
  • I have load balanced site on port 80, But I also have another site on the same servers running on port 81. I am not able to load balance site on port 81. I tried creating a new server farm for port 81. But its not working. I tried writing some URL Rewrite rules, but could not get it working. I will also need to handle https. Can you please guide me with any link for port 81 and https? – Mahen Jul 31 '20 at 20:20
  • I got it working for port81 also. I should be able to handle https as well. I would be creating SAN certificate for both port 80 and 81 ports. Hope SAN cert is a good option. – Mahen Aug 01 '20 at 11:48
  • As IIS 8 and above support SNI, you don't really need SAN cert which can be quite expensive from some CAs. – Lex Li Aug 01 '20 at 14:59
  • Ok, Thanks. I will check. – Mahen Aug 01 '20 at 16:49

0 Answers0