[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

F5 load balancer config question (basic question)

Posted on 2011-02-16
7
Medium Priority
?
1,184 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
6 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
Managing Security & Risk at the Speed of Business

Gartner Research VP, Neil McDonald & AlgoSec CTO, Prof. Avishai Wool, discuss the business-driven approach to automated security policy management, its benefits and how to align security policy management with business processes to address today's security challenges.

 
LVL 57

Accepted Solution

by:
giltjr earned 652 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 648 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

SMB Security Just Got a Layer Stronger

WatchGuard acquires Percipient Networks to extend protection to the DNS layer, further increasing the value of Total Security Suite.  Learn more about what this means for you and how you can improve your security with WatchGuard today!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Network traffic routing plays key role in your network, if you have single site with heavy browsing or multiple sites, replicating important application data from your Primary Default Gateway ,you have to route your other network traffic from your p…
Imagine you have a shopping list of items you need to get at the grocery store. You have two options: A. Take one trip to the grocery store and get everything you need for the week, or B. Take multiple trips, buying an item at a time, to achieve t…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Is your organization moving toward a cloud and mobile-first environment? In this transition, your IT department will encounter many challenges, such as navigating how to: Deploy new applications and services to a growing team Accommodate employee…
Suggested Courses

612 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