US-12626182-B2 - Microservice compositions
Abstract
A processor may receive data regarding two or more microservices. The processor may identify, using an AI model, features of the two or more microservices. The processor may analyze the features of the two or more microservices relating to utilization contexts of the two or more microservices. The processor may classify a subset of the two or more microservices as a microservice bundle based on the analyzed features, where the microservice bundle includes two or more microservices configured to share microservice resources. The processor may output the classification of the microservice bundle.
Inventors
- Priyajith Chembakassery
- Dinup Padmanabha Pillai
Assignees
- INTERNATIONAL BUSINESS MACHINES CORPORATION
Dates
- Publication Date
- 20260512
- Application Date
- 20210406
Claims (20)
- 1 . A computer-implemented method, the method comprising: receiving, by a processor, microservice data regarding two or more microservices, wherein said microservice data includes service dependency data and microservice use data; determining a utilization context associated with each the two or more microservices, wherein the utilization context includes a time period of utilization of each of the two or more microservices, resource needs associated with the utilization of each of the two or more microservices, a contextual background associated with the utilization of each of the two or more microservices, and a pattern of performance associated with the utilization of each of the two or more microservices; analyzing, using an AI model, the microservice data and utilization context to determine features of the two or more microservices relating to utilization contexts of the two or more microservices; combining a subset of the two or more microservices as a microservice bundle based on the features and a classification of the AI model, wherein the microservice bundle includes two or more microservices configured to share microservice resources, comprising: responsive to a roll out of a change for a first microservice, determining a second microservice that will become nonoperational based on the roll out of change for the first microservice and an impact of the roll out of change on shared resources; and unbundling the first microservice and the second microservice, wherein the first microservice and second microservice have independent resources; and allocating resources to the microservice bundle based on the combined subset of the two or more microservices.
- 2 . The method of claim 1 , wherein the classification of the two or more microservices as a bundle includes a time component.
- 3 . The method of claim 1 , wherein the AI model is trained using data regarding traffic patterns between the two or more microservices.
- 4 . The method of claim 1 , wherein the AI model is trained using data regarding component interactions of microservices.
- 5 . The method of claim 1 , wherein the AI model is trained using data regarding resource utilization of microservices.
- 6 . The method of claim 1 , wherein the AI model is trained using data regarding criticality of microservices.
- 7 . The method of claim 1 , wherein the AI model is trained using data regarding a roll out of a change in a microservice.
- 8 . A system comprising: a memory; and a processor in communication with the memory, the processor being configured to perform operations comprising: receiving microservice data regarding two or more microservices, wherein said microservice data includes service dependency data and microservice use data; determining a utilization context associated with each the two or more microservices, wherein the utilization context includes a time period of utilization of each of the two or more microservices, resource needs associated with the utilization of each of the two or more microservices, a contextual background associated with the utilization of each of the two or more microservices, and a pattern of performance associated with the utilization of each of the two or more microservices; analyzing, using an AI model, the microservice data and utilization context to determine features of the two or more microservices relating to utilization contexts of the two or more microservices; combining a subset of the two or more microservices as a microservice bundle based on the features and a classification of the AI model, wherein the microservice bundle includes two or more microservices configured to share microservice resources, comprising: responsive to a roll out of a change for a first microservice, determining a second microservice that will become nonoperational based on the roll out of change for the first microservice and an impact of the roll out of change on shared resources; and unbundling the first microservice and the second microservice, wherein the first microservice and second microservice have independent resources; and allocating resources to the microservice bundle based on the combined subset of the two or more microservices.
- 9 . The system of claim 8 , wherein the classification of the two or more microservices as a bundle includes a time component.
- 10 . The system of claim 8 , wherein the AI model is trained using data regarding traffic patterns between the two or more microservices.
- 11 . The system of claim 8 , wherein the AI model is trained using data regarding component interactions of microservices.
- 12 . The system of claim 8 , wherein the AI model is trained using data regarding resource utilization of microservices.
- 13 . The system of claim 8 , wherein the AI model is trained using data regarding criticality of microservices.
- 14 . The system of claim 8 , wherein the AI model is trained using data regarding a roll out of a change in a microservice.
- 15 . A computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processor to cause the processor to perform operations, the operations comprising: receiving microservice data regarding two or more microservices, wherein said microservice data includes service dependency data and microservice use data; determining a utilization context associated with each the two or more microservices, wherein the utilization context includes a time period of utilization of each of the two or more microservices, resource needs associated with the utilization of each of the two or more microservices, a contextual background associated with the utilization of each of the two or more microservices, and a pattern of performance associated with the utilization of each of the two or more microservices; analyzing, using an AI model, the microservice data and utilization context to determine features of the two or more microservices relating to utilization contexts of the two or more microservices; combining a subset of the two or more microservices as a microservice bundle based on the features and a classification of the AI model, wherein the microservice bundle includes two or more microservices configured to share microservice resources, comprising: responsive to a roll out of a change for a first microservice, determining a second microservice that will become nonoperational based on the roll out of change for the first microservice and an impact of the roll out of change on shared resources; and unbundling the first microservice and the second microservice, wherein the first microservice and second microservice have independent resources; and allocating resources to the microservice bundle based on the combined subset of the two or more microservices.
- 16 . The computer program product of claim 15 , wherein the classification of the two or more microservices as a bundle includes a time component.
- 17 . The computer program product of claim 15 , wherein the AI model is trained using data regarding traffic patterns between the two or more microservices.
- 18 . The computer program product of claim 15 , wherein the AI model is trained using data regarding component interactions of microservices.
- 19 . The computer program product of claim 15 , wherein the AI model is trained using data regarding resource utilization of microservices.
- 20 . The computer program product of claim 15 , wherein the AI model is trained using data regarding criticality of microservices.
Description
BACKGROUND The present disclosure relates generally to the field of modeling microservice compositions, and more specifically to bundling microservices to share resources. Microservice architecture may allow the ability to decouple software versions and release different components of the software versions at different times. Microservice architecture may also allow the ability to scale components independently and to maintain security boundaries. SUMMARY Embodiments of the present disclosure include a method, computer program product, and system for bundling microservices to share resources. A processor may receive data regarding two or more microservices. The processor may identify, using an AI model, features of the two or more microservices. The processor may analyze the features of the two or more microservices relating to utilization contexts of the two or more microservices. The processor may classify a subset of the two or more microservices as a microservice bundle based on the analyzed features, where the microservice bundle includes two or more microservices configured to share microservice resources. The processor may output the classification of the microservice bundle. The above summary is not intended to describe each illustrated embodiment or every implementation of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS The drawings included in the present disclosure are incorporated into, and form part of, the specification. They illustrate embodiments of the present disclosure and, along with the description, serve to explain the principles of the disclosure. The drawings are only illustrative of certain embodiments and do not limit the disclosure. FIG. 1 is a block diagram of an exemplary system for bundling microservices to share resources, in accordance with aspects of the present disclosure. FIG. 2 is a flowchart of an exemplary method for bundling microservices to share resources, in accordance with aspects of the present disclosure. FIG. 3A illustrates a cloud computing environment, in accordance with aspects of the present disclosure. FIG. 3B illustrates abstraction model layers, in accordance with aspects of the present disclosure. FIG. 4 illustrates a high-level block diagram of an example computer system that may be used in implementing one or more of the methods, tools, and modules, and any related functions, described herein, in accordance with aspects of the present disclosure. While the embodiments described herein are amenable to various modifications and alternative forms, specifics thereof have been shown by way of example in the drawings and will be described in detail. It should be understood, however, that the particular embodiments described are not to be taken in a limiting sense. On the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the disclosure. DETAILED DESCRIPTION Aspects of the present disclosure relate generally to the field of modeling microservice compositions, and more specifically to bundling microservices to share resources. While the present disclosure is not necessarily limited to such applications, various aspects of the disclosure may be appreciated through a discussion of various examples using this context. In some embodiments, a processor may receive data regarding two or more microservices. In some embodiments, the two or more microservices may be part of a set of related microservices for one client. For example, the client may be a retailer, and the two microservices may relate to a payment service for receiving payment for goods sold and a catalog service for describing the goods to be sold. In some embodiments, the data may provide contextual background for how and when the microservices are needed (e.g., by the cloud no later than 4 p.m. each day, etc.). In some embodiments, the data regarding the microservices may include a description of the service and information regarding resources used by service (e.g., compute intensive services, audio intensive services, memory intensive services, etc.). In some embodiments, the data may include information regarding service interdependencies, where one service is dependent on the output or the running of another service (e.g., a payment service dependent on information from a catalog service and a pricing service for a business). In some embodiments, the data may be in the form of metadata about the services. In some embodiments, the data may be regarding a time associated with when and/or how the services are used, including time of day, time of week, time of year, etc. In some embodiments, the data may be regarding the circumstances under which the services are used (e.g., a backup service utilized when demand for another service is very high). In some embodiments, the microservices may be intended for deployment. In some embodiments, the microservices may be part of a legacy system that was previously deployed. In some