KimiLi_147173
Jan 09, 2017Nimbostratus
How to make a http switching iRule that can deal with websocket requests?
Hi all,
We use a http switching iRule which is associated with a http profile on LTM 11.2.0, to transfer traffic to different pools according to URL of the requests, in order to save IP addresses, the iRule is like this:
when HTTP_REQUEST {
Check requested host header (set to lowercase)
switch [string tolower [HTTP::host]] {
"fsbp.abc.com" {
pool pool_fsbp.abc.com_dmz
}
"vwcc.abc.com" {
pool pool_vwcc.abc.com_dmz
}
"afms.abc.com" {
pool pool_afms.abc.com_80_dmz
}
"kf1.abc.com" {
pool pool_kf1.abc.com_80_dmz
}
"kf2.abc.com" {
pool pool_kf1.abc.com_80_dmz
}
}
}
The issue is the web application with hostname both "kf1.abc.com" and "kf2.abc.com" is using websocket, it seems that websocket requests cannot be recognized or be transfered to the expected pool.
I didn't find the topic which can solve my issue, so I wonder what should the iRule be like that can transfer both http traffic and websocket traffic?
Any help would be thankful.