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
- rudysetiawan_79
Nimbostratus
As for me, we have a primary farm and secondary farm.
When the primary farm is unavailable, I want LTM to be able to start directing to the backup farm.
Since the website is using 1 IP, can both farms share the same vip and still maintaining the failover mechanism?
And also to add "primary farm is unavailable" means that when LTM found a blank page when it tried to query the members.
Thank you - Michael_Yates
Nimbostratus
Manc,
I don't think that you can do what your planning with a Single Virtual Server or a Single Pool.
LTM -> WS 1 - 4 -> DB1
LTM -> WS 5 - 10 -> DB2
You would need 2 Virtual Servers and 2 Pools in order to do this (but then you would have to figure out how to balance the load between these Virtual Servers):
LTM -> Virtual Server 1 (10.10.10.10) - Pool 1 (WS 1 - 4) -> DB1
LTM -> Virtual Server 2 (20.20.20.20) - Pool 2 (WS 5 - 10) -> DB2
If you wanted to do something similar with a single Virtual Server and a Single Pool you could configure the following:
Priority Activation Group - Less than.... 5
10.10.10.1 - Priority Activation Group 2
10.10.10.2 - Priority Activation Group 2
10.10.10.3 - Priority Activation Group 2
10.10.10.4 - Priority Activation Group 2
10.10.10.5 - Priority Activation Group 2
10.10.10.6 - Priority Activation Group 1
10.10.10.7 - Priority Activation Group 1
10.10.10.8 - Priority Activation Group 1
10.10.10.9 - Priority Activation Group 1
10.10.10.10 - Priority Activation Group 1
This would keep five servers active and five servers on Hot-Standby (which is somewhat of an overkill). A failure would be less disruptive (and more evenly distrubute the load) if all of the servers were active in the pool at the same time.
Rudysetiawan,
Yes. Primary and Secondary Farm's can share the same Virtual Server in the scenario that you are describing. See Bhattman's iRule earlier in this discussion chain for one method and an iRule Example.
I am unsure what you mean by this:
And also to add "primary farm is unavailable" means that when LTM found a blank page when it tried to query the members.
Did you want something put into the LTM Log? If so, you can add to Bhattman's iRule example. This will put a comment into the F5 LTM Log located in /var/log/ltmwhen CLIENT_ACCEPTED { if { [active_members active_pool ] >= 1 } { pool active_pool } else { log local0. "Primary Farm is Unavailable" pool passive_pool } } - manc_63343
Nimbostratus
We also use GTM. Do you think we can do something like that GTM instead of LTM? Is that much simpler? We could have ratio or have it set to global availability with multiple members listed in the pool - Michael_Yates
Nimbostratus
Unfortunetly I can't help you with that.
My company purchased the GTM Module, but they haven't let us use it :-(
Perhaps one of the others could answer that for you. - JCMATTOS_41723
Nimbostratus
Bhatman,
I had a similar situation, where I wanted to manually disable and/or force offline the active servers (not relying on the monitor failing). But still achieve a failover to the passive pool members. Is this possible? If not, how can I enable this? Also, is it true that upon re-enabling the active servers the active connections will immediately and abruptly failback to the active pool members? If so, how can I gracefully allow the connections on the passive pool members finish? Appreciate your help. Thx! - shawn306_84070
Nimbostratus
I wanted to bump this up and ask a question.
I have a pool with two servers in it. One would be active and one would be used only if the other server goes down.
The one server has the priority group set to 1
The other server has a priority group setting of 0
For Priority Group Activation does the number need to be set at 2 or 3 or does it make a difference ?
Also can I force offline the non-active server and have it re-activate automatically if the main server goes down ?
Thanks
Shawn - shawn306_84070
Nimbostratus
I wanted to bump this up and ask a question.
I have a pool with two servers in it. One would be active and one would be used only if the other server goes down.
The one server has the priority group set to 1
The other server has a priority group setting of 0
For Priority Group Activation does the number need to be set at 2 or 3 or does it make a difference ?
Also can I force offline the non-active server and have it re-activate automatically if the main server goes down ?
Thanks
Shawn - I'm not sure what would happen if you set it to 0.. I always started at 1, and the doc I have speaks to starting at one..
I would set the primary server as 2, and secondary as 1... Yeah you could use 2 or 3 for primary.. just as long as the numbers are higher for the primary.. more numbers are for more tiers.. Then set your less than attribute to 1.
One thing to note, when a group comes available all members in with that priority come online.. for example.. let's say less than criteria is met and group 1 comes online and it has 3 members all three members come online.... conversely, if you're primary(higher) group has 3 members with an attribute of less than 3, and one server goes offline, the next group would come online, and the reaming members in the primary group would stay online as well..
Also can I force offline the non-active server and have it re-activate automatically if the main server goes down ?
without using an iRule I don't believe there is a way to employ a server when you manually disable it.. anyone know different? - Michael_Yates
Nimbostratus
Question: For Priority Group Activation does the number need to be set at 2 or 3 or does it make a difference?
Answer: The higher the number the higher the preference. I have some that start at 1 and go upwards. I also have a few that start a 0 (I follow the practice outlined by iRuleYou. I start at one as a common practice for consistency, some of my co-workers don't....hence the ones that start with 0).
Question: Also can I force offline the non-active server and have it re-activate automatically if the main server goes down?
Answer: There have been many posts for this. You can attempt to disable a server with an iRule, but the health check applied in the pool will put it back on-line shortly after you disable it (if I am wrong somebody set me straight because I would love to be wrong on this one). The only way to fully put down a server is to take it out of the pool, stop the service that is being monitored on the server, or apply a health monitor that will fail (forcing the server to appear as hard down).
I have never attempted to apply or remove a Health Monitor with an iRule. I am not sure if it could be done. - hoolio
Cirrostratus
Posted By JRahm on 04/04/2011 08:36 AM
I haven't tested dest addr persistence, but seems it would do the job as well.
http://devcentral.f5.com/wiki/default.aspx/iRules/SingleNodePersistence.html Click Here
I think destination address persistence is done based on the client's destination address (before translation is performed to the pool member IP. So I think it's only useful if the VS isn't doing translation.
Aaron
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