US 11,681,273 B2
PID controller for event ingestion throttling
Taavi Andrew Burns, Toronto (CA)
Assigned to PagerDuty, Inc., San Francisco, CA (US)
Filed by PagerDuty, Inc., San Francisco, CA (US)
Filed on Jul. 30, 2021, as Appl. No. 17/444,141.
Prior Publication US 2023/0032488 A1, Feb. 2, 2023
Int. Cl. G05B 19/4155 (2006.01)
CPC G05B 19/4155 (2013.01) [G05B 2219/42033 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A method for event processing, comprising:
accepting for processing, as accepted events and according to a target rate limit that indicates a maximum number of events to be accepted for processing, at least a subset of received events;
associating respective ingested timestamps with the accepted events, wherein an ingested timestamp of an accepted event indicates a time of accepting the accepted event for further processing;
associating respective processing completion timestamps with processed events of the accepted events;
determining an average measured lag time using at least a subset of the respective processing completion timestamps and corresponding respective ingested timestamps;
obtaining a throttled rate limit using a proportional-integral-derivative (PID) controller,
wherein the PID controller is configured to use, as an input, an error value that is a difference between a target lag time indicative of a desired time of processing events and the average measured lag time indicative of an average of actual times of processing events, and
wherein an integral part of the PID controller is set to zero responsive to an accumulated average lag time being less than the target lag time;
obtaining a control value as an active processing time divided by a sum of the active processing time with an average active processing time;
scaling, using the control value, the throttled rate limit to obtain a scaled throttled rate limit; and
accepting subsequent events according to the scaled throttled rate limit, wherein accepting the subsequent events according to the scaled throttled rate limit results in a reduction in a number of events accepted for processing during a throttling period corresponding to the scaled throttled rate limit.