Request scheduling and throttling

Ops Center Analyzer Detail View REST API Reference Guide

Version
11.0.x
Audience
anonymous
Part Number
MK-99ANA004-10
The Analyzer detail view REST API request scheduler contains the following limitations while scheduling the request:
  • The schema and non-schema read requests are processed in parallel.
  • The schema and non-schema read requests and non-schema write requests for a dataset are processed in parallel.
  • If the schema write request is in progress, then requests such as the schema read request, non-schema read request, and write request are not processed in parallel with a schema write request.
Note: Schema operations include read and write operations on the attribute definition, resource definition, dataset, and data subset. Non-schema operations include read and write operations on resource data and query.

Any request that cannot be processed due to these limitations is queued in the request scheduler. All queued requests are processed by the request processor in first in, first out (FIFO) order.

Instead of processing each API request on a separate thread, which could be inefficient on resources, the request processor uses the pool of worker threads to throttle the API requests processing.

The number of worker threads can be tuned to process number of requests in parallel.

The following diagram explains the request queueing and scheduling.

The following example considers the four worker threads:
  1. Initially, all worker threads are available and the queue is empty
  2. When the schema write request SW1 is received, it is selected by a worker thread for processing.
  3. When another request SR1 is received, it is pushed to the queue. (If a schema write request is in progress, then no other request can run in parallel.)
  4. Request SW1 completes and its status is sent in the response message. Request SR1 processing begins.
  5. While request SR1 is in progress, additional requests NSR1 and NSW1 are received. These requests can run in parallel; the available worker threads select these request for processing. (All schema read, non-schema read, and non-schema write requests for a dataset can be processed in parallel).
  6. While these requests are in progress, another schema write request SW2 is received. This request cannot be processed in parallel and is added to the queue.
  7. When all requests are completed, the SW2 request is selected from the queue for processing.