0

Hi,

There is a requirement to route requests on two different front-end servers on the basis of URL.

First I would like to brief about the topology. There are two WFEs in the farm having host names WFECHD and WFEBLR. In order to configure load balancing, I registered a host name and an IP in the DNS as shown below:

IP : 172.20.XX.XX

HostName : WFEPOC.domainname.com

After these setttings, I configured NLB; created a cluster and assigned the above IP to it and added both the hosts(i.e. WFECHD and WFEBLR) to it. Now, in central admin created a root site collection using the same host which was reserved in DNS i.e. http://WFEPOC/. I checked the behavior of requests  and confirmed that NLB is sending requests to both servers. 

Request Managment

Now, created two path based site collections i.e. http://WFEPOC/sites/chd and http://WFEPOC/sites/blr and aimed to route requests for these site collections on WFECHD and WFEBLR respectively. 

After configuring two machine pools i.e. CHD Machine Pool and BLR Machine Pool for both hosts, I wrote below rules:

//FOR CHD Machine Pool

$mpName = “CHD Machine Pool”

$ruleName = “Serve all requests for CHD site collection from the $mpName”

$critera = New-SPRequestManagementRuleCriteria -Property Url -MatchType Regex -Value “^.*\b(chd)\b.*$”

$mp = Get-SPRoutingMachinePool -RequestManagementSettings $rmSettings -Name $mpName 

$rule = Add-SPRoutingRule -RequestManagementSettings $rmSettings -Name $ruleName -ExecutionGroup 0 -MachinePool $mp -Criteria $critera

//FOR BLR Machine Pool

$mpNameB = “BLR Machine Pool”

 $ruleNameB = “Serve all requests for CHD site collection from the $mpNameB”

$criteraB = New-SPRequestManagementRuleCriteria -Property Url -MatchType Regex -Value “^.*\b(blr)\b.*$”

$mpB = Get-SPRoutingMachinePool -RequestManagementSettings $rmSettings -Name $mpName

 $ruleB = Add-SPRoutingRule -RequestManagementSettings $rmSettings -Name $ruleNameB -ExecutionGroup 0 -MachinePool $mpB -Criteria $criteraB

These are not giving desired results. Kindly advise.

Thanks in advance!

(Visited 24 times, 1 visits today)
Add a Comment