Forum Discussion
mpcd command
Hosting multiple websites on the same virtual server and load balancing requests to the appropriate webserver based on the host name requested. This can be achieved via iRule or F5 policy also.
** Make sure IP address bind with multiple DNS CNAME.
* Create the LB Pool based on the application requirement.
Pool_A[ 1perf.cloud123.com, 3perf.cloud123.com]
Pool_B [ 2perf.cloud123.com, 4perf.cloud123.com]
* Create iRule
when HTTP_REQUEST { set host [string tolower [HTTP::host]] switch -glob $host { "www.xyz.com" { pool pool_A } "www.pqr.com" { pool pool_B } default { reject } } }
* Create the Virtual Server and assign irule.
Hope it will solve issue.
Hi Samir, Great Thank for your details.. you added correct details :)
I just wanted to added few more details..
there is an existing VIP : VIP-PRF, there were two new AWS servers added 10.1.1.3 and 10.1.1.4 to this Pool Member which are Name Based Nodes . so the request here is like no changes should be made to the existing Pool members and for New Pool members we need to have the traffic going :
if URI contains Web2 then request to the Node : 10.1.1.4 should have Header Insertion as 2perf.cloud123.com and 4perf.cloud123.com
and if if URI contains Web1 , Then request goes to 10.1.1.3 then it should have Header insertion as 1perf.cloud123.com and 3perf.cloud123.com.
So backend Server look into this endpoint in server code so later on re-direct further on