Setup Application Request Routing (ARR) Environment¶
This document provides information about setting up the ARR Environment using IIS; this is useful to testing scaling-out when load balancer are not available.
Procedure¶
- Create 3 FVMs
- Rdp into VM ARR_FVM
- Install Microsoft Web Platform Installer
- Run it and search for Application request routing.
- Install Application request routing 3.0 or latest.
- Open IIS Manager
- Open Server Farms
- Right click and click Create Server Farm
- Enter a server farm name ARR_FVM and click next
- Enter FVM 2 server address and click address
- Enter FVM 3 server address and click address
- Click yes to the following message Rewrite Rules: "There are URL rewrite rules on other server farms that can conflict with the rule that you are about to create for this server farm. Do you want to create this rule?"
- For load balancing to work with Identity Server, the FVMs need to share Security Keys. To do this we need a shared windows folder. I put it on the ARR_FVM called AuthenticationSecurityKeys.
- Set appsettings DataProtectionSettings for using Database to point to this as follows.
a. Rdp into FVM 2 and FVM 3
b. Change in appsettings.json for projects so the urls point back to the ARR_FVM
Authentication
"DataProtectionSettings": {
"Mode": "Database",
"ExpirationInterval": "90.00:00:00"
},
"SecurityApi": "http://ARR_FVM.office.sbs/SecurityApi"
"SecurityApiConfigurationCacheEnabled": false
Authorization "AuthenticationServer": "http://ARR_FVM.office.sbs/Authentication", "SecurityApi": "http://ARR_FVM.office.sbs/SecurityApi" "SecurityApiAuthorizationCacheEnabled": false "MessageBusSettings": { "RabbitMqSettings": { "ServerUri": "rabbitmq://oxbus/ARR_FVM", }, "Consumers": [ { "QueueName": "EffectivePermissionChangedMessageName_FVM 1 or 2" } ] } SecurityAPI "AuthenticationServer": "http://ARR_FVM.office.sbs/Authentication", "MultitenancyDatabase": "Data Source=ARR_FVM;Initial Catalog=MultiTenancyDatabase;Trusted_Connection=True;MultipleActiveResultSets=true" "SecurityApi": "http://ARR_FVM.office.sbs/SecurityApi" "ServerUri": "rabbitmq://oxbus/ARR_FVM",
You are then ready to send requests to the ARR_FVM machine such as login, logout, get access token, get effective permissions etc.