Home

Traffic Server Software Developers Kit

Roadmap for Creating Plugins

This chapter has provided an overview of Traffic Server’s HTTP processing, API hooks, and the asynchronous event model. Next, you must understand the capabilities of Traffic Server API functions. These are quite broad:

Below are some guidelines for creating a plugin:

  1. Decide what you want your plugin to do, based on the capabilities of the API and Traffic Server. Two main kinds of example plugins provided with this SDK are HTTP-based (includes header-based and response transform plugins), and non-HTTP-based (a protocol plugin). These examples are discussed in the next three chapters.

  2. Determine where your plugin needs to hook on to Traffic Server’s HTTP processing (view the HTTP Transaction State Diagram).

  3. Read Header-Based Plugin Examples to learn the basics of writing plugins: creating continuations and setting up hooks. If you want to write a plugin that transforms data, then read HTTP Transformation Plugins.

  4. Figure out what parts of the Traffic Server API you need to use and then read about the details of those APIs in this manual's reference chapters.

  5. Compile and load your plugin (see Getting Started).

  6. Depending on your plugin’s functionality, you might start testing it by issuing requests by hand and checking for the desired behavior in Traffic Server log files. See the Traffic Server Administrator’s Guide for information about Traffic Server logs.

  7. You can test the performance of Traffic Server running with your plugin using SDKTest. You can also customize SDKTest to perform functional testing on your plugin; for more information see the Traffic Server SDKTest User’s Guide.