Forum Discussion

Jan_Rockstedt_4's avatar
Jan_Rockstedt_4
Icon for Nimbostratus rankNimbostratus
May 03, 2012

Use data group or not

 

Hi all,

 

 

I am new on LTM, so sorry for stupid questions.

 

 

We want to setup one public ip number no SSL, redirect them to different internal hosts and ports.

 

www.aa.com -> 1.1.1.1:8181 www.bb.com -> 1.1.1.1:8182 www.cc.com -> 2.2.2.2:8080 and so on

 

In some cases the host is the same and only different port.

 

 

I have tried to play with Data Group List, and the three different types and without success as there is same match in some field.

 

I want use an simple setup so we can add URLs in a simple way and not edit all the time the iRule.

 

Any suggestion for this?

 

Also any suggestion for an IRule?

 

Regards Jan Rockstedt

 

 

  • Jan,

     

     

    Personally , I'd go with an irule without datagroups etc.

     

    From your example it looks like you want to use vhosts as a key so the irule will be like

     

     

    switch [HTTP::host ] {

     

    "www.aa.com" { pool aa ; return }

     

    "www.bb.com" { pool bb ; return}

     

    }

     

     

    with 1.1.1.1 as node xxx

     

    with in pool aa node xxx on port 8181 , pool bb node xxx port 8182 etc....

     

     

    If on the other hand you want to allow others access to your data groups and not the irules ....

     

    You still have to define nodes and pools, and, you'll have to check the host/url against every data-group untill there is a match

     

     

    if { [ class match [HTTP::host] equals ] } {

     

     

    } elseif { [ class match [HTTP::host] equals ] } {

     

     

     

    The same thing can be done with uri's

     

     

    IB