Forum Discussion
Load Balence is not happening on pool members with two differnt service ports
Load balance is not happening and the traffic is going to only one pool members 15201.Could you please let me know.and the Lb method is Roundrobin
the url: http://jdeprod1.corp.abc.com
ltm virtual JDEPROD.corp.abc.com_vs { description Replica_of_JDEPROD.corp.abc.com_vs-172.30.23.45 destination 172.30.23.53:http ip-protocol tcp mask 255.255.255.255 persist { cookie { default yes } } pool JDEPROD.corp.abc.com_pool profiles { http { } stream { } tcp_e1_prd_na_web { } } rules { E1_Root_Redirect jdeprod1_irule } source 0.0.0.0/0 source-address-translation { type automap } translate-address enabled translate-port enabled vs-index 106 }
ltm pool JDEPROD.corp.abc.com_pool { description JPEDPROD_Replica_of_JDEPD.corp.abc.com_pool members { POKLXJDNAJASP1:15201 { address 172.30.50.160 session monitor-enabled state up } POKLXJDNAJASP1:15203 { address 172.30.50.160 session monitor-enabled state up } POKLXJDNAJASP2:15201 { address 172.30.50.161 session monitor-enabled state up } POKLXJDNAJASP2:15203 { address 172.30.50.161 session monitor-enabled state up } } monitor JDEMonitor_New }
ltm rule E1_Root_Redirect { when HTTP_REQUEST {
if { ([ string length [HTTP::uri] ] <= 1) } {
HTTP::respond 301 Location /jde/owhtml }
} }
ltm rule jdeprod1_irule { when HTTP_REQUEST { Disable STREAM processing for request (ingress) traffic STREAM::disable
Remove the Accept-Encoding header to disable server side compression
HTTP::header remove Accept-Encoding
Replace the incoming Host header to match what the server expects
HTTP::header replace Host "jdeprod1.corp.abc.com:15201"
} when HTTP_RESPONSE { if { [HTTP::header exists Location] } { If this is a redirect response, replace with HTTP::header replace Location [string map {"jdeprod1.corp.abc.com:15201" "jdeprod1.corp.abc.com"} [HTTP::header Location]]
}
Use a STREAM expression to remap all object references in the payload (HTML body) with the external host name
STREAM::expression {@jdeprod1.corp.abc.com:15201@jdeprod1.corp.abc.com@}
STREAM::enable
} when LB_SELECTED { log local0. "URI [HTTP::uri] Client [IP::client_addr] [LB::server] selected." } }
Note: i tried with adding another port 15203 in Header replace but it dosent work,
I wonder if you really need the jdeprod1_irule iRule to make this work. Have you tried without it? Port translation is enabled, so that should do the trick.
- Raja_M
Nimbostratus
If I remove the jdeprod1_irule the application won't work, and it will got the web server page
- youssef1
Cumulonimbus
Hi,
How you check that traffic goes only to pool members 15201?
Can you go to you pool (clik on it) then check statistics.
Regards,
- Raja_M
Nimbostratus
Hi Team, Pleas help me and even i tried with many f5 tac support there is no fix.
- The Vip is port 80 and backed services are 15201 and 15203 with 2 servers totally 4 Pool members.
- We have 2 irule one is redirect with additional uri /jde/owhtml and other irule is header replace and compression and if i remove this irule its thowing this below error
- Even i tried editing the JDEPROD irule as below mentioned but its not working as expected.
when HTTP_REQUEST { Disable STREAM processing for request (ingress) traffic STREAM::disable
Remove the Accept-Encoding header to disable server side compression HTTP::header remove Accept-Encoding Replace the incoming Host header to match what the server expects HTTP::header replace Host "jdeprod1.corp.abc.com:15201" HTTP::header replace Host "jdeprod1.corp.abc.com:15203"
} when HTTP_RESPONSE { if { [HTTP::header exists Location] } { If this is a redirect response, replace with HTTP::header replace Location [string map {"jdeprod1.corp.abc.com:15201" "jdeprod1.corp.abc.com"} [HTTP::header Location]] HTTP::header replace Location [string map {"jdeprod1.corp.abc.com:15203" "jdeprod1.corp.abc.com"} [HTTP::header Location]]
} Use a STREAM expression to remap all object references in the payload (HTML body) with the external host name STREAM::expression {@jdeprod1.corp.abc.com:15201@jdeprod1.corp.abc.com@} STREAM::expression {@jdeprod1.corp.abc.com:15203@jdeprod1.corp.abc.com@} STREAM::enable
}
error screen shot:1 Connection is going to properly on 15201 is working the second connection when it goes to 15203 its throwing this error.
- Raja_M
Nimbostratus
IN My irule i removed the port 15201 and added 15203 as mentioned below.
HTTP::header replace Host "jdeprod1.corp.abc.com:15203"
STREAM::expression {@jdeprod1.corp.abc.com:15203@jdeprod1.corp.abc.com@}
i got the below error.
- youssef1
Cumulonimbus
You realy need to insert port in Host header?
- Raja_M
Nimbostratus
i tried without inserting port number example as mentioned below it dosent work .and application page is not opening
HTTP::header replace Host "jdeprod1.corp.abc.com"
STREAM::expression {@jdeprod1.corp.abc.com@jdeprod1.corp.abc.com@}
- SurgeonRet. Employee
Based on the connection table all the requests coming from the same src 172.30.3.169 and you have cookie persistence enabled.
This explains why all the requests from the same src go to the same pool member. What is the reason for cookie persistence?
Recent Discussions
Related Content
* 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