Forum Discussion

Skuba_85554's avatar
Skuba_85554
Icon for Nimbostratus rankNimbostratus
Nov 28, 2007

irule help for multiple url's

hi

 

 

i have a web server running 40 web sites each with a different public domain name, what's the best way of routing the traffic to them through big ip with irules?

 

 

there must be a better way than creating 40 virtual servers which sends the requests on to 40 different groups, for example

 

 

i'm thinking irules, but i have little to no experience with them so any help would be greatly appreciated

 

 

thanks

6 Replies

  • Hello,

     

     

    Are the web apps accessible on the web server on different IP's or ports, or all on the same IP and port (differentiated by the HTTP host header)? Do you want to use HTTP and/or HTTPS?

     

     

    Thanks,

     

    Aaron
  • thanks for your reply aaron

     

     

    they're not configured yet. there are 40 web sites on each server, with 9 servers in total identically configured - we can't use ip addresses because we don't have enough spare, but we could run each site on different ports

     

     

    here's the problem... they would like each web site to be accessed through one public IP address i.e. each of the 40 url's all go to one address, then big ip works it's magic and distributes the requests
  • If all of the servers host the content for all of the web application instances, it would be easiest in terms of BIG-IP configuration to have the instances on the same port on each web server. The web servers would use the host header in the client request to determine which instance answers the request.

     

     

    With the servers configured like that, you could create a pool on the BIG-IP with all of the servers' IP and port. You could then create a virtual server which references the port. You wouldn't need an iRule to route the requests. This would work very simply for HTTP traffic.

     

     

    If you need to support SSL for the web applications, you run into an issue with using a single HTTPS virtual server. If this is the case, check a related post on SANs for details (Click here). If SANs aren't an option, and all of the sites are on the same domain, you could use a single wildcard cert to decrypt the HTTPS. Finally, if neither of these options work, you'd need to configure individual HTTPS virtual servers for each site which requires SSL decryption.

     

     

    Aaron
  • sorry hoolio, i've worked with big ip for a number of years but i've never made use of the host headers and i don't understand what you mean. can you provide a basic example, i.e. 1 virtual server => 1 pool => 1 member

     

     

    thanks
  • Host headers are used in HTTP so the client can specify what web application instance they are making a request to. The HTTP host header is described in RFC2616 section 14.23 (Click here). This implementation method wouldn't require any additional configuration within the BIG-IP--you'd just configure a single HTTP virtual server pointing to a pool of the nine web servers on the specific IP:port they listen on.

    You would need to configure the web servers to inspect the HTTP host header to determine which virtual host to use to process the requests. In IIS, you can add Host headers under the Web Site Properties | Web Site Identification | Advanced | Multiple identities for this web site. Here is an MS link detailing the configuration (Click here). For apache, you would configure virtual hosts. Here is an apache article on configuring vhost host headers (Click here).

    Your BIG-IP config would look like this:

    
    virtual generic_http_vs {
       destination 1.1.1.1:http
       snat automap
       ip protocol tcp
       profile http tcp
       pool http_pool
    }
    pool http_pool {
       member 2.1.1.1:http
       member 2.1.1.2:http
       member 2.1.1.3:http
       member 2.1.1.4:http
       member 2.1.1.5:http
       member 2.1.1.6:http
       member 2.1.1.7:http
       member 2.1.1.8:http
       member 2.1.1.9:http
    }

    This configuration assumes that all nine web servers answer on port 80 for all 40 web applications.

    Aaron