I am working on a scenario but not making much headway. My customer has multiple business units spread across geographical regions - North America, South America, Europe and Australia. Company's main unit is in North America. All Corporate Communications
(New Announcements, releases through video files mainly) are issued from this location in North America. Customer wants that all corporate communications will be through a common url (for eg:
http://communication.abc.com) and users from different regions will view these communications via the common url locally from their regional site servers where a copy of the streaming media files will be present.
So in effect there will be one common website designated by the common url. Users from different location will hit the common url but will be redirected to their local site servers to view the latest corporate updates. The idea is to reduce the network bandwidth
and increase performance since the files will ultimately be played locally.
Customer wants to implement this using Application Request Routing and URL Rewrite modules. Can this be implemented? What is the easiest approach?
Would really appreciate any help or direction you can provide..
I do not think ARR is adapted to your issue. The typical ARR configuration is to forward requests to content servers based on HTTP headers, server variable, and load balance algorithms.
In your case, there is no contents(corporate updates files) on regional site servers. So ARR will not take effect.
To learn more about ARR , you can refer to the following article:
The corporate files will be there on the regional site servers. The site servers are actually the file and print servers . All the communications will be there on the site servers. The real problem is that there will be one communication url as I mentioned
above and that url will be provided to all the users. That URL will be bound to the ARR server where the site servers (content servers) will be added in the farm. When the users will access ARR is supposed to play that video file locally from the regional
site server for that user
I still think this is unavailable to have one common URL, I have mentioned above "ARR forwards requests based on http headers, server variables". With one common URL , ARR can not capture http header&server variable, thus will not forward requests to proper
content server.
You can specify a content server in the URL(http://communication.abc.com/server1), then create a rewite rule. ARR wil forward request to this server. For more information, please refer to the following article:
Is it possible to trap the REMOTE_HOST server variable and based on its value redirect the request to a specific server within the ARR server Farm including the pageo or image file that was requested?
For example, if a user types
http://communication.abc.com/example.jpg, the rewrite rule will get the client computername by checking the remote_host variable and based on its value will redirect the user to a specific server within the ARR farm which will then display the example.jpg
file
We have enabled reverse dns lookup on the ARR servers and have verified that remote_host variable does contain the client computername
Actually the request will be made from the client workstation, so the REMOTE_HOST variable will contain the client workstation name. Now in my company the client pcs are named according to the site where they are located which means that the workstation
name will contain the site code. My intention is to check the remote_host variable to see if it matchs any site name condition and if it matches then it will redirect to the site server at that site
For eg: if the remote_host gives the value xyz-12965 where "xyz" corresponds to a site abbreviation then, the rewrite rule will check the REMOTE_HOST input to match for the value xyz and redirect the client to the site server at the xyz site which be somewhat
like this
I ultimately went on to write a HTPModue to create the routing rules which is working fine now but still I am awaiting the pilot testing results to absolutely sure it will work
The custom HTTPModule that I created is working fine but it is taking around 20-22 secs to display the video which is not acceptable to the customer. Customer wants the video to be displayed within 10 secs. The httpmodule works by
1) Capturing the IP address of the client through the REMOTE_ADDR server variable
2) Queries the active directory sites and services to find the specific site to which the IP Address belongs
3) There is a sql server database which has a mapping of the servers against the sites. The program queries the database to get the server name against the site
4) The program then redirects the user to the specific site server and video is playes from that site servers
5) It has been seen that the redirect works within 7-10 secs but it takes another 10-12 minutes for the video to be initialized and then start playing. So the overall time when the user actually sees the video playing is close to 20-22 secs. So the helper
function (windows media player) that displays the video is taking a long time
Is there any way this time can be minimized so that the overall time is within 10 secs?
I can post the code if you would want to review it...
LearningIIS7
49 Posts
Application Request Routing and URL ReWrite
Apr 03, 2012 09:00 AM|LINK
I am working on a scenario but not making much headway. My customer has multiple business units spread across geographical regions - North America, South America, Europe and Australia. Company's main unit is in North America. All Corporate Communications (New Announcements, releases through video files mainly) are issued from this location in North America. Customer wants that all corporate communications will be through a common url (for eg: http://communication.abc.com) and users from different regions will view these communications via the common url locally from their regional site servers where a copy of the streaming media files will be present. So in effect there will be one common website designated by the common url. Users from different location will hit the common url but will be redirected to their local site servers to view the latest corporate updates. The idea is to reduce the network bandwidth and increase performance since the files will ultimately be played locally.
Customer wants to implement this using Application Request Routing and URL Rewrite modules. Can this be implemented? What is the easiest approach?
Would really appreciate any help or direction you can provide..
visor09
27 Posts
Re: Application Request Routing and URL ReWrite
Apr 05, 2012 07:45 AM|LINK
Hi,
I do not think ARR is adapted to your issue. The typical ARR configuration is to forward requests to content servers based on HTTP headers, server variable, and load balance algorithms.
In your case, there is no contents(corporate updates files) on regional site servers. So ARR will not take effect.
To learn more about ARR , you can refer to the following article:
Using the Application Request Routing Module
http://learn.iis.net/page.aspx/489/using-the-application-request-routing-module/
LearningIIS7
49 Posts
Re: Application Request Routing and URL ReWrite
Apr 05, 2012 08:34 AM|LINK
visor09
27 Posts
Re: Application Request Routing and URL ReWrite
Apr 06, 2012 07:28 AM|LINK
OK,
I still think this is unavailable to have one common URL, I have mentioned above "ARR forwards requests based on http headers, server variables". With one common URL , ARR can not capture http header&server variable, thus will not forward requests to proper content server.
You can specify a content server in the URL(http://communication.abc.com/server1), then create a rewite rule. ARR wil forward request to this server. For more information, please refer to the following article:
Reverse Proxy with URL Rewrite v2 and Application Request Routing
http://learn.iis.net/page.aspx/659/reverse-proxy-with-url-rewrite-v2-and-application-request-routing/
LearningIIS7
49 Posts
Re: Application Request Routing and URL ReWrite
Apr 12, 2012 02:36 PM|LINK
Is it possible to trap the REMOTE_HOST server variable and based on its value redirect the request to a specific server within the ARR server Farm including the pageo or image file that was requested?
For example, if a user types http://communication.abc.com/example.jpg, the rewrite rule will get the client computername by checking the remote_host variable and based on its value will redirect the user to a specific server within the ARR farm which will then display the example.jpg file
We have enabled reverse dns lookup on the ARR servers and have verified that remote_host variable does contain the client computername
As always, appreciate your inputs...
visor09
27 Posts
Re: Application Request Routing and URL ReWrite
Apr 13, 2012 06:02 AM|LINK
Hi,
It sounds like a good idea, I teseted with following rule, and it worked well:
<rule name="To content server" enabled="true" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{REMOTE_HOST}" pattern="(.*)" />
</conditions>
<action type="Redirect" url="http://{C:0}/{R:0}" />
</rule>
The rule will capture the remote server and then redirect to the remote server.
LearningIIS7
49 Posts
Re: Application Request Routing and URL ReWrite
Apr 14, 2012 04:44 PM|LINK
Actually the request will be made from the client workstation, so the REMOTE_HOST variable will contain the client workstation name. Now in my company the client pcs are named according to the site where they are located which means that the workstation name will contain the site code. My intention is to check the remote_host variable to see if it matchs any site name condition and if it matches then it will redirect to the site server at that site
For eg: if the remote_host gives the value xyz-12965 where "xyz" corresponds to a site abbreviation then, the rewrite rule will check the REMOTE_HOST input to match for the value xyz and redirect the client to the site server at the xyz site which be somewhat like this
http://asi-xyz/example.jpg
I hope I am able to explain to you my scenario here..if not let me know and I will try to explain again
LearningIIS7
49 Posts
Re: Application Request Routing and URL ReWrite
Apr 29, 2012 09:10 PM|LINK
LearningIIS7
49 Posts
Re: Application Request Routing and URL ReWrite
May 15, 2012 08:31 AM|LINK
I ultimately went on to write a HTPModue to create the routing rules which is working fine now but still I am awaiting the pilot testing results to absolutely sure it will work
Thanks to everyone who helped!!!
LearningIIS7
49 Posts
Re: Application Request Routing and URL ReWrite
Jul 06, 2012 01:32 PM|LINK
The custom HTTPModule that I created is working fine but it is taking around 20-22 secs to display the video which is not acceptable to the customer. Customer wants the video to be displayed within 10 secs. The httpmodule works by
1) Capturing the IP address of the client through the REMOTE_ADDR server variable
2) Queries the active directory sites and services to find the specific site to which the IP Address belongs
3) There is a sql server database which has a mapping of the servers against the sites. The program queries the database to get the server name against the site
4) The program then redirects the user to the specific site server and video is playes from that site servers
5) It has been seen that the redirect works within 7-10 secs but it takes another 10-12 minutes for the video to be initialized and then start playing. So the overall time when the user actually sees the video playing is close to 20-22 secs. So the helper function (windows media player) that displays the video is taking a long time
Is there any way this time can be minimized so that the overall time is within 10 secs?
I can post the code if you would want to review it...