vADC Docs

Collected Tech Tips: TrafficScript examples

by on ‎02-24-2013 05:24 AM - edited on ‎06-11-2015 03:42 PM by PaulWallace (16,291 Views)

TrafficScript is the programming language that is built into the Stingray Traffic Manager.  With TrafficScript, you can create traffic management 'rules' to control the behaviour of Stingray in a wide manner of ways, inspecting, modifying and routing any type of TCP or UDP traffic.

 

The language is a simple, procedural one - the style and syntax will be familiar to anyone who has used Perl, PHP, C, BASIC, etc. Its strength comes from its integration with Stingray, allowing you to perform complex traffic management tasks simply, such as controlling traffic flow, reading and parsing HTTP requests and responses, and managing XML data.

 

This article contains a selection of simple technical tips to illustrate how to perform common tasks using TrafficScript.

 

TrafficScript Syntax

 

 

HTTP operations

 

 

XML processing

 

 

General examples

 

 

More information

 

For a more rigorous introduction to the TrafficScript language, please refer to the TrafficScript guide in the Stingray Product Documentation

Contributors