# US 2023/0418676 A1 · Priority-based load shedding for computing systems

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2023/0418676 A1
- Document ID: US20230418676A1
- Status: Published application
- Kind: A1
- Application number: 17/850,378
- Filed: 2022-06-27
- Published: 2023-12-28
- Earliest claimed: 2022-06-27
- Assignees: Uber Technologies, Inc.
- Applicants: Uber Technologies, Inc.
- Inventors: Jakob Holdgaard Thomsen; Jesper Lindstrøm Nielsen; Timothy Smyth; Vladimir Gavrilenko
- Web page: https://patentgrep.com/patent/US20230418676A1

## CPC

- G06F 9/505: {considering the load}
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F 2209/5021: Priority
- G06F 2209/5022: Workload threshold
- G06F 2209/503: Resource availability
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An online system performs load shedding in case of system overloads. The system maps each request to a tier and a cohort. The tier is determined based on a type of request and the cohort is determined based on the user. Each tier includes multiple cohorts. The tiers and cohorts are ranked by priority. If the system determines that the system is overloaded, the system determines a threshold tier and a threshold cohort for load shedding. The threshold tier and threshold cohort indicate a threshold priority of requests that are processed. If the system determines that the unprocessed request has a priority below the threshold priority indicated by the threshold tier and the threshold cohort, the system rejecting the unprocessed request. The system executes unprocessed requests that are not rejected.

## Claims

### Claim 1

A computer-implemented method comprising:
receiving, by a system, requests for processing, each request associated with a user, wherein each request is associated with a tier and a cohort, wherein the tier is determined based on a type of request and the cohort is determined based on the user;
determining that the system is overloaded;
responsive to determining that the system is overloaded, determining a threshold tier and a threshold cohort, the threshold tier and threshold cohort indicating a threshold priority of requests;
for each of a set of unprocessed requests:
(i) determining a tier and a cohort of the unprocessed request,
(ii) comparing the tier and the cohort of the unprocessed request with the threshold tier and the threshold cohort to determine whether the unprocessed request has a priority below the threshold priority of requests, and
(iii) responsive to determining that the unprocessed request has a priority below the threshold priority of requests, rejecting the unprocessed request; and
processing, by the system, a subset of the set of unprocessed requests that are not rejected.

### Claim 2 (depends on 1)

The method of claim 1, wherein determining that the system is overloaded comprises:
determining whether a number of unprocessed requests exceeds a threshold value; and
responsive to the number of unprocessed requests exceeding the threshold value determining that the system is overloaded;

### Claim 3 (depends on 1)

The method of claim 1, wherein determining the threshold tier and threshold cohort comprises:
determining a percentage of unprocessed requests to be rejected based on a current number of unprocessed requests and an aggregate value based on the number of unprocessed requests over a time interval; and
determining the threshold tier and threshold cohort based on the percentage of unprocessed requests to be rejected.

### Claim 4 (depends on 3)

The method of claim 3, wherein determining the threshold tier and threshold cohort based on the percentage of unprocessed requests to be rejected comprises:
identifying a plurality of requests received in a recent time interval;
determining a cumulative distribution of frequency of occurrence of requests in each cohort of each tier; and
determining the threshold tier and threshold cohort as the tier and cohort from the cumulative distribution corresponding to the percentage of unprocessed requests to be rejected.

### Claim 5 (depends on 3)

The method of claim 3, wherein the percentage of unprocessed requests to be rejected is updated periodically, wherein the threshold tier and threshold cohort is adjusted periodically based on the updated percentage of unprocessed requests.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
creating a mapping from services running in the system to tiers, wherein each service is assigned to a tier;
determining a service that sent an unprocessed request; and
determining the tier for the unprocessed request using the mapping.

### Claim 7 (depends on 1)

The method of claim 1, wherein the cohort for an unprocessed request is determined based on a user id of the user that sent the request and a value of current time, wherein the cohort of the request has a first value when the current time is within a time interval and the cohort of the request has a second value when the current time is outside the time interval.

### Claim 8 (depends on 1)

The method of claim 1, wherein determining the tier for a request based on the type of request comprises:
assigning requests for performing operations related to system infrastructure to a first tier; and
assigning requests that represents actions requested by external users to a second tier having lower priority compared to the first tier.

### Claim 9 (depends on 8)

The method of claim 8, wherein determining the tier for a request based on the type of request comprises:
assigning requests that represents actions representing test activities to a third tier having lower priority compared to the second tier.

### Claim 10 (depends on 1)

The method of claim 1, wherein the tier is from a plurality of tiers ranked by priority, each tier associated with a plurality of cohorts ranked by priority.

### Claim 11 (depends on 1)

The method of claim 1, further comprising:
storing the requests in a priority queue for processing higher priority requests before lower priority requests.

