Sunit_Tailor_11
Aug 03, 2006Nimbostratus
What tofind other way to reduce execution time for enabling and disabling pool members
Hi,
I have Java application which takes "Pool Member"(A) and "desire Session Status"(B) as arguments.
The Primary functionality of this program is to set desired session status for given pool member on each Virtual Server it is defined irrespective of its priority.
This Programs gets all defined BigIPs from database and for each BigIP it dose following for given Pool Member:
1) Opens the secure connection to given BigIP.
2) Runs Command to get all the Virtual Servers.
String[] VserverList = v_server.get_list();
3) For each Virtual it gets default pool.
parms[0] = VserverList[v].trim();
String[] Default_Pool_Name = v_server.get_default_pool_name(parms);
4) For this default pool it does :
parms[0] = Default_Pool_Name[0];
memberStatList = m_poolMember.get_all_statistics(parms);
memberState = m_poolMember.get_session_enabled_state(parms);
iControl.LocalLBPoolMemberMemberStatisticEntry[] memberEntryList = memberStatList[0].getStatistics();
5) For each "memberEntryList" it does:
iControl.CommonIPPortDefinition member = memberEntryList[j].getMember();
6) It compares this member with "A" ("Pool Member" provided as an argument to this script.)
7) If it matches then it does following:
if "C" ("desired status" provided as an argument) is "ENABLED" then:
memberState[0][j].setSession_state(iControl.CommonEnabledState.STATE_ENABLED);
if "C" ("desired status" provided as an argument) is "DIABLED" then:
memberState[0][j].setSession_state(iControl.CommonEnabledState.STATE_DISABLED);
Is there a way I can reduce the execution time for this program? Is there a way to execute this same functionality with less time.
Currently It takes for us about 2 Minute to do this for one pool member. In our enviroment One Pool Member is defined two times with different priorities at two different Virtual servers on each BigIP. We have four BigIPs. So basically this program affects session status of a given poll member at 16 location.
Any inpput on this question is appreciated.
Thanks.