Forum Discussion
Jonathan_Scholi
Apr 28, 2011Cirrostratus
Preserving ToS over the duration of a download
We have the need to set ToS values for a video application. In order to set ToS values differently for the video and non-video that goes through the application, I created one pool with IP ToS values set to 40, and another with values left at the default. An iRule switches between the two pools:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "wmv" } {
pool tos-40-pool
if { ![LB::status up] } drop
}
}
The problem is, this doesn't work well, presumably because only the intial request contains "wmv". Is there something I can do to ensure the entire file is transferred using the appropriate ToS?
- hooleylistCirrostratusHi Jonathan,
when CLIENT_ACCEPTED { Save the name of the default pool before it is modified in the rule set default_pool [LB::server pool] log local0. "[IP::client_addr]:[TCP::client_port]: Default pool: $default_pool" } when HTTP_REQUEST { Check if request is for a wmv file switch -glob [string tolower [HTTP::path]] { "*.wmv" { pool tos-40-pool log local0. "[IP::client_addr]:[TCP::client_port]: Selected: [LB::server] for wmv request" if { ![LB::status up] }{ log local0. "[IP::client_addr]:[TCP::client_port]: Pool not up, dropping connection" drop } } } default { log local0. "[IP::client_addr]:[TCP::client_port]: Non-wmv file, detaching" LB::detach } } } Debug events only. Comment out or remove once done testing. when LB_SELECTED { log local0. "[IP::client_addr]:[TCP::client_port]: Selected: [LB::server]" } when SERVER_CONNECTED { log local0. "[IP::client_addr]:[TCP::client_port]: Connected: [IP::server_addr]:[TCP::server_port]" }
- Jonathan_ScholiCirrostratusThanks! I'll give it a try.
- Jonathan_ScholiCirrostratusIt seems like a rule like this should work, but it turns out that the initial file that you get when requesting the WMV file is an HTML file which then loads the actual WMV file. As far as I can tell, the request for the actual file does not contain any distinguishing features in the header which would allow you to filter on it. Could you suggest any ways to work around this problem? We don't have packet level control over the application generating this traffic.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects