Forum Discussion

Miron_du_Plessi's avatar
Icon for Nimbostratus rankNimbostratus
Sep 27, 2010

Hiding Web Server




We have a current requirement that involves serving web content from two separate web servers trying to make them look like the same from the clients perspective. (this is for migration purposes)



Essentially what we would like is if the new web server(A) does not have the content the user requests , the BIGIP through an irule will capture the 404 error from A then itself check if the content exists on B and serve it to the client. This is so that the client does not have to be given a redirect to the old server and is therefore oblivious to where the content was retrieved.



Currently we have only been able to have the LTM redirect the client. so the client makes a connection to they will get a redirect top so the client willl see the difference.



do you know if it is possible to hide the webserver.



Kind Regards




2 Replies

  • Hamish's avatar
    Icon for Cirrocumulus rankCirrocumulus
    Interesting option... Yes it should be possible. The SERVER_RESPONSE event is the one to use to detect the 404. Then it should be possible to select a different poolmember and reissue the request...



    You'd need to keep a bit of state so you don't get stuck in a forever loop if the document genuinely doesn't exist though.



  • As Hamish suggested, you can check the server response code in HTTP_RESPONSE. You can use HTTP::request in HTTP_REQUEST to save the HTTP request headers. You can use HTTP::retry to retry the request. If you need to potentially retry requests with payloads, you would need to collect the request payload in HTTP_REQUEST with HTTP::collect and then access the payload in HTTP_REQUEST_DATA using HTTP::payload.



    Here is a post with a related example:



    Redirect if error




    And here is the main HTTP wiki page where you can get details on the mentioned commands and events: