# US 12,120,042 B2 · Holistic measurement of microservice-based application resource consumption

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

- Number: US 12,120,042 B2
- Document ID: US12120042B2
- Status: Granted
- Kind: B2
- Application number: 18/064,453
- Filed: 2022-12-12
- Published: 2024-06-13
- Granted: 2024-10-15
- Earliest claimed: 2022-12-12
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Peter Eberlein; Volker Driesen
- Web page: https://patentgrep.com/patent/US12120042B2

## CPC

- G06Q 20/145: {Payments according to the detected use or quantity}
- H04L 47/822: {Collecting or measuring resource availability data}
- G06Q 20/14: specially adapted for billing systems
- H04L 12/14: Charging, metering or billing arrangements specially adapted for data communications, e.g. authentication, authorisation and accounting [AAA] framework
- H04L 47/803: {Application aware}
- H04L 47/827: {Aggregation of resource allocation or reservation requests}
- H04L 67/566: Grouping or aggregating service requests, e.g. for unified processing
- H04M 15/00: Arrangements for metering, time-control or time indication {; Metering, charging or billing arrangements for voice wireline or wireless communications, e.g. VoIP}
- H04M 15/61: {based on the service used}
- H04W 4/24: Accounting or billing
- H04L 67/10: in which an application is distributed across nodes in the network (software deployment G06F8/60; multiprogramming arrangements G06F9/46)
- G06Q: INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- H04M: TELEPHONIC COMMUNICATION (circuits for controlling other apparatus via a telephone cable and not involving telephone switching apparatus G08)
- H04W: WIRELESS COMMUNICATION NETWORKS (broadcast communication H04H; communication systems using wireless links for non-selective communication, e.g. wireless extensions H04M1/72)

## Abstract

Systems and methods include reception of a first service call from a first service at a second service, generation, at the second service, of a response to the first service call, determination, at the second service, of an amount of hardware resources consumed by the second service during generation of the response to the first service call, generation, at the second service, of a first resource consumption token identifying the amount of hardware resources consumed by the second service during generation of the response to the first service call, determination of a first identifier of a type of hardware on which the second service is executing, and return of the response, the first resource consumption token and the first identifier of the type of hardware to the first service.

## Claims

### Claim 1

A method comprising:
receiving an incoming user request to an application, wherein the application comprises a first service and a second service;
in response to the incoming user request, transmitting a first service call from the first service to the second service;
generating, at the second service, a response to the first service call;
determining, at the second service, an amount of hardware resources consumed by the second service during generation of the response to the first service call;
determining an identifier of a type of hardware on which the second service is executing;
generating, at the second service, a first-resource consumption token identifying the amount of hardware resources consumed by the second service during generation of the response to the first service call and the identifier of the type of hardware on which the second service is executing;
returning the response to the first service call and the resource consumption token to the first service;
generating, at the first service, a response to the incoming user request to an application based on the response to the first service call;
determining, at the first service, an amount of hardware resources consumed by the first service during generation of the response to the incoming user request;
determining a second identifier of a type of hardware on which the first service is executing;
generating a second resource consumption token at the first service based on the resource consumption token, the second resource consumption token including the identifier and the second identifier, and identifying the amount of hardware resources consumed by the first service during generation of the response to the incoming user request and the amount of resources identified by the resource consumption token; and
determining a resource cost associated with the incoming user request based on the second resource consumption token, a first cost model associated with the identifier of the type of hardware on which the second service is executing, and a second cost model associated with the second identifier of the type of hardware on which the first service is executing.

### Claim 2 (depends on 1)

The method according to claim 1, wherein determining the resource cost comprises:
determining the first cost model; and
determining the second cost model.

### Claim 3 (depends on 1)

The method according to claim 1, further comprising:
receiving a third service call from the second service at a third service;
generating, at the third service, a response to the third service call;
determining, at the third service, an amount of hardware resources consumed by the third service during generation of the response to the third service call;
determining a third identifier of a type of hardware on which the third service is executing;
generating, at the third service, a third resource consumption token identifying the third identifier and the amount of hardware resources consumed by the third service during generation of the response to the third service call;
and
returning the response to the third service call and the third resource consumption token to the second service,
wherein generation of the resource consumption token at the second service comprises determining that the identifier and the third identifier are identical, and, in response to the determination that the identifier and the third identifier are identical:
aggregating the amount of hardware resources consumed by the second service during generation of the response to the first service call with the amount of hardware resources consumed by the third service during generation of the response to the third service call,
wherein the resource consumption token identifies the aggregated amounts of hardware resources.

### Claim 4 (depends on 3)

The method according to claim 3, wherein determining the resource cost comprises:
determining the first cost model; and
determining the second cost model.

### Claim 5 (depends on 4)

The method according to claim 4, wherein generation of the resource consumption token at the second service comprises determining that the identifier and the third identifier are identical and that the hardware on which the second service and the third service are running are located in a same region.

### Claim 6 (depends on 5)

The method according to claim 5, wherein generation of the resource consumption token at the second service comprises determining that the identifier and the third identifier are identical, that the hardware on which the second service and the third service are running are located in a same region, and that the hardware on which the second service and the third service are running are located on a same network.

### Claim 7

