This is a remap plugin used in the HIPES system.
urlName of the query parameter for the service URL
/Path to use for the service URL
noUse SSL when connecting to the service
hipes.yimg.comName of HIPES server,
The active connection timeout in ms
The no activity timeout in ms
The connect timeout in ms
The DNS timeout
The timeout options override the server defaults (from
only apply to the connection to the specific “service” host.
Notes on HIPES¶
HTTP Pipes (aka HIPES and pronounced “Hippies”) allows data services to be pipelined together, as illustrated by the example below.
ATS is run on port 80 and apache HTTP web server is run on port 8080 on localhost (127.0.0.1)
The HIPES plugin is used in
map http://127.0.0.1/svc_case http://nosuchhost @plugin=hipes.so @pparam=service:127.0.0.1:8080 @pparam=path:svc_case.php @pparam=server:127.0.0.1 map http://127.0.0.1/svc_reverse http://nosuchhost @plugin=hipes.so @pparam=service:127.0.0.1:8080 @pparam=path:svc_reverse.php @pparam=server:127.0.0.1 map http://127.0.0.1/test.txt http://127.0.0.1:8080/test.txt
The plugin remaps the incoming URL such as
to the following
urlfrom the ATS again and the plugin remaps the URL
to this URL
5. In this example, the service
svc_case.php fetches and transforms the response of
(which ATS proxies the request to a local file) to upper case. And subsequently the service
the response and reverse the order before the response is sent back to the client by ATS.
Notes on reducing traffic¶
There can be significant overhead using HIPES because the data can traverse through ATS many times. Caching can be
important to reduce traffic to services/through ATS and can be achieved via a proper
Cache-Control header returned
by the services. Another way to reduce traffic through ATS is to have ATS to return 302 redirects to url for the
requests made by service, instead of proxying the requests to that url. However, the service must then be able to follow
the redirect. The down side is that we cannot use ATS to cache intermediate results. Below is an example of using
Modification to above example to reduce traffic using redirect¶
1. The service
svc_reverse.php is modified to add a header of
X-HIPES-Redirect: 2 to the request made against
HIPES plugin will instruct ATS to return a redirect response to this url
for the following request
3. The service
svc_reverse.php is also modified to follow the redirect. Thus the response of the service of
svc_case.php will not pass through ATS and will pass to
svc_reverse.php service instead.