### Claim 12 (depends on 11)

The method of claim 11, wherein determining the threshold tier and the threshold cohort comprises:
determining a number of enqueued requests and a number of dequeued requests from the priority queue;
determining an overload percentage based on the number of enqueued requests and the number of dequeued requests; and
identifying a request of the priority queue based on the overload percentage; and
determining the tier and the cohort of the identified request as the threshold tier and the threshold cohort.

### Claim 13

A non-transitory computer-readable storage medium storing instructions that, when executed by one or more computer processors, cause the one or more computer processors to perform steps comprising:
receiving, by a system, requests for processing, each request associated with a user, wherein each request is associated with a tier and a cohort, wherein the tier is determined based on a type of request and the cohort is determined based on the user;
determining that the system is overloaded;
responsive to determining that the system is overloaded, determining a threshold tier and a threshold cohort, the threshold tier and threshold cohort indicating a threshold priority of requests;
for each of a set of unprocessed requests:
(i) determining a tier and a cohort of the unprocessed request,
(ii) comparing the tier and the cohort of the unprocessed request with the threshold tier and the threshold cohort to determine whether the unprocessed request has a priority below the threshold priority of requests, and
(iii) responsive to determining that the unprocessed request has a priority below the threshold priority of requests, rejecting the unprocessed request; and
processing, by the system, a subset of the set of unprocessed requests that are not rejected.

### Claim 14 (depends on 13)

The non-transitory computer-readable storage medium of claim 13, wherein instructions for determining that the system is overloaded cause the one or more computer processors to perform steps comprising:
determining whether a number of unprocessed requests exceeds a threshold value; and
responsive to the number of unprocessed requests exceeding the threshold value determining that the system is overloaded.

### Claim 15 (depends on 13)

The non-transitory computer-readable storage medium of claim 13, wherein instructions for determining the threshold tier and threshold cohort cause the one or more computer processors to perform steps comprising:
determining a percentage of unprocessed requests to be rejected based on a current number of unprocessed requests and an aggregate value based on the number of unprocessed requests over a time interval; and
determining the threshold tier and threshold cohort based on the percentage of unprocessed requests to be rejected.

### Claim 16 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, wherein instructions for determining the threshold tier and threshold cohort based on the percentage of unprocessed requests to be rejected cause the one or more computer processors to perform steps comprising:
identifying a plurality of requests received in a recent time interval;
determining a cumulative distribution of frequency of occurrence of requests in each cohort of each tier; and
determining the threshold tier and threshold cohort as the tier and cohort from the cumulative distribution corresponding to the percentage of unprocessed requests to be rejected.

### Claim 17 (depends on 13)

The non-transitory computer-readable storage medium of claim 13, wherein the instructions when executed by the one or more computer processors, further cause the one or more computer processors to perform steps comprising:
creating a mapping from services running in the system to tiers, wherein each service is assigned to a tier;
determining a service that sent an unprocessed request; and
determining the tier for the unprocessed request using the mapping.

### Claim 18 (depends on 13)

The non-transitory computer-readable storage medium of claim 13, wherein the cohort for an unprocessed request is determined based on a user id of the user that sent the request and a value of current time, wherein the cohort of the request has a first value when the current time is within a time interval and the cohort of the request has a second value when the current time is outside the time interval.

### Claim 19 (depends on 13)

The non-transitory computer-readable storage medium of claim 13, wherein instructions for determining the tier for a request based on the type of request cause the one or more computer processors to perform steps comprising:
assigning requests for performing operations related to system infrastructure to a first tier;
assigning requests that represents actions requested by external users to a second tier having lower priority compared to the first tier; and
assigning requests that represents actions representing test activities to a third tier having lower priority compared to the second tier.

### Claim 20

A computer system comprising:
one or more computer processors; and
a non-transitory computer-readable storage medium storing instructions that, when executed by the one or more computer processors, cause the one or more computer processors to perform steps comprising:
receiving, by a system, requests for processing, each request associated with a user, wherein each request is associated with a tier and a cohort, wherein the tier is determined based on a type of request and the cohort is determined based on the user;
determining that the system is overloaded;
responsive to determining that the system is overloaded, determining a threshold tier and a threshold cohort, the threshold tier and threshold cohort indicating a threshold priority of requests;
for each of a set of unprocessed requests:
(i) determining a tier and a cohort of the unprocessed request,
(ii) comparing the tier and the cohort of the unprocessed request with the threshold tier and the threshold cohort to determine whether the unprocessed request has a priority below the threshold priority of requests, and
(iii) responsive to determining that the unprocessed request has a priority below the threshold priority of requests, rejecting the unprocessed request; and
processing, by the system, a subset of the set of unprocessed requests that are not rejected.
