Forum Discussion

Chris_Day_10331's avatar
Chris_Day_10331
Icon for Nimbostratus rankNimbostratus
Dec 27, 2005

iRules for Individual Testing of Farm Servers

Hello wonderful people at DevCentral!

 

 

I have a follow-up to an earlier post I had made “iRule for Server Testing” (http://devcentral.f5.com/default.aspx/Default.aspx?tabid=28&forumid=5&postid=4603&view=topic) regarding the re-writing of URLs to facilitate testing of individual pool members for a particular application.

 

 

I was not successful in getting this to work, primarily because I believe I may have approached the problem from the wrong angle. I wanted to start this from the “top down” to see what all you smart people think is the best approach to achieve the end result.

 

 

THE PROBLEM:

 

 

We now have 16 web servers (among 16 app servers, db servers, etc) each of which services a number of applications (currently 6 but not likely to exceed 50 to 100). The applications are distinguished from one another only by HTTP/1.1 host header. As a new server is brought into production it is very difficult to ensure that it is responding properly for each of the 6 applications (and some other reasons beyond the scope of this post). As this number grows linearly, it is increasingly difficult and time consuming to test and more importantly locate issues with the deployment of the app to each of the boxes. A sample application served by each of the 16 boxes would be:

 

 

http://application1.company.com/

 

 

THE GOAL:

 

 

I was hoping to make it such that we could provision an additional VS (with either an internal or external IP) and enable testers to test a particular application on a particular server as follows:

 

 

http://application1.test.company.com/web001/ OR

 

http://application1.test.company.com/10.10.20.54/

 

 

This would require minimal DNS maintenance as new applications were added since it could be achieved by creating a single wildcard sub-domain (*.test.company.com pointing to VS IP Address). My goal was then to have the BIG-IP parse the “/web001/” portion and determine from a lookup table of some kind that I, the tester, was trying to load “application1.company.com” from server “web001”. In the latter example, it would obviously determine that I wanted to have the specified application served by the server who's IP address I provided.

 

 

The critical part was that the server be unaware of all the fancy rewriting going on and believe that the client was actually requesting http://application1.company.com/ (without the “/web001/”). I wanted the URLs back to the client to be re-written with the “/web001/” to enable the site to best tested/navigated seamlessly (i.e. not just the initial request).

 

 

As I am not a developer or particularly strong with iRules, I was hoping that someone could pick this up and help. There is no real rush on this, but needless to say the current solution which involves the continuous editing of hosts files is quite ugly.

 

 

I really appreciate all the help you guys have provided in the past (I still owe some beers) and thank you in advance for reading this post.

 

 

Cheers,

 

Chris