Forum Discussion

jonhd_205628's avatar
jonhd_205628
Icon for Nimbostratus rankNimbostratus
Jun 11, 2015
Solved

Classes / Data Groups searching

This is on LTMs, v11.3... Client URLs are of two possible forms: http://anyplace.com/streamX and http://anyplace.com/hls/streamX/playlist.m3u8 I've created a Data Group "streams" - the "String" v...
  • nitass_89166's avatar
    Jun 12, 2015

    Rather than using scan, is it not less resource-hungry to do something like:

    it seems you are right.

     scan
    
    root@(ve11c)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule qux
    ltm rule qux {
        timing on
    when HTTP_REQUEST {
      scan [HTTP::path] {/hls/%[^/]/playlist.m3u8} stream
    }
    }
    root@(ve11c)(cfg-sync In Sync)(Active)(/Common)(tmos) show ltm rule qux raw
    
     (raw)
    ---------------------------------
    Ltm::Rule Event: qux:HTTP_REQUEST
    ---------------------------------
    Priority                    500
    Executions
      Total                     500
      Failures                    0
      Aborts                      0
    CPU Cycles on Executing
      Average                 31477
      Maximum                108708
      Minimum                 26020
    
     getfield
    
    root@(ve11c)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule qux
    ltm rule qux {
        timing on
    when HTTP_REQUEST {
      set test [getfield [HTTP::path] "/" 3]
    }
    }
    root@(ve11c)(cfg-sync In Sync)(Active)(/Common)(tmos) show ltm rule qux raw
    
     (raw)
    ---------------------------------
    Ltm::Rule Event: qux:HTTP_REQUEST
    ---------------------------------
    Priority                    500
    Executions
      Total                     500
      Failures                    0
      Aborts                      0
    CPU Cycles on Executing
      Average                 26278
      Maximum                104980
      Minimum                 22000