JSONRPC¶
Description¶
Traffic Server Implements and exposes management calls using a JSONRPC API. This API is base on the following two things:
JSON format. Lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It’s basically a collection of name/value pairs.
JSONRPC 2.0 protocol. Stateless, light-weight remote procedure call (RPC) protocol. Primarily this specification defines several data structures and the rules around their processing.
In order for programs to communicate with Traffic Server, the server exposes a JSONRRPC 2.0
API where programs can communicate with it.
Configuration¶
The JSONRPC 2.0 server can be configured using the following configuration file.
Note
Traffic Server will start the JSONRPC 2.0 server without any need for configuration.
If a non-default configuration is needed, the following describes the structure.
File jsonrpc.yaml is a YAML format. The default configuration is:
#YAML
rpc:
enabled: true
unix:
lock_path_name: /tmp/conf_jsonrpc.lock
sock_path_name: /tmp/conf_jsonrpc.sock
backlog: 5
max_retry_on_transient_errors: 64
restricted_api: true
Field Name |
Description |
---|---|
|
Enable/disable toggle for the whole implementation, server will not start if this is false/no |
|
Specific definitions as per transport. |
IPC Socket (unix
):
Field Name |
Description |
---|---|
|
Lock path, including the file name. (changing this may have impacts in traffic_ctl) |
|
Sock path, including the file name. This will be used as |
|
|
|
Number of times the implementation is allowed to retry when a transient error is encountered. |
|
Used to set rpc unix socket permissions. If restricted 0700 will be set, otherwise 0777. |
Note
Currently, there is only 1 communication mechanism supported. Unix Domain Sockets