Forum Discussion
david_wang_2073
Aug 05, 2006Historic F5 Account
http::redirect based on [LB::server addr]
Hi, All,
We are trying to do rtsp load balancing with redirect method, but the rtsp servers were located in different data center and not belong to the same subnet with BIG-IP.
The rtsp server will be chosen by BIG-IP with dynamic ratio method.
Now my question is that, after a rtsp server was selected, how can BIG-IP rediect the rtsp request.
I did a very simple test with irule as below:
when HTTP_REQUEST {
log local0. "in HTTP_REQUEST [HTTP::uri]"
}
when LB_SELECTED {
log "Selected server is [LB::server addr]"
HTTP::redirect "rtsp://www.yxsx.com/vod/shipin1_isdn.rm"
}
But I got following error message:
01070151:3: Rule [http_redirect] error: line 8: [command is not valid in current event context LB_SELECTED] [HTTP::redirect rtsp://www.yxsx.com/vod/shipin1_isdn.rm ]
It seem that http_redirect can not be used in LB_SELECTED.
Anybody has idea how to solve this problem?
Thanks,
David Wang
- david_wang_2073Historic F5 AccountI change the irule to below
- david_wang_2073Historic F5 Accountsorry, it turns out that the irule I just post can not work. Anybody has idea how to implement it, I would highly appreciate.
- david_wang_2073Historic F5 AccountI still have not found a way to do redirect in LB_SELECT, so I have to do it in SERVER_CONNECTED, which means that client have to setup a connection with a real server before the a redirect packet is returned.
- Deb_Allen_18Historic F5 AccountHi David -
If instead you want to proxy the request to pool members that are in different data centers from the BIG-IP, there are a couple of ways to accomplish that, depending on your architecture... Post back if that's what you're after.when HTTP_REQUEST { log local0. "in HTTP_REQUEST [HTTP::uri]" HTTP::redirect "rtsp://www.yxsx.com/vod/shipin1_isdn.rm" }
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