How Webagent select the Policy Server where it will send request ?

Document ID : KB000046994
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:

How Webagent select the best Policy Server to send the request ?

Answer:


Each PID / TID will have some information for each Policy Server it can connect to.
Extract of the Webagent traces using the AgentConMgr.conf and decomposed by PID/TID :

[Pid][Tid][SrcFile][Function][HandleCount][State][ClusterID][Message]
[===][===][=======][========][===========][=====][=========][=======]
[2351][3067913984][SmAgentAPI.cpp:372][ProcessRequest][][][][Enter function ProcessRequest]
[2351][3067913984][SmClient.cpp:2679][GetBestServerIndex][5][ACTIVE][2][Entered Function]
[2351][3067913984][SmClient.cpp:2683][GetBestServerIndex][5][ACTIVE][2][--------------------Dumping DistrTable]
[2351][3067913984][SmClient.cpp:2690][GetBestServerIndex][5][ACTIVE][2][Server A.B.CC.DD: Current total capacity: 95.99, current throughput: 4.01]
[2351][3067913984][SmClient.cpp:2690][GetBestServerIndex][5][ACTIVE][2][Server EE.FF.GG.DD: Current total capacity: 100, current throughput: 4.01]
[2351][3067913984][SmClient.cpp:2690][GetBestServerIndex][5][ACTIVE][2][Server HH.II.JJ.DD: Current total capacity: 100, current throughput: 4.01]
[2351][3067913984][SmClient.cpp:2690][GetBestServerIndex][5][ACTIVE][2][Server OO.PP.QQ.RR: Current total capacity: 100, current throughput: 4.01]
[2351][3067913984][SmClient.cpp:2690][GetBestServerIndex][5][ACTIVE][2][Server KK.LL.MM.NN: Current total capacity: 100, current throughput: 401]
[2351][3067913984][SmClient.cpp:2692][GetBestServerIndex][5][][][ACTIVE][2][--------------------]
[2351][3067913984][SmClient.cpp:2710][GetBestServerIndex][5][][][ACTIVE][2][Changing Best server index was 0 is now 1]
[2351][3067913984][SmClient.cpp:2737][GetServer][5][][][ACTIVE][2][Selected server EE.FF.GG.DD: Current total capacity: 95.99, current throughput: 4.01]
[2351][3067913984][SmClient.cpp:2739][GetBestServerIndex][5][][][ACTIVE][2][Leaving Function]

- Current Throughput is the average requests per second for a specific Policy Server
- Server Capacity is the percentage of requests that will be taken among the cluster

Webagent will use the Server with the Highest Capacity in the list. For the example above it will be the EE.FF.GG.DD.

- Capacity is is measured by the time Policy Server takes to respond to Agent queries during the Calibration phase of server, which is initiated when Agent starts or when the Policy Server becomes Active.
- The Calibration phase depends on multiple parameters to calculate the Policy Server average response time.

For example :

[3384][116][SmClient.cpp:3052][Recalibrate Distribution][2][][][ACTIVE][1][Average response time for server AAA.BBB.CCC.DDD is 238 ticks, thr is 4.184]
[3384][116][SmClient.cpp:3052][Recalibrate Distribution][2][][][ACTIVE][1][Average response time for server EEE.FFF.GGG.DDD is 21417 ticks, thr is 0.04669]

The second server took 21417 tics which is normal. But the first machine took only 238 tics, which seems to be a Policy Server with high a throughput.


The servers Throughput is in ration of 89 : 1 (21417/238).

Additional information:

How to troubleshoot Failover/Failback between WebAgent and Policy Server ?

http://www.ca.com/us/support/ca-support-online/product-content/knowledgebase-articles/TEC1983777.aspx