Forum Discussion

sundogbrew's avatar
sundogbrew
Icon for Altocumulus rankAltocumulus
Nov 05, 2013

Adding a file to the F5 for download

I thought I submitted this yesterday but it didn't show up?

 

I am having networking problems slowness and inconsistency and have an idea about diagnostics. I have a script that I can run from my machine against a .js file which is part of a bunch of our apps. The script downloads the file 100 times and then averages the time it takes as well as writing out each time to a file. It shows a lot of inconsistency. I am wondering if there is a way to put that file directly on the F5 that can be downloaded for testing. I am trying to narrow it down to reaching the F5 and its response without taking any of the proxy and communication to its nodes into account. Does that make any sense? Can you create a virtual host that answers all by itself and can provide a file without forwarding to a pool? I know that's not the point of the F5 but it might help me out in this situation. I tried to look at the document root of the login page but that is read only filesystem. Any help would be greatly appreciated. Thanks Joe

 

5 Replies

  • You can do this with the HTTP::respond and iFiles commands. Take a look at the iFiles wiki page for a good example:

    https://devcentral.f5.com/wiki/irules.iFile.ashx

    And here's another example:

    when HTTP_REQUEST {
        if { [string tolower [HTTP::uri]] equals "/test.js" } {
            HTTP::respond 200 content [ifile get test_js] "Content-Type" "application/javascript"
        }
    }
    
  • Thanks guys, I was able to use the ifile and can get the file. By the way What Lies Beneath, it isn't so much that it is slow, but it is inconsistent. Downloading a 450k .js file 100 times takes like 60ms and then probably 10 times sporadically it will take 3 to 6 seconds.

     

    Thanks Joe

     

  • Hey WLB, I kind of over simplified the problem. The thing that is consistent is that it is inconsistent. I can run it for 1000 iterations and be happy with the results maybe a couple outside the norm then I can run it a few minutes later and have it look terrible.

     

    Thanks Joe

     

  • Behind the F5 looks OK. I added the file to try to work my way forward and (hopefully) off the F5. When I run the script against the file served by the F5 I still see the problem so that says it is not behind the F5, it is either the F5 or in front of it. I have done some wireshark captures but can't find a smoking gun.