JSON configuration for REST API flow control
API Security Enforcer (ASE) flow control is configured separately for each API using the API JSON file.
The following example shows the flow control-related definitions in an API JSON file:
{
"api_metadata": {
"protocol": "http",
"flow_control": {
"client_spike_threshold": "0/second",
"server_connection_queueing" : false
},
"servers": [
{
"host": "127.0.0.1",
"port": 8080,
"server_spike_threshold": "100/second",
"server_connection_quota": 20
},
{
"host": "127.0.0.1",
"port": 8081,
"server_spike_threshold": "200/second",
"server_connection_quota": 40
}
]
}
}
The flow control section includes definitions that apply globally across the API definition and include the client_spike_threshold
and server_connection_queueing
parameters. Server specific definitions include the server_spike_threshold
and server_connection_quota
parameters, which are configured on each individual server. The default is no flow control with all values set to 0.
You can specify different values for each server for server_connection_quota
and server_spike_threshold
.
If server connection quota is set to 0 for one server, then it must be 0 for all other servers in the API JSON definition. |