How To Build a Production Ready Environment
When creating applications using the UDS APIs, it is important to consider basic load balancing of requests across all available servers in the cluster. Find which servers are available by using the get servers request.
To begin building your production ready application, please follow the 4 steps below.
1. Configure user's home cluster
We want a user to be homed to one cluster to optimize resource use and avoid overload. On the End User Configuration page of CUCM Admin site, you will see a checkbox for Home Cluster. Check this check box if the end user is homed to this cluster. The end user should only be homed to one cluster within the enterprise. See screenshot below.
2. Get the user's home cluster
Developing for a multi-cluster environment?
Send the get clusterUser request to the ILS Hub Publisher to find the user's home cluster. Once we know the user's home cluster, we can send the API requests to any of the servers within that cluster to balance the load.
A successful response will include the host name of the publisher's home cluster and version number.
Developing for a single cluster environment?
Skip to the next step.
Prepare for Load Balancing
A 503 response will sometimes come with a Retry-After header which can serve as the minimum delay time before attempting the next retry. Using the Retry-After header is no guarantee that the next UDS request will work since conditions can change rapidly on a server. However, the Retry-After header should be considered valuable data to be incorporated into a broader 503 retry strategy.
Now that we know the user's home cluster, we can use get servers to get a list of all servers in the home cluster and verify they are all versioned 10.0 or above. Your application can use this information to load balance your requests.
A successful response will include the host name of the publisher, its subscribers, and version number. Remeber the UDS APIs are only supported on UCM versions 10.0 and above. Authentication is not required for this request.
4. Load balance your requests across the servers in the user's home cluster
Cisco recommends sending the API requests to a server at random within the user's home cluster to help balance the load requests. You may choose to do this any way you like.
Visit the UDS Developer Forums to ask questions and interact with other developers.