Forum Discussion

Raja_M's avatar
Raja_M
Icon for Nimbostratus rankNimbostratus
Apr 26, 2018

Load Balence is not happening on pool members with two differnt service ports

Load Balance is not happening on pool members with two different service ports

Hi Team, We have issue is doing Loadbalence for the pool members. The below are the pool members and the traffic is going to only one server tcp port on both the server that is 15201. We have 2 irules 1 is URL redirect by adding uri /jde/owhtml and other irule is adding header. Please help me in resolving this issue.

  1. 172.30.50.160:15201
  2. 172.30.50.160:15202
  3. 172.30.50.161:15201
  4. 172.30.50.161:15202

Here is the config on VIP.

ltm virtual /Common/JDEPROD.corp.com_vs { description Replica_of_JDEPROD.corp_vs-172.30.23.45 destination /Common/172.30.23.53:80 ip-protocol tcp mask 255.255.255.255 pool /Common/JDEPROD.corp_pool profiles { /Common/http { } /Common/stream { } /Common/tcp { } } rules { /Common/jde_redirect /Common/jdeprod1_irule } source 0.0.0.0/0 source-address-translation { type automap } translate-address enabled translate-port enabled

ltm pool JDEPROD_pool {

description JPEDPROD_ load-balancing-mode least-connections-member

members { JDNAJASP1:15201 { address 172.30.50.160 session monitor-enabled state up } JDNAJASP1:15202 { address 172.30.50.160 session monitor-enabled state up } JDNAJASP2:15201 { address 172.30.50.161 session monitor-enabled state up } JDNAJASP2:15202 { address 172.30.50.161 session monitor-enabled state up } } monitor JDEMonitor_New

ltm monitor http JDEMonitor_New {

adaptive disabled defaults-from http destination : interval 20 ip-dscp 0 recv EnterpriseOne recv-disable none send "GET /jde/index.jsp \r\n\r\n" time-until-up 0 timeout 61

IRULE

ltm rule jde_redirect {

when HTTP_REQUEST { if { [HTTP::uri] equals "/" } { HTTP::redirect "http://[HTTP::host]/jde/owhtml" }

ltm rule /Common/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.example.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.example.com:15201" "jdeprod1.corp.example.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.example.com:15201@jdeprod1.corp.example.com@}
STREAM::enable

} when LB_SELECTED { log local0. "URI [HTTP::uri] Client [IP::client_addr] [LB::server] selected." } }

2 Replies

  • /Common/JDEPROD.corp.com_vs has associated pool /Common/JDEPROD.corp_pool and your pool details is for JDEPROD_pool.

     

    Can you check status of both pools - JDEPROD.corp_pool and JDEPROD_pool.

     

  • Raja_M's avatar
    Raja_M
    Icon for Nimbostratus rankNimbostratus

    Hi its only one pool while pasted the config i missed the pool name is JDEPROD_pool and the pool is up.