How does a web agent select the best Policy Server to send a request?
WebAgent Release: All supported versions of 12.52.x and12.8.x
Each PID / TID will have some information for each Policy Server it can connect to.
Extract of the Web agent 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 number of requests per second for a specific Policy Server
- Server Capacity is the percentage of requests that will be taken among the cluster
Web agents 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 measured by the time the Policy Server takes to respond to agent queries during the Calibration phase of the server, which is initiated when the agent starts or when the Policy Server becomes active.
- The Calibration phase depends on multiple parameters to calculate the Policy Server's 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 throughput.
The server's throughput is in a ratio of 89:1 (21417/238).