File: README

package info (click to toggle)
trafficserver 9.2.5%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 53,008 kB
  • sloc: cpp: 345,484; ansic: 31,134; python: 24,200; sh: 7,271; makefile: 3,045; perl: 2,261; java: 277; pascal: 119; sql: 94; xml: 2
file content (34 lines) | stat: -rw-r--r-- 1,846 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
ATS (Apache Traffic Server) Multiplexer plug-in
-----------------------------------------------

This is a remap plug-in that allows a request to be multiplexed one or more times
 and sent to different remap entries. Both headers and body (in case of POST or
 PUT methods, only) are copied into the new requests.

Multiplexer:
 1. adds "X-Multiplexer: original" header into client's request.
 2. copies client's request (bodies are copied by transforming the request)
 3. changes Host header of the copy according to pparam.
 4. changes X-Multiplexer header to "copy".
 5. sends the copied request with TSHttpConnect.

Multiplexer dispatches the request in background without blocking the original
 request. Multiplexed responses are drained and discarded.

A global timeout can be overwritten through "multiplexer__timeout" environment variable representing how many nanoseconds to wait. A default 1s timeout is hard-coded.

Please use "multiplexer" tag for debugging purposes. While debugging, multiplexed requests and responses are printed into the logs.

Multiplexer produces the following statistics consumed with traffic_ctl:
 - failures: number of failed multiplexed requests
 - hits: number of successful multiplexed requests
 - requests: total number of multiplexed requests
 - time(avg): average time taken between multiplexed requests and their responses
 - timeouts: number of multiplexed requests which timed-out
 - size(avg): average size of multiplexed responses

Example remap.config:
    map http://www.example.com/a http://www.example.com/ @plugin=multiplexer.so @pparam=host1.example.com
    map http://www.example.com/b http://www.example.com/ @plugin=multiplexer.so @pparam=host2.example.com
    map http://www.example.com/c http://www.example.com/ @plugin=multiplexer.so @pparam=host1.example.com @pparam=host2.example.com