2 Replies Latest reply: Mar 1, 2010 1:29 PM by 807573 RSS

    Perfdump Not Working on a Reverse Proxy

    807573
      Hello All,

      I'm running Sun Web Proxy 4.0.12 and need to turn on perfdump to try and find why my proxy is performing so slowly.

      I've followed the instructions in the Performance Tuning guide and have placed the NameTrans and Object lines in the obj.conf, but the server seems to ignore the NameTrans line which directs it to the perf object when it receives a request for /.perf. Instead, it processs the NameTrans line which maps the request to the web server for which my proxy is proxying requests. The webserver has no idea what to do with a request for .perf, and returns a 404.

      My understanding of how the NameTrans and flow operate must be flawed. The documentation states that the server will execute each NameTrans until it finds one which succeeds. In the case of a request for /.perf, the very first NameTrans should be a perfect match. This isn't happening, and I don't understand why.

      Here is my obj.conf. This proxy is configured to send all requests to the web server dev1a-site.com Since that web server only listens on port 80, it rewrites the URL to get rid of the https://. The proxy also hosts the SSL cert for the web server. It redirects requests for "/" to a specific page. Any help would be deeply appreciated.

      <Object name="default">
      AuthTrans fn="match-browser" browser=".*MSIE.*" ssl-unclean-shutdown="true"
      NameTrans fn="assign-name" name="stats-xml" from="(/stats-xml|/stats-xml/.*)"
      <Client security="on">
      NameTrans fn="home-page" path="/home"
      </Client>
      NameTrans fn="reverse-map" from="http://dev1a-site.com/" to="https://dev1a-site.com/" rewrite-location="true" rewrite-content-location="true"
      NameTrans fn="map" from="/" to="http://dev1a-site.com/" rewrite-host="true"
      PathCheck fn="url-check"
      PathCheck fn="check-acl" acl="default"
      ObjectType fn="block-ip"
      Service fn="deny-service"
      AddLog fn="flex-log" name="access"
      </Object>

      <Object ppath="/home">
      NameTrans fn="map" from="/home" to="http://dev1a-site.com/MTKRSite" rewrite-host="true"
      </Object>

      <Object name="file">
      PathCheck fn="unix-uri-clean"
      PathCheck fn="find-index" index-names="index.html"
      ObjectType fn="type-by-extension"
      ObjectType fn="force-type" type="text/plain"
      Service fn="deny-service"
      Service fn="send-file"
      </Object>

      <Object ppath="http://.*">
      Service fn="proxy-retrieve"
      </Object>

      <Object ppath="https://.*">
      Service fn="proxy-retrieve"
      </Object>

      <Object name="perf">
      Service fn="service-dump"
      </Object>
        • 1. Re: Perfdump Not Working on a Reverse Proxy
          807573
          The "perf" object appears to be unused in your obj.conf. The "assign-name" SAF seems to take a value of "stats-xml" for the "name" parameter.
          • 2. Re: Perfdump Not Working on a Reverse Proxy
            807573
            Hello and thanks for your response. I've made the change that you indicated, but am still receiving a 404 when trying to access www.site.com/.perf. It appears that the reverse proxy simply forwards this request right to the webserver (which can't serve it), rather than handling it itself

            Here is my modified config:

            <Object name="default">
            <Client security="on">
            NameTrans fn="home-page" path="/home"
            </Client>
            AuthTrans fn="match-browser" browser=".*MSIE.*" ssl-unclean-shutdown="true"
            NameTrans fn="assign-name" from="/.perf" name="perf"
            NameTrans fn="reverse-map" from="http://dev1a-site.com/" to="https://dev1a-site.com/" rewrite-location="true" rewrite-content-location="true"
            NameTrans fn="map" from="/" to="http://dev1a-site.com/" rewrite-host="true"
            PathCheck fn="url-check"
            PathCheck fn="check-acl" acl="default"
            ObjectType fn="block-ip"
            Service fn="deny-service"
            AddLog fn="flex-log" name="access"
            </Object>

            <Object ppath="/home">
            NameTrans fn="map" from="/home" to="http://dev1a-site.com/MTKRSite" rewrite-host="true"
            </Object>

            <Object name="file">
            PathCheck fn="unix-uri-clean"
            PathCheck fn="find-index" index-names="index.html"
            ObjectType fn="type-by-extension"
            ObjectType fn="force-type" type="text/plain"
            Service fn="deny-service"
            Service fn="send-file"
            </Object>

            <Object ppath="http://.*">
            Service fn="proxy-retrieve"
            </Object>

            <Object ppath="https://.*">
            Service fn="proxy-retrieve"
            </Object>

            <Object name="perf">
            Service fn="service-dump"
            </Object>