Solved

F5 load balancer config question (basic question)

Posted on 2011-02-16
7
1,168 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Port forwarding 14 151
SonicWall blocking WOL 11 139
Turn off SIP ALG - Cisco ASA 5505 1 73
Google Play app store not being blocked from smartphones 4 53
In this tutorial I will show you with short command examples how to obtain a packet footprint of all traffic flowing thru your Juniper device running ScreenOS. I do not know the exact firmware requirement, but I think the fprofile command is availab…
I found an issue or “bug” in the SonicOS platform (the firmware controlling SonicWALL security appliances) that has to do with renaming Default Service Objects, which then causes a portion of the system to become uncontrollable and unstable. BACK…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

773 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