DataScript: Execution Priority

Introduction

Many DataScript capabilities can be performed via policies or standard features. It is important to understand the order of precedence, as the execution priority will dictate the order that various features, policies, and DataScripts will occur. For instance, if a policy decides to discard a connection while a DataScript decides to redirect the client, the order of execution is critical to ensuring the intended behavior occurs.

Responses generated by DataScripts or policies (as opposed to responses generated by a server) are not evaluated by DataScripts. For instance, an HTTP response generated by the HTTP Request Policy cannot be inspected or modified by a DataScript.

More than one DataScript may be applied to a single virtual service. The order of the DataScripts is important, as DataScripts with the same event will be executed in the order established. When adding DataScripts via the UI, use the up and down arrows next to the DataScript to reorder. The DataScript at the top of the list will execute first.

Client Request to Server

Avi Vantage processes client-to-back-end-server traffic in the following order of precedence.

Note: Individual features may be inserted at different points based on the feature’s functionality. For example, even though connection throttling is defined as part of an HTTP application profile, if turned on, connection throttling would occur during step 8 of the client request, not step 5.

HTTP Header Processing

  1. SSL
  2. Rate Limiting DDOS
  3. BOT
  4. WAF
  5. DataScript Auth Event
  6. Client Authentication and Authorization
  7. Security Policy
  8. Request Policy
  9. HTTP Application Profile Attributes
  10. DataScript
  11. Caching
  12. Server Selection & Persistence
  13. Request Queuing
  14. Connection Switching/ Connection Multiplexing
  15. Server SSL

HTTP Body Processing

  1. SSL
  2. WAF
  3. DataScript
  4. Server SSL

Server Response to Client

Avi Vantage processes back-end-server-to-client traffic in the following order of precedence:

HTTP Header Processing

  1. SSL
  2. Cache to Client
  3. Compression
  4. Content Rewrite
  5. Response Policy
  6. HTTP Profile Attributes
  7. DataScript
  8. WAF
  9. Cache from Server
  10. Server SSL

HTTP Body Processing

  1. SSL
  2. Cache to Client
  3. Compression
  4. Content Rewrite
  5. DataScript
  6. WAF
  7. Cache from Server
  8. Server SSL

Multiple DataScripts

More than one DataScript may be applied to a single virtual service. The order of the DataScripts is important, as DataScripts with the same event will be executed in the order set. When adding DataScripts via the UI, use the up and down arrows next to the DataScript to reorder. The DataScript at the top of the list will execute first.

Suggested Reading

Document Revision History

Date Change Summary
December 07, 2020 Updated the HTTP Header Processing and Body Processing(Version 20.1.3)
June 05, 2020 Updated the execution priority