PowerServer Web APIs provides no clustering function to support load-balancing or fail-over; but you can install and configure a third-party server (such as Nginx, Apache, IIS, AWS ALB, Azure Application Gateway, AWS EKS (K8S), Azure AKS (K8S) etc.) as a load balancer to direct requests to a group of .NET servers. (Fail-over is currently unsupported.)
PowerServer Web APIs uses cookie to achieve session persistence (it returns a cookie when each user session is created and then includes the cookie in each request from that user session). Therefore, you will need to configure the third-party server to support the following:
-
"sticky" or "persistent" sessions (this ensures the requests from the same user will always be directed to the same PowerServer Web APIs)
-
the cookie timeout value must be equal to or greater than the session timeout value (this ensures the cookie stays valid during a session)
The session timeout value is by default 3600 seconds (it is set in the Applications.json file in the PowerServer C# solution).
When you configure the Web API URL for the application, you should point to the URL of the load balancer (for example, https://172.16.100.51:8080 in the following graph).