Forum Discussion
manc_63343
Nimbostratus
Apr 30, 2010Can LTM be used to configure Active and Passive Servers?
For a given vip is it possible to define pool of servers that are active and also some pool of members that passive. Basically this is what I want to do:
1. Define active pool of servers for a vip
2. Define passive pool of servers for a vip
3. When all the members in pool go down then make passive pool active
Is it possible to do that in LTM?
If it's possible then when one of the pool members (previously active) become active again does it switch it back?
46 Replies
- The_Bhattman
Nimbostratus
Hi Manc,
Yes it's definitely doable with LTM. You can do this either 2 ways : iRule or point-n-click configuration.
Point-n-click method
Basically you setup a single pool that is configured for Priority Load balancing
For Example:
You have 4 servers and you want 2 of the servers active all the time, but as soon as 2 of them fail due to the health check, then the other 2 servers come on line. If the 2 primary servers come back then return the traffic.
The structure would be
Pool A
Server 1 Priority 100 ratio 1
Server 2 Priority 100 ratio 1
Server 3 Priority 50 ratio 1
Server 4 Priority 50 ratio 1
You would probably add persistence so that you don't abruptly move connections during a failback and rather wait for the existing connection to close. However, this all depends entirely on the application requirements for persistence.
There are more details on how to do this on the F5 Configuration Guide you can find on http://ask.f5.com
iRule Method
The reason why you would want to use iRules is that is basically allows you even more granular control over how you want configure your active/passive configuration.
Here is a simple examplewhen CLIENT_ACCEPTED { if { [active_members active_pool ] >= 1 } { pool active_pool } else { pool passive_pool } }
This iRule assumes you have defined 2 different pools.
I hope this helps
Bhattman - Michael_Yates
Nimbostratus
There is another available option that is close to what you are requestion using the Priority Activation Groups.
It will keep a specified number of servers available and on-line (basically keeping your load distributed rather than continually loading it onto the last server and slowing down performance until it either fails, is taken off-line, or the other active servers become available again).
Available option on the Pool settings.
Under Load Balancing the "Priority Group Activation" to "Less than..." and then select the number of members you always want active.
Then go to each node and change the Priority Group for each server.
Example:
If I set the Priority Activation Group to Less than 3 the Load Balancer will always keep 3 servers available. (Higher the Activation Group the higher the preference)
10.10.10.1 - Priority Activation Group 3
10.10.10.2 - Priority Activation Group 3
10.10.10.3 - Priority Activation Group 3
10.10.10.4 - Priority Activation Group 2
10.10.10.5 - Priority Activation Group 2
10.10.10.6 - Priority Activation Group 2
10.10.10.7 - Priority Activation Group 1
10.10.10.8 - Priority Activation Group 1
10.10.10.9 - Priority Activation Group 1
If one server in Group 3 dies, then a server from Group 2 will be begin to take traffic.
If two servers in Group 3 die, then two servers in Group 2 will be begin to take traffic.
and so on....
This is basically an Active / Standby ability.- Sriram_Kannan_1
Nimbostratus
Correction would be If one server in group 3 fails, we noticed all servers in group 2 becoming active so it 10.10.10.1 fails. load balancing is done across all three servers in group 2 and 2 servers in group 3
- There is another available option that is close to what you are requestion using the Priority Activation Groups.
It will keep a specified number of servers available and on-line (basically keeping your load distributed rather than continually loading it onto the last server and slowing down performance until it either fails, is taken off-line, or the other active servers become available again).
Available option on the Pool settings.
Under Load Balancing the "Priority Group Activation" to "Less than..." and then select the number of members you always want active.
Then go to each node and change the Priority Group for each server.
Example:
If I set the Priority Activation Group to Less than 3 the Load Balancer will always keep 3 servers available. (Higher the Activation Group the higher the preference)
10.10.10.1 - Priority Activation Group 3
10.10.10.2 - Priority Activation Group 3
10.10.10.3 - Priority Activation Group 3
10.10.10.4 - Priority Activation Group 2
10.10.10.5 - Priority Activation Group 2
10.10.10.6 - Priority Activation Group 2
10.10.10.7 - Priority Activation Group 1
10.10.10.8 - Priority Activation Group 1
10.10.10.9 - Priority Activation Group 1
If one server in Group 3 dies, then a server from Group 2 will be begin to take traffic.
If two servers in Group 3 die, then two servers in Group 2 will be begin to take traffic.
and so on....
This is basically an Active / Standby ability.- Sriram_Kannan_1
Nimbostratus
Correction would be If one server in group 3 fails, we noticed all servers in group 2 becoming active so it 10.10.10.1 fails. load balancing is done across all three servers in group 2 and 2 servers in group 3
- manc_63343
Nimbostratus
Thanks! Is it possible to configure it such that Group 2 server takes over only when all the servers in Group 3 are down?- suresh_234_1771
Nimbostratus
asdf - suresh_234_1771
Nimbostratus
can two virtual servers can be configured as active standby in LTM F5 load balancer.
- Michael_Yates
Nimbostratus
I believe so...
This is the description giving for Priority Activation Groups:
Specifies, when enabled, that the system load balances traffic across activated members of their priority group. To enable priority group activation, select Less than from the list, and type the number of members below which the system activates the group. Once you enable priority group activation, you can use options on the Member Properties screen to assign each member to a priority group. The system sends traffic to members in priority-group order.
I believe that if you select Less than 0, that it will not activate anything in the next group until there are 0 available members of the previous group.
NOTE: As soon as a member of a Higher Priority Group recovers, traffic will begin flowing back to the Higher Priority Group. (This should happen with new connections. It will not shift the current traffic currently connected to servers in a Lower Priority Group).
I would suggest testing it to verify (I've never drained one group to zero before transferring the load to a new group. I use it more as an Hot Standby Activation), but it should do what you are wanting. You can see the current load on each member of a pool by going to the following:
v9.x
Overview -> Statistics
Statistics Type: Pools
v10.1.x
Overview -> Statistics -> Local Traffic
Statistics Type: Pools - DeVon_Jarvis
Altostratus
We use Priority Groups and they work very well. This is an easy way to setup "tiers" of servers. You can setup any number of tiers, such that you can keep a particular Virtual Server active.
DeVon - manc_63343
Nimbostratus
Thanks! If you don't mind can you please elaborate what use case made you use Priority Groups and how you use it. We haven't used it before and getting a practical and already working approach will help me understand it little better. - rudysetiawan_79
Nimbostratus
Oh yeah this is the same thing that I want to do. We have a primary farm and a backup farm.
When the primary farm goes down, I want the backup farm to be served right away.
and yes @Devon can you show us on how to use the Prirotiy Groups? is that the same thing as the Priority Activation Groups? THanks! - Michael_Yates
Nimbostratus
What were each of you specifically wanting to know and I'll see if I can elaborate. - manc_63343
Nimbostratus
I was specifically wanting to know more about Activation groups. How they are configured and how they are used by LTM during failover, during normal operations and during failback.
And in addition I wanted to get feeling from other people as to why they are using it. To see if my solution is ok.
We currently have a layer where LTM -> WS -> DB
Now to take additional application instead of adding more WS we are planning to do
LTM -> WS 1 - 4 -> DB1
LTM -> WS 5 - 10 -> DB2
Requests going to WS 1 - 4 will have 5 -10 as standby
Requests going to WS 5- 10 will have 1 - 4 as standby
This to prevent one application affecting other when there are application specific issues. At the same time we can use it as failover when DB is down or something like that.
So that's why I need to understand in detail how failover and failback works. And how it works during normal operation.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects