To ensure stability of stateful applications, load balancers implement persistence which directs all related connections to the same server. Different types of persistence are supported to address different types of application needs.
Some applications maintain the server state such as, shopping carts. Such state might be per client and identified by the client IP address or per HTTP session. Applications might access or modify this state while processing subsequent related connections from the same client or HTTP session.
The source IP persistence profile tracks sessions based on the source IP address. When a client requests a connection to a virtual server that enables the source address persistence, the load balancer checks if that client was previously connected, if so, returns the client to the same server. If not, you can select a server pool member based on the pool load balancing algorithm. Source IP persistence profile is used by Layer 4 and Layer 7 virtual servers.
The cookie persistence profile inserts a unique cookie to identify the session the first time a client accesses the site. The client forwards the HTTP cookie in subsequent requests and the load balancer uses that information to provide the cookie persistence. Layer 7 virtual servers can only use the cookie persistence profile. Note that a blank space in a cookie name is not supported.
The generic persistence profile supports persistence based on the HTTP header, cookie, or URL in the HTTP request. Therefore, it supports app session persistence when the session ID is part of the URL. This profile is not associated with a virtual server directly. You can specify this profile when you configure a load balancer rule for request forwarding and response rewrite.