A non-transitory computer-readable medium storing program code executable by a processing unit to cause a computing system to:
receive an incoming user request to an application, wherein the application comprises a first service and a second service;
in response to the incoming user request, transmit a first service call from the first service to the second service;
generate, at the second service, a response to the first service call;
determine an identifier of a type of hardware on which the second service is executing;
determine, at the second service, an amount of hardware resources consumed by the second service during generation of the response to the first service call;
generate, at the second service, a resource consumption token identifying the amount of hardware resources consumed by the second service during generation of the response to the first service call and the identifier of the type of hardware on which the second service is executing;
return the response to the first service call, and the resource consumption token to the first service;
generate, at the first service, a response to the incoming user request to an application based on the response to the first service call;
determine, at the first service, an amount of hardware resources consumed by the first service during generation of the response to the incoming user request;
determine a second identifier of a type of hardware on which the first service is executing;
generate a second resource consumption token at the first service based on the resource consumption token, the second resource consumption token including the identifier and the second identifier, and identifying the amount of hardware resources consumed by the first service during generation of the response to the incoming user request and the amount of resources identified by the resource consumption token; and
determine a resource cost associated with the incoming user request based on the second resource consumption token, a first cost model associated with the identifier of the type of hardware on which the second service is executing, and a second cost model associated with the second identifier of the type of hardware on which the first service is executing.

### Claim 8 (depends on 7)

The medium according to claim 7, wherein determination of the resource cost comprises:
determination of the first cost model; and
determination of the second cost model associated with the second identifier.

### Claim 9 (depends on 7)

The medium according to claim 7, the program code executable by a processing unit to cause a computing system to:
receive a third service call from the second service at a third service;
generate, at the third service, a response to the third service call;
determine, at the third service, an amount of hardware resources consumed by the third service during generation of the response to the third service call;
determine a third identifier of a type of hardware on which the third service is executing;
generate, at the third service, a third resource consumption token identifying the third identifier and the amount of hardware resources consumed by the third service during generation of the response to the third service call;
and
return the response to the third service call and the third resource consumption token to the second service,
wherein generation of the resource consumption token at the second service comprises determining that the identifier and the third identifier are identical, and, in response to the determination that the identifier and the third identifier are identical:
aggregate the amount of hardware resources consumed by the second service during generation of the response to the first service call with the amount of hardware resources consumed by the third service during generation of the response to the third service call,
wherein the resource consumption token identifies the aggregated amounts of hardware resources.

### Claim 10 (depends on 9)

The medium according to claim 9, wherein determination of the resource cost comprises:
determination of the first cost model; and
determination of the second cost model.

### Claim 11 (depends on 10)

The medium according to claim 10, wherein generation of the resource consumption token at the second service comprises determination that the identifier and the third identifier are identical and that the hardware on which the second service and the third service are running are located in a same region.

### Claim 12

A system comprising:
a first hardware system of a first hardware type, comprising:
a first one or more processing units; and
a first memory storing program code executable by the first one or more processing units to cause the first hardware system to:
receive a first service call from a first service in response to an incoming user request to an application, wherein the application comprises the first service and a second service;
execute the second service to generate a response to the first service call;
determine an amount of hardware resources of the first hardware system consumed during generation of the response to the first service call;
determine a first identifier of the first hardware type;
generate a first resource consumption token identifying the amount of hardware resources of the first hardware system consumed during generation of the response to the first service call and the first identifier of the first hardware type;
return the response to the first service call and the first resource consumption token to the first service; and
a second hardware system of a second hardware type, comprising:
a second one or more processing units; and
a second memory storing program code executable by the second one or more processing units to cause the second hardware system to:
execute the first service to generate a response to the incoming user request based on the response to the first service call;
determine an amount of hardware resources of the second hardware system consumed during generation of the response to the incoming user request;
determine a second identifier of a second hardware type;
generate a second resource consumption token at the first service based on the first resource consumption token, the second resource consumption token including the identifier and the second identifier, and identifying the amount of hardware resources of the second hardware system consumed during generation of the response to the incoming user request and the amount of resources identified by the first resource consumption token; and
determine a resource cost associated with the incoming user request based on the second resource consumption token, a first cost model associated with the first identifier, and a second cost model associated with the second identifier.

### Claim 13 (depends on 12)

The system according to claim 12, further comprising:
a third hardware system, comprising:
a third one or more processing units; and
a third memory storing program code executable by the third one or more processing units to cause the third hardware system to:
determine the first cost model; and
determine the second cost model.

### Claim 14 (depends on 12)

The system according to claim 12, further comprising: a third hardware system of the first hardware type comprising: a third one or more processing units; and a third memory storing program code executable by the third one or more processing units to cause the third hardware system to: receive a third service call from the second service; generate a response to the third service call; determine an amount of hardware resources of the third hardware system consumed by the third service during generation of the response to the third service call; determine a third identifier of a type of hardware on which the third service is executing; generate a third resource consumption token identifying the third identifier and the amount of hardware resources of the third hardware system consumed during generation of the response to the third service call; return the response to the third service call; and the third resource consumption token to the second service, wherein generation of the first resource consumption token comprises aggregation of the amount of hardware resources consumed by the first hardware system during generation of the response to the first service call with the amount of hardware resources consumed by the third hardware system during generation of the response to the third service call, and wherein the first resource consumption token identifies the aggregated amounts of hardware resources.

### Claim 15 (depends on 14)

The system according to claim 14, further comprising:
a fourth hardware system, comprising:
a fourth one or more processing units; and
a fourth memory storing program code executable by the third one or more processing units to cause the third hardware system to:
determine the first cost model; and
determine the second cost model.

### Claim 16 (depends on 15)

The system according to claim 15, wherein generation of the first resource consumption token comprises determination that the first hardware system and the third hardware system are located in a same region.

### Claim 17 (depends on 16)

The system according to claim 16, wherein generation of the first resource consumption token comprises determination that the first hardware system and the third hardware system are located in a same region, and that the first hardware system and the third hardware system are located on a same network.
