We want to enable persistance to the same server using cookies while doing at the same time.
To achieve persistence, we will insert cookies in all connections coming from new clients. We will layer-4 load-balance the connections, and at the same time insert a cookie.
The cookie value will contain the server-id to which the connection was load-balanced. Next time when the same client connects, it will present the cookie. Using the cookie value, we will know which real-server to choose and send the connection to it.
ATTENTION: This requires SSL offload - ensure you are using at least ADX OS >= 12.1.
We will use Layer-7 switching using csw to achieve this. There are three important points to note:
Connections from new clients will not have the cookie. Thus, the ServerIron will not know how to switch those. To handle such clients, the ServerIron will send them to a pre-defined group. We need group-id to be assigned to each real-server.
However, once a server is selected, its ServerID will be used as the cookie value. We need server-id,to be used in the cookie value, assigned to each real-server.
For new connections, ServerIron will set a cookie. But we need to define this cookie name so that a set-cookie: CookieName=value can be sent by the ServerIron to the client. We need to define cookie-name under vip.