Solved

F5 load balancer config question (basic question)

Posted on 2011-02-16
7
1,162 Views
Last Modified: 2012-05-11
I have a virtual sever that is on top of a pool with 4 nodes.  This VS is serving up multiple websites.  If I want to serve up a new site, but only have it serve content from 2 nodes, can I do this with the same VS?  Or do I need to create a new VS with a pool with only 2 nodes?

What's happening now is that when user enters domain.com the F5 is sometimes delivering content to a server that does not have a site set up in IIS.

server1 = content
server2 = content
server3 = no content/dummy site for IP of server
server4 = no content/dummy site for IP of server
0
Comment
Question by:jweissdandm
7 Comments
 
LVL 57

Expert Comment

by:giltjr
ID: 34913448
How are you deciding which server you need to go to?  Via host name or something in the URI?

If you can make a decision based on URI, I can give you the basic's of how to do this using one VS, a second pool and a iRule.

Just rememver if you create a second VS, it needs to have its own host name and IP address.

Using something in the URI with a iRule you can have a single VS with a single IP address.
0
 
LVL 2

Author Comment

by:jweissdandm
ID: 34914854
Iis has host names.  I welcome the irule help.  I have not used them before.
0
 
LVL 9

Expert Comment

by:CLoz
ID: 34915669
What version of code are you running?  As of version 9.4 you can use an HTTP Class to send traffic to a specific pool or redirect it based on Hostname or URI.

Create two pools one with all the standard nodes and a second with the 2 new content servers in it.

Local Traffic --> Profiles --> Protocols --> HTTP Class

Add the Hostname for the new site in the Host list
Set the Send To Pool to the second new content pool


0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 57

Accepted Solution

by:
giltjr earned 163 total points
ID: 34915771
Well, if you are using seperate host names already, then setting up a seperate VS with its own pool would be the easest.

Now, what we did (because of our requriments) is

1) Define a single VS.
2) Define multiple pools.
3) Code a iRule that based on URI selected which pool to use and setup the VS to use that iRule.

The iRule is attached.

What the iRule basicly does if the URI starts with the string "/uri1/*", "/uri2/*", or "/uri3/*" it uses the pool name "Our-Pool-Two", if the URI starts with "uri4/*" it chooses Our-Pool-Three.  If the URI has anything else it uses "Our-Pool-One".
when HTTP_REQUEST {
	switch -glob [HTTP::uri] {
		"/uri1/*" -
		"/uri2/*" -
		"/uri3/*"				{pool Our-Pool-Two}
		"/uri4/*"       			{pool Our-Pool-Three}  
		default					{pool Our-Pool-One}
	}
}

Open in new window

0
 
LVL 9

Assisted Solution

by:CLoz
CLoz earned 162 total points
ID: 34917151
If you go with an iRule you can make it a little easier to manage by leveraging the iRule data group.  When you tart getting into more than 5 host or uri to check using a data group makes maintaining the iRule easier since you just add or subtract from the data group list.

The iRule can also be modified to check the uri by changing the HTTP::host to HTTP:uri

Go to the Data Groups tab in the iRule menu.  Set the type to string.  In the string field put in the hostname or uri you want to check for.  In the value field put in the name of the pool you created to has the content for that hostname or uri.  If you are checking for uri make sure you start with the slash "/", example:  "/test"

Create a default pool that is a catch all to handle all traffic that doesn't match.  


<--THIS IS THE DATA GROUP-->

class hostname_class {
   "www.myhost.com" { "pool_hostname" }
   "www.newhost.com" { "pool_newhost" }
}

<--THIS IS THE IRULE-->

when HTTP_REQUEST {
  set host_pool [class match –value [HTTP::host] starts_with hostname_class]
  if {$host_pool ne ""} {
    pool $host_pool
  } else  {
    pool default_pool
  }
}

Open in new window

0
 
LVL 33

Expert Comment

by:digitap
ID: 35187476
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Occasionally, we encounter connectivity issues that appear to be isolated to cable internet service.  The issues we typically encountered were reset errors within Internet Explorer when accessing web sites or continually dropped or failing VPN conne…
Hi All,  Recently I have installed and configured a Sonicwall NS220 in the network as a firewall and Internet access gateway. All was working fine until users started reporting that they cannot use the Cisco VPN client to connect to the customer'…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now