A request limit exceeded event occurs when a request limit configured for a virtual server is exceeded. OTD checks if a request limit was exceeded in the specified interval of time, event-notification-interval and sends a notification message to the configured HTTP endpoint.
The event-notification-interval
is a configurable parameter set by the user for a request limit, while subscribing to notifications from it. A notification message is sent for every request limit that exceeds the configured request limit. A request limit is identified using the name provided while configuring the request limit.
If the request limit uses the monitor
attribute to monitor requests, the notification message will contain a JSON array of all monitors that exceeded the thresholds.
When the virtual server exceeds the specified request limit, OTD rejects all subsequent requests that match the monitor attribute. The notification message will include information on the number of requests rejected for each monitor.
Note:
When a request limit is exceeded, OTD does not send a notification immediately.
When there is a high burst of traffic, request limit may exceed multiple times at close intervals of time. If OTD sends a notification message every time the request limit exceeds, there would be many notification messages. To avoid this, OTD checks if a request limit was exceeded in an interval of time and sends a notification message if it detects that the limit was exceeded.
Create an event subscription. For more information, see Subscribing to origin server status change event Using WLST.
Enabling request limit exceeded event
To enable events for a specified request limit, run the otd_enableRequestLimitEvents
command, as shown in the example.
props = {} props['configuration'] = 'foo' props['virtual-server'] = 'bar' props['request-limit'] = 'request-limit-1' props['event-notification-interval'] = '60' otd_enableRequestLimitEvents(props)
Disabling request limit exceeded event
To disable events for a specified request limit, run the otd_disableRequestLimitEvents
command, as shown in the example.
props = {} props['configuration'] = 'foo' props['virtual-server'] = 'bar' props['request-limit'] = 'request-limit-1' otd_disableRequestLimitEvents(props)
Viewing request limit exceeded event properties
To view the properties of a specified request limit, run the otd_getRequestLimitProperties
command.
POST messages sent to the endpoint has a message body that contains a JSON document with the name/value pairs described in this section.
Table 13-3 JSON properties common to all events
JSON property | Description |
---|---|
event-type |
Type of the event. Value: |
domain-name |
Name of the domain where Oracle Traffic Director instance is configured. |
instance-name |
Name of the Oracle Traffic Director instance. |
Table 13-4 JSON properties specific to notifications from request-limit-exceeded
JSON property | Description |
---|---|
time-begin |
Timestamp that indicates the begin of the event notification interval. |
time-end |
Timestamp that indicates the end of the event notification interval. |
virtual-server |
Name of the virtual server for which request-limiting is enabled. |
request-limit-rule |
Identifies the request limit rule that generated this notification message. |
monitor |
Value of the request attribute that is being monitored. For example, if monitor=$ip is specified in the -request-limit rule, the JSON property If the monitor is not specified in the request-limit rule, this property will be set to |
total-queue-overflows |
Total requests rejected due to queue overflow. |
total-queue-timeouts |
Total requests rejected due to timeout while waiting in the queue. |
{ "$schema": "http://json-schema.org/draft-04/schema#", "id": "/", "type": "object", "properties": { "v1.0": { "id": "v1.0", "type": "object", "properties": { "event-type": { "id": "event-type", "type": "string" }, "domain-name": { "id": "domain-name", "type": "string" }, "instance-name": { "id": "instance-name", "type": "string" }, "event-notification-interval": { "id": "event-notification-interval", "type": "object", "properties": { "time-begin": { "id": "time-begin", "type": "string" }, "time-end": { "id": "time-end", "type": "string" } } }, "virtual-server": { "id": "virtual-server", "type": "string" }, "request-limit-rule": { "id": "request-limit-rule", "type": "string" }, "monitors": { "id": "monitors", "type": "array", "items": { "id": "0", "type": "object", "properties": { "monitor": { "id": "monitor", "type": "string" }, "total-rejects": { "id": "total-rejects", "type": "object", "properties": { "total-queue-overflows": { "id": "total-queue-overflows", "type": "integer" }, "total-queue-timeouts": { "id": "total-queue-timeouts", "type": "integer" } } } } } } }, "required": [ "event-type", "domain-name", "instance-name", "event-notification-interval", "virtual-server", "request-limit-rule", "monitors" ] } }, "required": [ "v1.0" ] }
{ "v1.0": { "event-type": "request-limit-exceeded", "domain-name": "base domain", "instance-name": "otd1", "event-notification-interval": { "time-begin": "Mon, 18 Apr 2016 04:34:23 -07:00", "time-end": "Mon, 18 Apr 2016 04:35:23 -07:00" }, "virtual-server": "1.example.com", "request-limit-rule": "request-limit-1", "monitors": [ { "monitor": "16.181.76.89", "total-rejects": { "total-queue-overflows": 2, "total-queue-timeouts": 3 } } ] } }