Function avi.vs.persist()
Description Load balances the request to the optional provided Pool or the pool attached to the virtual service.
This function also creates a key-value persistence entry for the same. The key being the passed parameter and value being the load balanced IP,port (Eg:
Optional lifetime ensures that the persistence table entry is created with the passed lifetime.
The default is 300s.
Under the hood, this API, performs traditional load balancing and automatically creates a persistence table entry with value being the load balanced backend server.
Repeatedly calling out this API will refresh the timeout.
Parameter Key , [lifetime], [pool]
Returns No return value

if username == “my_user” then
avi.vs.persist(username, 3600, “POOL_80”)

Note: In Avi Vantage release 18.2.3, this API yields from a DataScript and no further statements after this API will run. This is a terminal API.