If the number of available servers falls below the failover threshold in all clusters within a host configuration, policy operations do not stop. Requests are sent to the first cluster in the cluster sequence that has at least one available server.
For example, suppose a host configuration has two clusters—C1 containing three servers, and C2 containing five servers. The failover threshold for the host configuration is set at 60 percent. The following table shows the minimum number of servers that must be available within each cluster:
Cluster |
Servers in Cluster |
Percentage Failover Threshold |
Numeric Failover Threshold (Minimum Available Servers) |
---|---|---|---|
C1 |
3 |
60 |
1 |
C2 |
5 |
60 |
3 |
If the number of available servers falls below the threshold in each cluster, so that C1 has no available servers and C2 has just two, the next incoming request will be dispatched to a C2 server with the best response time. After at least two of the three C1 servers are repaired, subsequent requests are load-balanced among the available C1 servers.
Agent API v6 is backwards-compatible with Agent API v5, allowing complete interoperability between v5/v6 agents and the v5/v6 Agent APIs.
Example: Create a host configuration
The following code creates a host configuration object and adds a number of clusters and servers:
use Netegrity::PolicyMgtAPI; # Initialize the Policy Management API and create a Host Config object. $pmgtapi = Netegrity::PolicyMgtAPI‑>New(); $session = $pmgtapi‑>CreateSession("SiteMinder", "password"); $hostconf = $session‑>CreateHostConfig("host", "description", false, 2, 2, 1, 30); # Add two non-cluster servers. The Az, Auth and Acct ports are # specified. $hostconf‑>AddServer("1.1.1.1", 44443, 44442, 44441); $hostconf‑>AddServer("2.2.2.2", 44443, 44442, 44441); # Add two clusters with two servers in each cluster. One Policy # Server port number is specified. $clusterconf1 = $hostconf‑>AddCluster(); $clusterconf1‑>AddServer("1.1.1.1", 44443); $clusterconf1‑>AddServer("2.2.2.2", 44443); $clusterconf2 = $hostconf‑>AddCluster(); $clusterconf2‑>AddServer("3.3.3.3", 44443); $clusterconf2‑>AddServer("4.4.4.4", 44443); # Print configuration of all non-cluster servers in the Host # Config object @servers = $hostconf‑>GetAllServers(); foreach $server (@servers) { $address = $server‑>GetServerAddress(); @ports = $server‑>GetServerPort(); print("Server: $address,@ports[0],@ports[1],@ports[2]\n"); } # Print all cluster servers @clusters = $hostconf‑>GetAllClusters(); foreach $cluster (@clusters) { $num++; foreach $server ($cluster‑>GetAllServers()) { $address = $server‑>GetServerAddress(); $port = $server‑>GetServerPort(); print("Cluster $num Server: $address,$port\n"); } } # Remove all clusters and non-cluster servers from host configuration $hostconf‑>RemoveAllClusters(); $hostconf‑>RemoveAllServers();
Copyright © 2014 CA.
All rights reserved.
|
|