Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

F5 load balancer config question (basic question)

Posted on 2011-02-16
7
Medium Priority
?
1,183 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
A Cyber Security RX to Protect Your Organization

Join us on December 13th for a webinar to learn how medical providers can defend against malware with a cyber security "Rx" that supports a healthy technology adoption plan for every healthcare organization.

 
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

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

Optimal Xbox 360 connectivity requires "OPEN NAT". If you use Juniper Netscreen or SSG firewall products in a home setting, the following steps will allow you get rid of the dreaded warning screen below and achieve the best online gaming environment…
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
Screencast - Getting to Know the Pipeline
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…
Suggested Courses
Course of the Month20 days, 15 hours left to enroll

864 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