Forum Discussion

teguh_wilidarma's avatar
teguh_wilidarma
Icon for Nimbostratus rankNimbostratus
Feb 07, 2011

iRule HTTP redirection - one server multiple instance

Hi, I was digging through this forum and found several similar cases like mine, but I am still very newbie on how iRule commands interact with VS and pool member selection. Moreover, I havent managed to found any case that have the pool member running multiple instances of service. hope the wisemen here can help:

 

 

My customer is implementing a trading application which consists of more than one module, but running on the same machine (one web server running multiple instance):

 

 

for FE module:

 

1. forward "http://front_web" to "webserver_ip" at port 2020

 

2. forward "https://front_web/servlet/LiveGiverServlet" to "webserver_ip"at port 2025

 

 

for TR module:

 

1. forward "http://tr_web" to "webserver_ip" at port 4020

 

2. forward "https://tr_web/servlet/LiveGiverServlet" to "webserver_ip" at port 4025

 

 

I am thinking of when: HTTP_REQUEST , match condition: HTTP::host, and statement is HTTP::redirect to port something, and in "if" command.

 

But I can not think of how the traffic will flow as the irule is INSIDE virtual server, and the virtual server is listening on a particular IP address and service port. is it possible to create a single vs with 2 port to listen to (2020 and 2025 for FE module, 4020 and 4025 for TR module) ?

 

Is there a better way to do the task?

 

 

 

Thanks all

 

Teguh

 

 

 

14 Replies

  • Btw Aaron, if you look at my first question, the web server is only one, with multiple instance. And for each instance, there will be two conditions. If http, then forward to the server using 2020, if it is https with particular URI, forward to the server using 2025. If I create only one VS for each module, how do I tell LTM to fulfil the second requirement? I am thinking that the VS for that server is only listening on port 80, and for the 443, I need to create another VS with the same server IP but listen on port 443. The member will be the same for both VS. Is it possible? what do you think Aaron?

     

     

    Thanks before

     

  • You can have multiple virtual servers defined on the same IP address. You would need to decrypt the SSL for HTTPS before doing any inspection or modification of the encapsulated HTTP. To decrypt the SSL, you'd need to import the server cert and key to LTM, define them in a client SSL profile and add the client SSL profile to the virtual server(s)

     

     

    Aaron