Lab 3 - Load Balancing, Monitoring and Persistence
Lab 3 - Load Balancing, Monitoring and Persistence
1. Go to Local Traffic >> Pools and select www_pool and then Members from the top bar or you
could click on the Members link in the Pool List screen.
(../../_images/image114.png)
Note
When we created the pool, we performed all of our configurations on one page, but
when we modify a pool the Resource information is under the Members tab
b. As you look at the drop-down menu, notice most load balancing methods have two
options: (Node) or (Member). Remember the difference?
(../../_images/image213.png)
3. Verification
a. Check the pool statistics by selecting Statistics on the top bar, if you are still in Local
Traffic >> Pools, or by going to Statistics >> Module Statistics >> Local Traffic and
selecting Pool from Statistics Type.
b. Reset the statistics for your www_pool pool by checking the boxes next to the pool
members and hitting the Reset button
i. Browse to your www_vs (10.1.10.100) virtual server
ii. Refresh the browser screen several times (use “<ctrl>” F5)
c. Now go back and put the pool load balancing method back to Round Robin
i. Reset the statistics
Let’s look at priority groups. In this scenario we will treat the .13 server as if it were in a disaster
recovery site that can be reached over a backhaul. The customer would like to maintain at least
two members in the pool for redundancy and load. They would find this beneficial to allow
connections to proceed during a maintenance window or during an outage.
ii. Set the Priority Group Activation to Less than … 2 Available Members.
(../../_images/image413.png)
c. Select the pool members 10.128.20.11 and 10.128.20.12 and set their Priority Group to 2.
i. This will allow you to change the priority on that particular member.
(../../_images/image53.png)
2. Review your settings and let’s see how load balancing reacts now
3. Let’s simulate a maintenance window or an outage by disabling a pool member in the highest
priority group (2).
Note
F5 ranks priority from low number to high number. This means, a priority of 1 has a
lower priority than 2, and onwards.
This should cause priority group activation to kick in, since the number of active
members in our high priority group has dropped below one.
4. Select the member in the Priority Group 2 and Disable that pool member.
a. Select the Disable button
(../../_images/image63.png)
b. The status indicator now goes to black, indicating the member has been disabled
5. Once again, select Statistics, reset the pool statistics, browse to the virtual server and see which
pool members are taking hits now.
Once you are done testing re-enable your disabled pool member.
Monitor Labs¶
Objective:
Default Monitors
a. Note that the nodes exist in this table, even though they were never specifically configured
in the Node section of the GUI. Each time a unique IP address is placed in a pool a
corresponding node entry is added and assigned the default monitor (if any).
c. Notice we have several options. For nodes you will want a generic monitor, so we will
choose icmp.
d. Select icmp from the Available box and hit (../../_images/image83.png) to place it in
the Active box.
a. What are the statuses of your nodes, pool and virtual server?
For those of you who did the FQDN Pool extra credit lab, you will notice your FQDN in the node
list. The status should be Available (Green) even though there wasn’t a monitor. This is because a
good status indicates the BIG-IP successfully queried the DNS server for the name. Click on the
FQDN node to see additional options, such as query interval.
Content Monitors¶
The default monitor simply tells us the IP address is accessible, but we really don’t know the status
of the particular application the node supports. We are now going to create a monitor to specifically
test the application we are interested in. We are going to check our web site and its basic
authentication capabilities.
1. Browse to http://10.1.10.100 and on the web page select the Basic Authentication link under
Authentication Examples.
a. User: user.1
b. Password: password
c. You could use text from this page or text within the source code to test for availability. You
could also use HTTP statuses or header information. You will be looking for the HTTP
status “200 OK” as your receive string to determine availability.
d. Note the URI is /basic. You will need this for your monitor.
2. Select Local Traffic >> Monitor on the side-bar and select the plus (+) sign or Create
(../../_images/image93.png)
a. Now we can create a monitor to check the content of our web page to ensure things are
running properly.
i. Name: www_test
b. Once you have selected you parent (Type) monitor, you can access the Configuration
section
i. Send String: Enter the command to retrieve the page you want “GET /basic/r\n" (no
quotes)
ii. In the Receive String box put “200 OK” (no quotes)
Note
c. Click Finish and you will be taken back to Local Traffic >> Monitors
Monitors list. Here you can go to the next page or view all Monitors
b. You can change the number of records displayed per page in System >> Preferences
4. Go to Local Traffic >> Pools >> www_pool and choose Properties from the top bar
b. Select the www_test monitor from the Available monitor’s window in the Configuration
section and move it to the Active window.
(../../_images/image133.png)
5. Once you have selected your parent (Type) monitor, you can access the Configuration section
6. Go to Local Traffic >> Virtual Servers. What is the status of your virtual server?
a. Browse to your www_vs virtual server. Which members are taking traffic?
b. Just for fun reverse the monitor. Now when 200 OK is returned it indicates the server is
not responding successfully. You can see where this would be useful if you were looking
for a 404 (bad page) response.
Monitor Testing¶
There is now the ability to test monitors. This is tremendously helpful as you no longer need to
create monitors and add them to false objects on the BIG-IP. The functionality is now built in to the
monitor itself to be less invasive on your infrastructure, and less time consuming all together.
c. Click Test
(../../_images/image142.png)
Persistence Labs¶
In this lab we will configure a couple types of persistence and view their behavior. For persistence,
profiles will have to be created and attached to our virtual server.
Lab Requirements:
Prior to beginning the lab verify your www_pool has been set to the following parameters:
Load Balancing Method: Round Robin
Priority Group Activation: Disable
The members Ratio and Priority Group mean nothing since we aren’t using Ratio load
balancing and Priority Groups are disabled.
Hit Update
Hit your virtual server several times, you should see all 3 servers respond.
Simple (Source Address) Persistence¶
(../../_images/image152.png)
i. Name: my-src-persist
c. This will add the Configuration section to the General Properties section.
i. Timeout: 60 seconds
iii. Hint: You can’t change these settings until you have checked the Custom box. This
prevents unwanted or unauthorized changes from within the GUI, without explicitly
allowing it. Also, it allows you to know what has changed from the default settings.
i. Note the check box for your new custom profile isn’t grayed out and can be selected
to allow you to delete the profile if desired.
ii. Take the shortcut directly to the Resources of the virtual server. (Can you find it?)
(../../_images/image172.png)
c. Don’t forget to Update before leaving the page. (Be careful, the reminders will stop!)
i. At this point you may want to open a second browser window to the management
GUI.
ii. From one management window go to Statistics >> Module Statistic >> Local Traffic
3. At this point you will see that the Persistence Records statistics display has been disabled (way
back in v12.1). A TMSH database command is required to activate it.
c. At the TMSH prompt enter the command in the Persistence Value GUI.
i. modify sys db ui.statistics.modulestatistics.localtraffic.persistencerecords value
true
1. Tab completion will make this a little easier
4. Now, in this window you can watch your persistence records. You may want to set Auto Refresh
to 20 seconds.
(../../_images/image192.png)
5. In your other management GUI window go to www_pool and clear the member statistics.
a. Open a browser session to your virtual server and refresh several times.
c. Check you Persists Records window. Are there any persistence records?
i. If you are not Auto Refreshing, don’t forget to hit Refresh
d. Refresh you web page prior to the Age column reaching 60. What happens?
1. Go to Local Traffic >> Profiles >> Persistence tab and hit Create
2. As you can see, the default Cookie Method is HTTP Cookie Insert, so we won’t have to modify
the Cookie Method
a. The BIG-IP will also create a cookie name for you using a combination of “BIGipServer”
and the pool name the virtual server service. We will take this default also.
b. We will use a session cookie. Which means the cookie is deleted when the browser is
closed.
c. Select Finished
d. Now attach your cookie persistence profile to your virtual server’s Default Persistence
Profile by:
i. Go to Local Traffic >> Virtual Server >> www_vs >> Resources tab
f. Remember what we said earlier about some Profiles requiring prerequisite Profiles? Since
we are looking in the HTTP header for the cookie the prerequisite for the Cookie Profile is
the HTTP profile.
3. We will have to go to the virtual server to add the HTTP profile, prior to adding the Cookie
Persistence profile.
b. Go to HTTP Profile in the Configuration section and select the default HTTP (http) profile.
(../../_images/image221.png)
d. Now we can go back to the Resource tab and add our cookie persistence profile.
a. If you wish you can watch the member statistics to validate your persistence.
b. Open a new browser session to your virtual server and refresh several times.
i. On the web page under HTTP Request and Response Information click the Display
Cookie link.
(../../_images/image231.png)