TrafficScript - Powerful and Intuitive

One-size-fits-all does not apply when you are managing different types of application traffic, for different applications and different users.

TrafficScript™, ZXTM's customization language, lets you define precisely the traffic management logic you require for each individual request. No longer are you stuck with one-size-fits-all traffic management logic. You've got the freedom to design and implement your application infrastructure as you wish, knowing that ZXTM can work with, adapt to and optimize whatever design suits you best.

Quick Links

What is TrafficScript™? 

TrafficScript™ is the customization language in ZXTM. It makes it easy to create powerful Traffic Management rules that define how ZXTM manages your application traffic.

For example, with TrafficScript, you can configure ZXTM to:

In essence, TrafficScript frees you from having an inflexible load-balancing solution that can only be configured one way. With TrafficScript, you can specify exactly how you would like each transaction to be handled - it's a little like being able to configure your traffic manager especially for each transaction it manages.

TrafficScript is quick and easy for network and application staff to use, so it is often used to rapidly fix complex problems, such as security vulnerabilities, application bugs or application incompatibilities.

How does it work? 

TrafficScript™ is a programming language, used to create rules. A TrafficScript rule can inspect and modify traffic, and activate and control ZXTM:

The TrafficScript language syntax is simple and familiar; it looks just like a simplified version of Perl, Java, C/C# etc. This makes it very easy to learn quickly.

It integrates closely with ZXTM, and there are a many helper functions to make it easy to process transaction data. The HTTP processing is particularly strong; ZXTM manages HTTP complexities like keepalives, header parsing, compressed responses and data chunking for the rule, so the TrafficScript administrator need not be concerned with them. TrafficScript also provides XML processing functions to manage complex XML data.t

What can I do with it? 

The power of TrafficScript comes from the fact that it's a full programming language, so there's a huge amount of potential and flexibility.

For some examples, start with the TrafficScript FactSheet (pdf). There are many more examples on the ZXTM KnowledgeHub, and the Traffic Valuation and Prioritization white paper (pdf) describes how to use TrafficScript to apply differentiated levesl of service to your traffic in detail.

How easy is TrafficScript™ to learn? 

If you are familiar with any common programming language - C/C#, BASIC, Perl, PHP, Java, JavaScript- then you'll feel right at home using TrafficScript.

The RuleBuilder makes it very easy to get started with TrafficScript. It's a powerful user interface tool that you can use to create a wide range of TrafficScript rules without needing any programming experience.

Once you've created your first rules with RuleBuilder, you can then convert them into the TrafficScript language and proceed to becoming a fully-fledged TrafficScript user!

Why is TrafficScript so powerful? 

It's a full programming language. TrafficScript is not just a way of constructing simple 'if condition then action' style policies. It is a full programming language, with a wide range of helper functions to inspect, rewrite and control your traffic.

TrafficScript is very tightly integrated into the ZXTM core. It's not a third-party language that is bolted onto the side, with all of the problems of start-up times, memory management, excessive memory copying and unnecessary language features that impede performance and functionality. The design of TrafficScript is optimized for the task of managing network traffic data, and the integration uses ZXTM to do all of the complex protocol handling, empowering the TrafficScript administrator to write simple rules that run efficiently.

It's not event-driven. TrafficScript rules are not constrained by being unable to block. A TrafficScript rule can do anything - wait on network data, sleep, talk to an external datasource - and ZXTM takes care of suspending and reawakening the rule. Unlike competing implementations which have to expose over 20 'events' that code is hooked onto, ZXTM has just two simple events that trigger rules (start of request, start of response). This makes it extremely easy and intuitive to write concise, simple TrafficScript rules.

For example, a task like reading an HTTP response must cater for missing content lengths, preserving keepalives, decoding chunked responses and decompressing compressed data. In TrafficScript, the function 'http.getResponseBody()' does all of that for you - you do not need to concern yourself with any of the complexities of handing HTTP responses. The KnowledgeHub example 'Masking data (e.g. social security numbers) in HTTP responses' shows this in action.

TrafficScript can inspect and control any TCP or UDP traffic. Based on inspection decisions, you can control:

How can I find out more? 

© Zeus Technology Ltd