DataScript support for inspecting Layer 4 headers and performing load balancing, persistence, logging, and more based on the header data has been provided.

DataScripts are executed within the data plane on the Avi Load Balancer Service Engines hosting the virtual service to which the DataScript has been attached. DataScript is different from ControlScript, a Python-based scripting tool for automation of the control plane and executed from the Avi Load Balancer Controller.

A DataScript will typically be in some form of if/then logic, similar to a policy’s match/action logic.

Events

The DataScripts service for two events:

  1. VS_DATASCRIPT_EVT_L4_REQUEST

  2. VS_DATASCRIPT_EVT_L4_RESPONSE

The first packet from the client will be subjected to the DataScript with the event VS_DATASCRIPT_EVT_L4_REQUEST. Subsequent packets from the client in the same flow will be forwarded to the same server using a load balancing mechanism and are not subject to DataScript.