Maintain server affinity to the PI Vision server or AF server
- Last UpdatedJan 13, 2023
- 1 minute read
It is recommended to configure your hardware load balancer to maintain server affinity to the AVEVA PI Vision application server or to the AF server. When you maintain server affinity, each client returns to the same server, and does not bounce between the servers in the load-balancing pool.
The first time the hardware load balancer encounters a client, it allocates the client to a server depending on current load. The hardware load balancer issues a cookie to the client that records to which server the client was allocated. On subsequent visits, the hardware load balancer "asks" the client which server it should go to by checking the cookie.
Server affinity provides the best performance, because the server cache has the most recent content, whereas a new server connection would need to load content. Additionally, switching servers would necessitate sign up for updates on the new server and the old server would have non-connected sessions that need to time-out.
PI AF transactions are stateless. Therefore, session affinity does not play a significant role in performance.
AVEVA PI Vision is a "stateful" application. It retains information about its active connections. For this reason, each HTTP request should be routed to the same back end web server.