Dynamic migration of a group of containers
Patent Information
- Application Number
- JP2023115382
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2017-09-30
- Filing Date
- 2023-07-13
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2038-09-28
Smart Images

Figure 0007777565000001 
Figure 0007777565000002 
Figure 0007777565000003
Abstract
Description
[Technical Field]
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims the benefit of U.S. Provisional Application No. 62 / 566,351, filed September 30, 2017, which is incorporated herein by reference. This application is also related to the following applications, filed on the same date as this application and assigned to a common assignee, each of which is also incorporated herein by reference: U.S. Patent Application No. 16 / 147,305, filed September 28, 2018, entitled "API REGISTRY IN A CONTAINER PLATFORM PROVIDING PROPERTY-BASED API FUNCTIONALITY" Agent reference number 088325-1090746) U.S. Patent Application No. 16 / 147,343, filed September 28, 2018, entitled DYNAMIC NODE REBALANCING BETWEEN CONTAINER PLATFORMS (Attorney Docket No. 088325-1090747) U.S. patent application Ser. No. 2018 / 0100029, filed on September 28, 2018, entitled "OPTIMIZING REDEPLOYMENT OF FUNCTIONS AND SERVICES ACROSS MULTIPLE CONTAINER PLATFORMS AND INSTALLATIONS" No. 16 / 147,332 (Agent reference number 088325-1090748) U.S. Patent Application No. 16 / 147,351, filed September 28, 2018, entitled "REAL-TIME DEBUGGING INSTANCES IN A DEPLOYED CONTAINER PLATFORM" (Attorney Docket No. 088325-1090753) [Background technology]
[0002] background In theory, containers, in any form, represent a standardized way of packaging and interacting with information. Containers can be isolated from one another and used in parallel without any risk of cross-contamination. In the modern software world, the term "container" has acquired a unique meaning. A software container, such as a Docker® container, is a software construct that logically encapsulates and defines a piece of software. The most common type of software encapsulated in a container is an application, service, or microservice. Modern containers also include all the software support necessary for the application / service to run, such as an operating system, libraries, storage volumes, configuration files, application binaries, and other parts of the technology stack that would be found in a typical computing environment. Therefore, using this container environment, multiple containers can be created, each running its own service in any environment. Containers can be deployed without any modifications in production data centers, on-premises data centers, cloud computing platforms, etc. Launching a container on the cloud is identical to launching a container on a local workstation.
[0003] Modern service-oriented architectures and cloud computing platforms break down large tasks into many smaller, more specific tasks. Containers can be instantiated to focus on each specific task, and multiple containers can work together to realize sophisticated applications. This is sometimes called a microservices architecture, and each container can use different versions of programming languages and libraries that can be upgraded independently. The isolated nature of the processing within a container makes containers less susceptible to changes than larger, more monolithic architectures. They can be upgraded and replaced with little effort or risk. Virtual machines can be used to run container platforms, but container platforms are far more efficient than traditional virtual machines at running this microservices architecture. Summary of the Invention [Means for solving the problem]
[0004] Quick Overview In some embodiments, a method for rebalancing container pod usage in a container environment may include deploying a plurality of container pods to a plurality of container nodes in the container environment. The plurality of container pods may each include one or more services. The plurality of container nodes may each include one or more container pods. The plurality of container pods may be deployed to the plurality of container nodes based on an initial characterization of a usage factor for each of the plurality of container pods. The method may also include monitoring an actual usage factor for each of the plurality of container pods after deployment to the plurality of container nodes, identifying one or more container pods among the plurality of container pods that deviate from the initial characterization of their usage factor, and redistributing the one or more container pods across the plurality of container nodes based on the actual usage factor.
[0005] In some embodiments, a non-transitory computer-readable medium including instructions that, when executed by one or more processors, cause the one or more processors to perform operations may include deploying a plurality of container pods to a plurality of container nodes in a container environment. The plurality of container pods may each include one or more services. The plurality of container nodes may each include one or more container pods. The plurality of container pods may be deployed to the plurality of container nodes based on an initial characterization of a usage factor for each of the plurality of container pods. The operations may also include monitoring an actual usage factor for each of the plurality of container pods after deployment to the plurality of container nodes, identifying one or more container pods among the plurality of container pods that deviate from the initial characterization of their usage factor, and redistributing the one or more container pods among the plurality of container nodes based on the actual usage factor.
[0006] In some embodiments, a system may include one or more processors and one or more memory devices. The one or more memory devices include instructions that, when executed by the one or more processors, cause the one or more processors to perform operations, which may include deploying a plurality of container pods to a plurality of container nodes in a container environment. Each of the plurality of container pods may include one or more services. Each of the plurality of container nodes may include one or more container pods. The plurality of container pods may be deployed to the plurality of container nodes based on an initial characterization of a usage factor for each of the plurality of container pods. The operations may also include monitoring an actual usage factor for each of the plurality of container pods after deployment to the plurality of container nodes, identifying one or more container pods among the plurality of container pods that deviate from the initial characterization of their usage factor, and redistributing the one or more container pods to the plurality of container nodes based on the actual usage factor.
[0007] Any embodiment may include any or all of the following features in any combination, without limitation: The usage factors may include a CPU usage factor; The usage factors may include a bandwidth usage factor; The usage factors may include a memory usage factor; The usage factors may include a maximum value of at least one of the usage factors; The usage factors may include an average value of at least one of the usage factors. The usage factor may include a rate of at least one of the usage factors. Redistributing the one or more container pods to the plurality of container nodes based on the actual usage factors may include distributing the one or more container pods using a weighted combination of the plurality of usage factors. The method / operations may also include determining that at least one of the actual usage factors of the first container pod exceeds a first threshold, and instantiating a clone of the first container pod on a different container node in response to determining that the at least one of the actual usage factors of the first container pod exceeds the first threshold. The clone of the first container pod may be warmed up, but request traffic need not be routed to the clone of the first container pod. The method / operations may also include determining that at least one of the actual usage factors of the first container pod exceeds a second threshold, and, in response to determining that at least one of the actual usage factors of the first container pod exceeds the second threshold, routing request traffic from the first container pod to a clone of the first container pod on a different container node. Exceeding the first threshold may indicate that the actual usage factor of the first container pod has a trajectory that exceeds an initial characterization of the usage factor of the first container pod. Exceeding the second threshold may indicate that the actual usage factor of the first container pod has a trajectory that may cause the actual usage factor of the container node including the first container pod to exceed a usage factor limit for the first container node. One or more container pods may be redistributed to multiple container nodes by a container platform scheduler. One or more container pods may be redistributed across multiple container nodes by an API registry, which may be deployed as a service encapsulated in a container in the container environment.The API registry may be available to services under development in an integrated development environment (IDE) and to services already deployed in a container environment. The API registry may map service endpoints of multiple container pods to one or more API functions.
[0008] A further understanding of the nature and advantages of the present invention may be realized by reference to the remaining portions of the specification and the drawings. Like reference numerals used in the several drawings indicate like components. In some instances, a subscript associated with the reference numeral indicates one of multiple like components. When referring to a reference numeral without indicating an existing subscript, it is intended to refer to all such multiple like components. [Brief explanation of the drawings]
[0009] [Figure 1] FIG. 1 illustrates the software architecture and logical configuration of a development and runtime environment for services in a container platform, according to some embodiments. [Figure 2] FIG. 1 illustrates a special purpose computer hardware system specifically designed for carrying out the embodiments described herein. [Figure 3] FIG. 2 illustrates a data organization that may be specific to a container platform used in some of the embodiments described herein. [Figure 4] FIG. 1 illustrates an API registry that can be deployed to an IDE and production / runtime environments, according to some embodiments. [Figure 5] FIG. 1 illustrates the deployment of an API registry for use with a container platform at runtime, according to some embodiments. [Figure 6A] FIG. 1 illustrates a flowchart of a method for deploying an API registry, according to some embodiments. [Figure 6B]FIG. 6B illustrates the software structure of a container platform when an API registry is deployed using the flowchart of FIG. 6A, according to some embodiments. [Figure 7A] FIG. 1 illustrates a flowchart of a method for registering a service in an API registry, according to some embodiments. [Figure 7B] 1 illustrates a hardware / software diagram of the steps for registering an API in an API registry, according to some embodiments. [Figure 8] 1A-1C illustrate examples of graphical and command line interfaces for browsing and selecting APIs registered in an API registry, according to some embodiments. [Figure 9] FIG. 2 illustrates a flowchart of a method for using a service registered in an API registry and its corresponding function, according to some embodiments. [Figure 10] FIG. 10 illustrates how the API Registry can receive selection of the CreateUser( ) function via a graphical interface. [Figure 11] FIG. 1 illustrates an example of a client library that an API registry automatically generates for a service, according to some embodiments. [Figure 12] FIG. 1 illustrates an embodiment of a client library that includes dynamic bindings between service endpoints and API functions, according to some embodiments. [Figure 13] FIG. 1 illustrates an embodiment of a client library into which additional data can be placed to complete the input data set for a service call, according to some embodiments. [Figure 14] FIG. 1 illustrates a client library capable of handling retries when calling a service, according to some embodiments. [Figure 15A] FIG. 1 illustrates a method for providing API properties to an API registry, according to some embodiments. [Figure 15B]1 illustrates a hardware / software diagram of how a service can contribute API properties to an API registry, according to some embodiments. [Figure 16] 1 illustrates a hardware / software diagram of an API registry using properties to deploy highly available services, according to some embodiments. [Figure 17] 1 illustrates a hardware / software diagram of a property that implements end-to-end encryption through an API registry, according to some embodiments. [Figure 18] FIG. 18 illustrates properties for an API registry to implement usage logging for a service 1808, according to some embodiments. [Figure 19] 1 illustrates a hardware / software diagram of a property capable of implementing an authentication protocol for a service, according to some embodiments. [Figure 20] 1 illustrates a hardware / software diagram of properties that enable runtime instantiation of services, according to some embodiments. [Figure 21] 1 illustrates a hardware / software diagram of a property that implements a rate limiting function for a service, according to some embodiments. [Figure 22] FIG. 1 illustrates a functional diagram of an initial deployment of multiple pods to multiple container nodes, according to some embodiments. [Figure 23] FIG. 10 is a graph of CPU usage over time. [Figure 24] A diagram depicting pod redeployment based on actual usage is shown. [Figure 25] FIG. 10 illustrates how multiple usage characteristics can be balanced simultaneously within a container node. [Figure 26] FIG. 1 illustrates the deployment of a pod after an initial deployment, according to some embodiments. [Figure 27] FIG. 10 illustrates a graph of CPU usage over time, according to some embodiments. [Figure 28] 28 illustrates a diagram of the pod instantiation process described in FIG. 27 according to some embodiments. [Figure 29] 1 illustrates a diagram of pod instantiation and usage, according to some embodiments. [Figure 30] FIG. 1 illustrates a flowchart of a method for dynamically rebalancing services in a container platform, according to some embodiments. [Figure 31] 1 shows a simplified block diagram of a distributed system for implementing some of the embodiments. [Figure 32] FIG. 1 shows a simplified block diagram of components of a system environment in which services provided by components of a system of an embodiment can be provided as cloud services. [Figure 33] FIG. 1 illustrates an exemplary computer system upon which various embodiments may be implemented. DETAILED DESCRIPTION OF THE INVENTION
[0010] Detailed Description Embodiments of an application programming interface (API) registry that is part of an integrated development environment (IDE) are described that allows developers to register services during development and makes these services available to other services both during and after deployment. The API registry can be deployed as part of an orchestrated container platform that runs as a containerized application on the container platform. When a service or microservice is developed and deployed to a container on the container platform, the API registry can perform a discovery process to locate available endpoints (e.g., IP addresses and port numbers) within the container platform that correspond to the available services. The API registry can also accept uploads of API definition files that can be used to turn raw service endpoints into API functions that are made available through the API registry. The API registry can dynamically bind discovered endpoints to API functions that are kept up to date and made available to other services within the container platform. This provides stable endpoints that other services can statically call while the API registry manages any changes to the bindings between API functions and service endpoints. This also simplifies the process of using services within the container platform. Instead of writing code for HTTP calls, new services can access registered services simply by using the API interface.
[0011] In some embodiments, the IDE may provide a navigation / browse interface for developers to locate services available within the container platform and registered with an API registry. For new services under development, when the API registry makes calls to existing services, the API registry may automatically generate a set of client libraries that contain all the functionality required to interact with the registered service. For example, some embodiments may generate object classes that contain member functions corresponding to the API calls. During development, the new service can simply instantiate these objects and / or use their member functions to call the corresponding API. The code in the client library may govern the direct connection between the calling service and the registered service's endpoint and handle all the functionality required for this interaction. For example, an automatically generated client library may include code for packaging and formatting parameters from an API call into an HTTP call to the service endpoint, code for arranging data to complete the parameter set for the call, code for packaging information into a compatible packet (e.g., JSON, XML), code for receiving and parsing the result packet, code for retries and It may include code to handle routines, callbacks, and error conditions. From the perspective of the calling service, the code to handle all of this functionality is automatically generated by the API Registry, thus abstracting and encapsulating the details of the service call into a Client Library Object. All the calling service is required to do is execute member functions of the Client Library Object created by the API Registry.
[0012] In some embodiments, the API registry can also accept the upload of a set of properties that may define the runtime execution of a registered service. This set of properties can be uploaded along with the API definition file during development. These properties can define runtime characteristics such as end-to-end encryption, usage / logging requirements, user authentication, on-demand service instantiation, multiple service deployment instances for high availability, rate / usage limits, and other runtime features. The API registry can ensure that these properties are met by interacting with the container environment during development, deployment, and runtime. During development, automatically generated client libraries for calling services can include code that may be required to implement these properties, such as encryption code, usage logging code, and / or interaction with user authentication services. When a registered service is deployed, the API registry can instruct the container platform to ensure high reliability of the service during runtime by instantiating multiple instances of the service and / or additional load balancing modules. When the service is called during runtime, the API registry can instantiate the service for on-demand instantiation, limit the number of API calls that can be made to throttle usage, and perform other runtime functions.
[0013] FIG. 1 illustrates the software architecture and logical configuration of a development and runtime environment for services in a container platform, according to some embodiments. This environment may include an IDE 102 that can be used to develop services and microservices to be deployed on the container platform. The IDE is a software suite that integrates and provides all of the basic tools a service developer can use to write and test new services. The IDE 102 may include a source code editor 106 with a graphical user interface (GUI), code completion capabilities, and a navigate / browse interface that allow developers to write, navigate, integrate, and visualize the source code writing process. The IDE 102 may also include a debugger 110 that includes a mutability interface, an instant mutability interface, an expression evaluation interface, a memory content interface, breakpoint visualization and capabilities, and other debugging functions. The IDE 102 may also include a compiler and / or interpreter 108 for compiling machine code and executing compiled machine code or interpreted bytecode. The compiler / interpreter 108 allows developers to use / generate makefiles for different build automation configurations. Some embodiments of the IDE 102 may include a code library 112. A code library contains common code functions, objects, interfaces, and / or other structures that can be linked to a service under development and reused across multiple deployments.
[0014] Services can be developed within the IDE 102 and thoroughly tested until they are ready for deployment. The services can then be deployed to a production / deployment environment 104. The production / deployment environment 104 can include many different hardware and / or software configurations, including dedicated hardware, virtual machines, and containerized platforms. Prior to this disclosure, As a result, when the service 114 is deployed to the production / deployment environment 104, the service 114 does not have runtime access to many of the tools used in the IDE 102. Any functionality required for the service 114 to run in the production / deployment environment 104 would have to be packaged from the code library 112 and deployed along with the service 114 to the production / deployment environment 104. In addition, the service 114 is typically deployed without either the functionality of the debugger 110 or a copy of the source code from the source code editor 106. In effect, the service 114 is deployed to the production / deployment environment 104 with all of the functionality required for runtime operation, but stripped of information used only during development.
[0015] 2 illustrates a special-purpose computer hardware system specifically designed for carrying out the embodiments described herein. As an example, the service 114 may be an Infrastructure as a Service (IaaS) cloud computing service. The IaaS cloud computing environment 202 may be deployed in a cloud computing environment 202, which is a form of cloud computing that provides virtualized or shared computing resources over a network. The IaaS cloud computing environment 202 may also be deployed in a Software as a Service (SaaS) and / or Platform as a Service (PAS) environment. Others configured as Platform as a Service (PaaS) architecture The IaaS environment 202 may include or be coupled to a cloud computing environment, such as a cloud service provider (ISP) or a cloud service provider (SLA). In this environment, a cloud provider can host an infrastructure of hardware and / or software components that traditionally reside in an on-premises data center. This hardware may include servers, storage, networking hardware, disk arrays, software libraries, and virtualization utilities such as a hypervisor layer. The IaaS environment 202 may be provided by a commercial source such as Oracle® or other publicly available cloud platforms. The IaaS environment 202 may also be deployed as a private cloud using a private infrastructure of hardware and software.
[0016] Regardless of the type of cloud environment, the service 114 can be deployed on multiple types of hardware / software systems. For example, the service 114 can be deployed on dedicated hardware 206. The dedicated hardware 206 can include hardware resources such as servers, disks, operating systems, software packages, etc. that are specifically assigned to the service 114. For example, a specific server may be assigned to handle traffic flowing to and from the server 114.
[0017] In another example, the service 114 can be deployed on hardware / software that operates as one or more virtual machines 208. A virtual machine is an emulation of a computer system that provides the functionality of dedicated computer hardware 206. However, instead of being dedicated to a specific function, the physical hardware can be shared by multiple different virtual machines. Each virtual machine can provide all the functionality it needs to perform, including a complete operating system. This allows multiple virtual machines with different operating systems to run on the same physical hardware, allowing multiple services to share one piece of hardware.
[0018] In another example, the service 114 can be deployed on a container platform 210. A container platform differs from a virtual machine 208 in several important respects. First, as described in more detail below in FIG. 3, the container platform 210 The Open Container Platform (OCI) packages individual services into containers. Each container shares the host operating system kernel, as well as binaries, libraries, and other read-only components. This allows containers to be extremely lightweight, often only a few megabytes in size. Additionally, lightweight containers are highly efficient, taking only a few seconds to start up, compared to the minutes it takes a virtual machine to boot up. Containers also reduce management overhead by sharing an operating system and other libraries that can be managed together for a set of containers within the container platform 210. Although containers share the same operating system, the operating system provides virtual memory support for isolation, providing an isolated platform. Container technologies include Docker® Containers, Linux® Libcontainer®, Open Container Initiative (OCI), Kubernetes®, Coe The containers may include, among other things, an operating system (OS), Apache Mesos, and the like. These containers may be deployed on a container orchestration platform, sometimes referred to herein simply as "container platform 210." The container platform maintains automated configuration, orchestration, and management of the deployed software containers. Container platform 210 may provide service discovery, load balancing, health checks, multi-deployment, and the like. Container platform 210 may be realized by a commonly available container platform, such as Kubernetes, which runs containers organized into nodes and pods.
[0019] Regardless of the platform 206, 208, 210 on which the service 114 is deployed, the platform 206, 208, 210 can each provide service endpoints 212, 214, 216 that provide public access for calling the service 114. Generally, these endpoints are accessible through HTTP calls, and they are associated with an IP address and port number. By connecting to the correct IP address and port number, other services can call services deployed on any of the platforms 206, 208, 210 when they are made publicly available. Each service, such as service 114, may have its own proprietary format and data requirements for calling the service. Similarly, each service may return results whose format and data type are specific to that service 114. In addition to service-specific requirements, a particular deployment platform 206, 208, 210 may also have additional requirements for interacting with the service 114, such as programming languages, package formats (e.g., JSON, XML), etc., that must be conformed to in order to properly interact with the service.
[0020] While the above examples allow for the service 114 to be deployed on any of the above platforms 206, 208, 210, the embodiments described herein are specifically designed for the above container platform 210. Thus, embodiments specifically described as being deployed on a "container platform" can be distinguished from embodiments specifically described as being deployed on a virtual machine platform, on a server or dedicated hardware platform, or generally in an IaaS environment.
[0021] 3 illustrates a data organization that may be specific to a container platform 210 used by some of the embodiments described herein. Generally, any deployment of a service to a container platform is deployed in a pod 304, 306. A pod is a group of one or more application containers (e.g., Docker or rkt). A pod is an abstraction that represents a loop. A pod may also contain some shared resources that are available to all containers in the pod. For example, pod 304 contains container 310 and container 312. Pod 304 also contains shared resource 308. This Resources may include storage volumes or other information regarding how containers run or are connected within pod 304. Pod 304 may model an application-specific logical host that includes different, relatively tightly coupled service containers 310, 312. For example, service 326 in container 310 may utilize resource 308 and call service 320 in container 312. Service 320 may also call service 322, which may also call service 324, each of which is deployed in container 312. The output of service 324 may provide a network IP address and port 318, which is another common resource shared by pod 304. In this way, services 320, 322, 324, and 326 all cooperate with shared resource 308 to provide a single service that services running in other containers can access by IP address and port number 318. The service can also be accessed via IP address port 318 by computer systems outside the container platform, such as workstations, laptop computers, smartphones or other computing devices that are not part of the container platform or IaaS environment.
[0022] In the simplest deployment, each container can contain one service, and each pod can contain one container that encapsulates the service. For example, a pod 306 contains only one container 314 with only one service 328. This one service is accessible through the pod's 306 IP address and port number 316. Typically, when a service is deployed to a container platform, a container and a pod are instantiated to hold the service. Multiple different pods can be deployed to a container node 302. Pods generally run within nodes. Nodes represent worker machines (either virtual or physical) within the container platform. Each node is managed by a "master," which automatically handles scheduling pods within each node. Each node can run processes that handle communication between the master and the node and manage pods within the containers on the machine represented by the node. Each node can also include a container runtime, which is responsible for pulling container images from a registry, unpacking containers, and running services.
[0023] FIG. 4 illustrates an API registry 404 that can be deployed to the IDE 102 and the production / deployment environment 104, according to some embodiments. As mentioned above, when a service 114 is deployed from the IDE 102 to the production / deployment environment 104, a technical challenge exists: the service 114 loses runtime access to information that is exclusively available within the IDE 102. The API registry 404 is accessible to the service 114 while it is deployed to the production / deployment environment 104 and operating during runtime in this environment. The API registry 404 overcomes the previous technical challenge of separating development functions from runtime functions by allowing services to register with the API registry 404 during development and provide API definitions and / or API properties to the API registry 404. The information defining the API is available to new services under development within the IDE 102 and to services already deployed to the production / deployment environment 104. After this registration process is complete, the service 114 can operate using a client library that accesses the API registry 404 during runtime to ensure that API functions are properly bound to the current IP address and port number of the corresponding service. The API registry 404 represents a new data structure and processing unit specifically designed to solve these technical challenges.
[0024] Another technical issue that existed in this technology was that service properties were The realization of service properties when deployed to the production / deployment environment 104 was key. For example, if a service is to be deployed with high availability, a developer must construct a container deployment file that specifically instantiates multiple instances of the service within a container platform and balances traffic so that the service is always available. Service developers do not always have this expertise, and often do not have control over the deployment of their services. As mentioned above, the API registry 404 allows a service to simply select properties, such as high availability, which the API registry 404 can automatically achieve. This technical solution is possible because the API registry 404 bridges the gap between the IDE 102 and the production / deployment environment 104.
[0025] FIG. 5 illustrates the deployment of an API registry 404 used with the container platform 210 at runtime, according to some embodiments. One of the technical solutions and improvements over existing technologies that the API registry 404 provides is maintaining stable endpoints for service calls and simplifying and automatically generating code for accessing the service calls. Prior to this disclosure, calls between services were point-to-point connections using, for example, HTTP calls to an IP address and port number. IP addresses and port numbers could frequently change when services were updated, replaced, relocated, and redeployed to the container platform 210. In this case, all services that called the updated service had to update the IP address and port number in the actual code that called the service. The API registry 404 solves this technical problem by providing dynamic binding between the IP address and port number of a service and the API functions made available through the API registry. The client libraries that the API registry 404 automatically generates may include functions that access the API registry 404 to retrieve and / or verify the current IP address and port number of a particular service. Thus, a first service connecting to a second service only needs to generate a client library once to provide a stable, lifetime connection to the second service.
[0026] Another technical problem solved by API registry 404 is the automatic generation of client libraries. Prior to this disclosure, a first service accessing a second service required a developer to write custom code to access the second service. This code could change over time, resulting in incompatibilities between the first and second services, both of which required updates. API registry 404 solves this technical problem by allowing users to upload API definition files that are used to automatically generate client libraries for calling services. Thus, a service can specifically specify how the calling code in any other service should behave, ensuring compatibility. These client libraries also greatly simplify and encapsulate the code for calling services. As described below, complex HTTP calls using IP addresses and port numbers can be replaced with simple member functions in a language (e.g., Java, C#, etc.) specific to the calling service. This allows a calling service to select an API function from API registry 404, and the code implementing the function can be downloaded by the calling service as a client library.
[0027] 6A illustrates a flowchart of a method for deploying an API registry 404, according to some embodiments. The method may include deploying 601 an API registry service to a container environment. The API registry is deployed in the container environment. The API registry can be implemented as a service running within the container platform. Thus, the API registry can be actively executed after the services are deployed in the container environment so that it can be accessed at runtime. The API registry can also be linked to the existing IDE. The method can further include discovering ports for available services within the container platform (603). Once the services are deployed to the container platform, the API registry can initiate a discovery process that sequentially traverses each service deployed to the container platform. For each service, the API registry can discover and record its IP address and port number. The list of IP addresses and port numbers discovered by this process can be stored in a data structure, such as a table, associated with the API registry. Each IP address and port number can also be stored along with the service's name or other identifier that uniquely identifies the service on the container platform. These initial steps, illustrated in the flowchart of FIG. 6A, provide a starting point for the API registry to begin operating within the container platform's runtime environment and to make the API registry available to services being developed within the IDE.
[0028] FIG. 6B illustrates the software architecture of the container platform 210 when deploying an API registry using the flowchart of FIG. 6A, according to some embodiments. As previously described, the API registry 404 can be deployed in a container 620 within the container platform 210. As previously described in FIG. 3, the container 620 can run within one or more pods on a node. The API registry 404 can be made privately available to any of the other containers within the container platform 210. In some embodiments, the API registry 404 can also be made publicly available to other devices that are not part of the container platform 210. As a containerized service, the API registry 404 can have an IP address and port number that other services can use. However, because the IP address and port number of the API registry 404 are used only by code automatically generated by the client library, some embodiments do not need to expose the IP address and port number of the API registry 404. Instead, the IDE's own client library can maintain an up-to-date list of the IP addresses and port numbers of the API registry 404 so that it can contact other services during development, deployment, and execution.
[0029] After being deployed to the container 620, the API registry 404 can perform a discovery process. The discovery process can identify pods implementing services by IP address and port number using a directory listing of nodes in the container platform. The API registry 404 can then access a unique identifier, such as a number or name, for each available service and store the identifier along with each IP address and port number in the container platform 210. This discovery process can be performed periodically to detect new services added to the container platform 210 and to identify existing services removed from the container platform 210. As described below, the discovery process can also be used to detect when the IP addresses and port numbers of existing services change. For example, the API registry 404 can discover services with endpoints 602, 604, 606, and 608. In the process described below, the API registry 404 can bind each of these endpoints 602, 604, 606, and 608 to API functions registered with the API registry 404. At some point after this initial discovery, the IP address and / or port number of endpoint 602 is discovered by 2 is replaced, updated, or revised. The API registry 404 can detect changes to this endpoint 602 and update the bindings to existing API functions that it provides.
[0030] Similarly, API registry 404 can use a discovery process to detect when an endpoint becomes unavailable and subsequently remove the API function associated with the service. In some embodiments, when a service is registered with API registry 404 but the corresponding API function is not currently bound to a valid endpoint, API registry 404 can provide a mock response to any service calling the corresponding API function. For example, if an API is registered for a service corresponding to endpoint 604, but endpoint 604 is currently unavailable, API registry 404 can intercept calls to endpoint 604 and provide default or dummy data accordingly. This allows services calling the service associated with endpoint 604 to maintain functionality and / or continue the design process without "breaking" their connection to this particular service. Mock / test data scenarios are described in more detail below.
[0031] 7A shows a flowchart of a method for registering a service with API registry 404, according to some embodiments. The method may include receiving an upload of an API definition (701). The API definition may be provided in the form of a data packet, a file, or a link to an information repository. The API definition may include any information that can be used to identify and define API functions to be bound to endpoints associated with the service. For example, some embodiments of an API definition may include the following data: a service name or other unique identifier; a function name corresponding to the service endpoint and call; data inputs required to call the service with corresponding descriptions and data types; result data formats and data types; a current IP address and / or port number; documentation describing the functionality of the API functions to be associated with the endpoint; default or dummy data values to return during mock / test scenarios; and any other information that API registry 404 may use to translate HTTP requests received by the endpoint into client libraries that use API function calls of class data objects.
[0032] The method may also include creating corresponding API functions based on the uploaded API definition (703). These API functions may be automatically generated based on the API definition. Each endpoint of a service may correspond to multiple different API functions. For example, an endpoint implementing a RESTful interface may receive HTTP calls for POST, GET, PUT, and DELETE functions on the same IP address and port number, which may result in, for example, different API functions. For example, if the interface represents a list of users, this may correspond to at least four different API functions, such as GetUser( ), AddUser( ), RemoveUser( ), and UpdateUser( ). In addition, each API function may have a unique identifier, such as UpdateUser(id), UpdateUser(name), UpdateUser(firstname, lastname), etc. These API functions may contain multiple different parameter lists. These API functions may be generated and made available to other services via an API registry. Note that, as explained in more detail below, services are not required to call these functions via the API registry. Instead, these functions are made available for browsing in the API registry, and when selected, the API registry creates a client library that implements these functions in the calling service. You can generate a library.
[0033] The method may further include creating, in an API registry, bindings between the API functions and the corresponding service endpoints (705). Based on the discovery process and the registration process of step 701, the API registry can create dynamic bindings between the service endpoints in the container platform and the API functions created by the API registry. In the data structure created when discovering available endpoints and services, the API registry can store the corresponding function or set of functions for each endpoint. As described above, this binding can be updated whenever the discovery process determines that a service is updated, moved, replaced, or added to the container platform. This allows a client library created in a calling service to verify or receive the service's current IP address and port number by first consulting the API registry.
[0034] FIG. 7B shows a hardware / software diagram of the steps for registering an API with the API registry 404, according to some embodiments. As described above, the API registry 404 can be instantiated and run within a container 620 in the container platform 210. While the container platform 210 represents a production / deployment environment, the API registry 404 can still be accessed by the IDE 102 used to develop services. Thus, the IDE 102 can provide a mechanism for uploading an API definition file 702 to the API registry 404. Specifically, the user interface of the IDE 102 can include a window or interface that allows a developer to define and / or populate fields in the API definition file 702. This information, as described above, can include function names, parameter lists, data types, field lengths, object class definitions, IP addresses and port numbers, service names or other unique identifiers, etc. This information can be uploaded to the API registry 404 and linked to specific IP addresses and port numbers of the endpoints 602 via dynamic binding. Finally, the API registry 404 can generate one or more API functions 704 that can be made available via the API registry 404 .
[0035] After a service is registered with API registry 404 and one or more API functions are generated, the API registry can make these functions available to developers when designing the service. Figure 8 shows an example of a graphical interface 802 and a command line interface 804 for browsing and selecting APIs registered with API registry 404, according to some embodiments. When programming and developing new services for the container platform, developers can browse and select API functions available for their services by accessing graphical interface 802. This graphical interface 802 is merely an example and is not intended to limit the types of graphical interfaces that can be used to browse and select API functions.
[0036] In this embodiment, the IDE 102 can instruct the graphical interface 802 to provide a list of APIs registered in the API registry. In this embodiment, the APIs are categorized based on endpoints. For example, one endpoint corresponding to a service may provide a RESTful interface for storing user records (e.g., "UserStorage"). The interface 802 displays all API functions available through the selected endpoint. A number (e.g., "CreateUser," "DeleteUser," "UpdateUser," etc.) may be displayed. Other embodiments may group functions based on the overall service if the service provides multiple endpoints. The graphical interface 802 may receive a selection of one or more API functions to be used by the calling service. The API registry may then provide documentation showing how to use the API functions, including required parameters and return values. Those skilled in the art will appreciate that the command line interface 804 may provide similar information and accept similar input as the graphical interface 802.
[0037] The interfaces 802, 804 shown in FIG. 8 provide several technical advantages. First, these interfaces 802, 804 provide an up-to-date listing of all APIs registered in the API registry, which corresponds to a list of all services currently available on the container platform. Rather than being required to look up documentation, contact service developers, and / or perform other inefficient tasks to locate a list of available services, service developers can retrieve and display this information in real time. Additionally, as services are updated, the API definition files can be updated in a corresponding manner, which in turn updates the display shown in FIG. 8 to provide up-to-date availability information for each API function.
[0038] FIG. 9 shows a flowchart of a method for using services and their corresponding functions registered in an API registry, according to some embodiments. The method may include providing a list of registered APIs (901). This step may be omitted if the desired service is already known. However, in general, the services can be displayed for browsing and navigation using the interface of FIG. 8 described above. The method may also include receiving a selection of API functions (903). This selection may be received by the API registry from the developer of the service. For example, the developer may select a function to update the database of user records using the CreateUser( ) function described above. Figure 10 shows how the API Registry determines the CreateUser() function. It is shown that the selection 1002 can be received via the graphical interface 802. Other embodiments can receive this selection via a command line interface or other input method provided by the IDE.
[0039] Referring again to FIG. 9 , upon receiving the selection of the API functions, the API registry can generate one or more client libraries for the calling service (905). Generating the client libraries can provide the calling service with service endpoints that are dynamically bound to the API functions. Specifically, the IDE can generate a set of class objects in the IDE that encapsulate the functionality necessary to directly interface with the service endpoints in the container platform. In some embodiments, the client libraries can include object classes that can be instantiated or used to call member functions that implement the code necessary to communicate with the service. Examples of these client libraries are described in more detail below.
[0040] The method may further include providing test data (907). A service does not need to be complete when registered with the API registry. Instead, the service may indicate to the API registry that it is not yet ready to provide functional responses to calling services. In some embodiments, the API definition file uploaded to the API registry may include a specification of the type of information that the service must return before it is functional. When a calling service calls an API function, ,API registry-generated client libraries can route requests to the API registry instead of the service endpoint, which can then provide a response with a dummy, null, or default value. Alternatively, code within the client library itself may generate default data to be returned to the calling service.
[0041] It should be understood that the specific steps illustrated in Figure 9 provide particular methods of using an API registry according to various embodiments of the present invention. Other sequences of steps may be performed according to alternative embodiments. For example, alternative embodiments of the present invention may perform the steps outlined above in a different order. In addition, individual steps illustrated in Figure 9 may include multiple sub-steps that may be performed in various sequences as appropriate for the individual step. Furthermore, other steps may be added or removed depending on the particular application. Those skilled in the art will recognize numerous variations, modifications, and alternatives.
[0042] FIG. 11 illustrates an example of a client library automatically generated by an API registry for a service, according to some embodiments. This client library 1102 may correspond to a service that stores user records. This client library 1102 and corresponding classes and services are provided for illustrative purposes only and are not intended to be limiting. As previously mentioned, each API function and service can specify how the client library should be generated by an API definition file uploaded to the API registry. Thus, the principles described below with respect to the "User" service may also apply to other services.
[0043] To represent the User service, the API registry can generate a User class. When a calling service requests that the API registry generate a client library, the calling service can specify the programming language the calling service is using. For example, if the calling service is written in Java in an IDE, the API registry can generate a class library in the Java programming language. Alternatively, if the calling service is written in C#, the API registry can generate a class library in the C# programming language. The User class can be generated to have member functions that correspond to the different operations that can be performed through the service endpoint. These member functions can be static member functions, thereby eliminating the need for an instantiated instance of the User class, or they may be used with an instantiated User object.
[0044] In this example, the User service can edit individual user records stored by the service by using a RESTful interface. For example, the API registry can create a CreateUser() function to allow the User service to edit the records. One of the functions that a class library can perform is to parse, filter, and format data provided as parameters to API functions that are sent as data packets directly to the service. In this example, the CreateUser() function is called for the convenience of the calling service. For example, the calling service might accept parameters formatted to match the user's first name and last name as separate strings. However, a POST command may require a concatenated string of first name and last name. To accept a user-friendly set of parameters, the client library 1102 can perform a set of operations to format the data received as parameters to a function into a format compatible with the service endpoint. This includes generating header information, formatting specific data fields, and This may include modifying the format, concatenating data fields, requesting additional data from other sources, performing calculations or data transformations, etc. This may also include packaging the reformatted parameters into formats such as JSON, XML, etc.
[0045] The client library 1102 can also handle POST calls to the service once the parameters are properly formatted in the package for the service endpoint. When the client library is generated, it inserts the IP address and port number of the service into the CreateUser( ) function used in the HTTP request to the service. The details of the HTTP request are encapsulated in the CreateUser( ) function. If a developer for a calling service wants to use the POST function made available by the service, instead of writing the code into the library 1102 themselves, they can select the User service from the API registry. The API registry then automatically generates a client library 1102 that contains a User class. Then, to use the POST function, the service developer can add the user John Smith to the service simply by using the User.CreateUser("John", "Smith", 2112) function.
[0046] 12 illustrates an embodiment of a client library 1202 that includes dynamic binding between service endpoints and API functions, according to some embodiments. In this example, when the API registry creates the client library 1202, the CreateUser( ) function includes code 120 that dynamically retrieves the IP address and port number of the service. 4. The calling service 114 can send a request to the API registry 404 at runtime by using the GetIPPort( ) function when the calling service 114 is running in a production / deployment environment 104, such as a container platform. The API registry 404 can access its internal table, which is constantly updated to maintain the latest bindings between API functions and service endpoints. The API registry 404 can then return the current IP address and port number to the calling service 114. The client library 1202 can then insert the IP address and port number into the HTTP POST code that connects to the service. Because the API registry 404 is accessible at runtime by any calling service in the container platform, no updates or patches are required for any of these services when the IP address for the port number of the service being called changes. Instead, the API registry 404 can provide the latest information each time the service is called. In some embodiments, the GetIPPort( ) function may only call the API registry 404 once an hour, once a day, once a week, etc., minimizing the number of function calls made outside the container for the service 114, assuming that service endpoints do not change frequently in a production environment.
[0047] FIG. 13 illustrates an embodiment of a client library 1302 that can locate additional data to complete the input data set for a service call, according to some embodiments. For simplicity with client library 1302, client library 1302 can minimize the number of parameters required from the service developer. Additional data that may be required to make the service call can be retrieved from other sources and therefore may be omitted from the parameter list. Alternatively, these additional parameters may be retrieved directly by client library 1302 from these other sources. For example, creating a new user may include specifying a user role for this user. Instead of requiring the service developer to provide the user role as one of the parameters, client library 1302 may retrieve the user's role from any other source. The service may include code 1304 that automatically retrieves the user roles. In this example, the user roles may be retrieved from a database, from another service in the container platform, or from another class that stores user roles in the calling service. In any of these cases, code 1304 may automatically retrieve the user roles and package them as part of the input data for the HTTP POST command sent to the service.
[0048] In addition to preparing and formatting data for input to the service, client library 1302 can parse and return data received from the service and handle error conditions. In this example, a POST command can return a data packet in a Result variable. Often, a service can return a data packet that contains more information than the calling service requires. Therefore, client library 1302 can parse the data fields in the Result variable, extract the data from the Result variable, and format and package it into a more usable format expected by the user class. In this example, code 1306 can extract and use fields from the Result variable to create a new User object to be returned from an API function. In another example using a GET command, individual API functions can be created in a User class that extract different fields from the Result variable from the GET command. For example, the User class can provide a GetFirstName(id) function, a GetLastName(id) function, a GetRole(id) function, etc. Each of these functions can contain very similar code while returning different fields from the Result variable.
[0049] In addition to parsing the results, the client library 1302 can also generate code 1308 to handle error conditions associated with the use of the service. In this example, the code 1308 can determine whether the POST command was successful by testing the status field in the Result variable. If the command was successful, the CreateUser( ) function creates a new User object. If the Post command fails, the function can return a null object instead and / or retry the call to the service.
[0050] Figure 14 illustrates a client library 1402 that can handle retries when calling a service, according to some embodiments. Similar to the example of Figure 13, the client library 1402 determines whether the call was successful by using the status in the Result variable populated by the POST HTTP call. While the result is unsuccessful, the client library 1402 can continue to retry until the call is successful. Some embodiments can limit the number of retries or add a wait time between retries by using a counter or other mechanism.
[0051] As mentioned above, some embodiments may also provide a set of API properties to an API registry along with the API definition. FIG. 15A illustrates a method for providing API properties to an API registry, according to some embodiments. The method may also include receiving an upload of the API definition (1501). The method may also include receiving an upload of the API properties (1503). The upload of the properties may be part of the same submission as the upload of the API definition. In some embodiments, the API properties may be part of the API definition. In some embodiments, the API properties may be one or more flags or predefined data fields that are checked to indicate that the properties should be set by the API registry. In some embodiments, the API properties may be part of some pre-built field. They do not have to follow any format, but can instead be expressed as instruction codes that allow the API registry to implement features described below such as authentication, encryption, etc. API properties can be stored with the API definition for each service.
[0052] The method may further include creating an API binding between the service and the API (1505). This operation may be performed as detailed above. In addition, the method may include using the API properties to perform one or more operations associated with the service (1507). The API properties may be used at various phases during the lifecycle of the service. Generally, this can be described as using the API properties to implement the functions associated with the properties during deployment of the service, when generating a client library for the service, and / or when calling the service. Examples of each of these functions are described in more detail below.
[0053] It should be understood that the specific steps illustrated in FIG. 15A provide a particular method for providing API properties to an API registry according to various embodiments of the present invention. Other sequences of steps may be performed according to alternative embodiments. For example, alternative embodiments of the present invention may perform the steps outlined above in a different order. In addition, individual steps illustrated in FIG. 15A may include multiple sub-steps that may be performed in various sequences as appropriate for the individual step. Furthermore, other steps may be added or removed depending on the particular application. Those skilled in the art will recognize numerous variations, modifications, and alternatives.
[0054] 15B shows a hardware / software diagram of how a service can contribute API properties to an API registry, according to some embodiments. When developing a service in IDE 102, a service developer can contribute an API definition file 1502 and one or more properties 1504 to API registry 404. Because API registry 404 is accessible at runtime by both IDE 102 and the container platform, API registry 404 can store properties 1504 and use these properties to affect how the service is deployed, called, and / or used to generate client libraries, both during development and runtime scenarios.
[0055] FIG. 16 illustrates a hardware / software diagram of an API registry using properties to deploy highly available services, according to some embodiments. In addition to the API definition file 1505 for a particular service, the API registry 404 may receive a property 1602 indicating that the service should be deployed with high resilience or high availability. This property 1602 may be received as a set of instructions that the API registry 404 executes to deploy the service with high availability. This option allows the developer to define what it means for the service to be “highly available.” For example, the property 1602 may include instructions that cause the API registry 404 to deploy multiple instances 602, 604 of the service to the container platform 210. By executing these instructions, the API registry 404 does not have to make any decisions or judgments itself, but instead simply executes the deployment code provided as part of the property 1602.
[0056] The property 1602 can also be received as a flag or setting that indicates to the API registry 404 the option to execute existing instructions in the API registry 404 to deploy a highly available service. In this option, the API registry 404 does not need to receive any code to execute as the property 1602. The API registry 404 is aware of the high availability property 1602 and can deploy multiple instances 602, 604 of a service by executing code maintained in the API registry 404. This allows the API registry 404 to define what it means to be "highly available" for the deployment of any service registered in the API registry 404.
[0057] Because the API registry 404 is connected to the runtime environment of the container platform 210, the API registry 404 can interact with the container platform 210 to deploy instances 602, 604 that determine the runtime availability of the service. Note that the two instances 602, 604 of the service shown in Figure 16 are given by way of example only and are not intended to be limiting. A highly available service may include three or more redundant instances of a service deployed on the container platform.
[0058] Some embodiments may include code in API registry 404 that can be executed as a default. If property 1602 contains only a simple indication that high availability is desired, API registry 404 can execute its own code. If property 1602 contains deployment code for deploying the service, API registry 404 can execute the code in property 1602 instead. In some cases, property 1602 may contain only a portion of the code necessary to deploy a highly available service. API registry 404 can execute the portion of code provided by property 1602 and then execute any code not provided by property 1602 using the code in API registry 404. This allows developers to override existing definitions in API registry 404 for how to implement properties such as high availability, while still allowing API registry 404 to provide a uniform definition for implementing properties that can be used by registered services.
[0059] In some embodiments, the high availability property may also cause the container platform 210 to deploy a load balancing service 606 that distributes requests across multiple instances of the service 602, 604. An endpoint for the load balancing service 606 may be registered with the API registry 404 and made available to other services. Alternatively or additionally, each of the multiple instances of the service 602, 604 may be registered with the API registry 404 as a service endpoint.
[0060] In each of the examples described below, the same principles as those described with respect to FIG. 16 can be applied. For example, any of the properties below may be accompanied by code that can be received by API registry 404 and used to override code that API registry 404 would otherwise execute. Prior to this disclosure, there was no way to create a unified default for executing properties while at the same time allowing service developers to override these properties as needed. Thus, API registry 404 overcomes this technical challenge by allowing API registry 404 to execute code by default, while also allowing this code to be overridden by a property 1602 received from a developer.
[0061] 17 shows a hardware / software diagram of a property implementing end-to-end encryption through an API registry, according to some embodiments. The API registry 404 receives a property 1704 that indicates or includes code that causes end-to-end encryption to call a service 1708, along with an API definition file 1505. During development, service 1708 may include its own decryption / encryption code 1710 that decrypts packets received by service 1708 and encrypts packets returned by service 1708. Prior to this disclosure, developers had to provide specifications indicating that users of service 1708 must provide encryption compatible with service 1708. This embodiment solves the technical problem by allowing service 1708 to specify how client libraries are generated in calling services 1706, ensuring compatibility with service 1708's encryption.
[0062] In some embodiments, a developer of a service 1708 does not need to include encryption / decryption code 1710 with the service 1708. Instead, properties 1704 simply instruct API registry 404 to implement end-to-end encryption for the service 1708. When the service 1708 is deployed to the container platform 210, API registry 404 can cause encryption / decryption code 1710 to be inserted into the service 1708 at deployment time. This allows the developer to select from different encryption regimes based on properties 1704 and / or allows API registry 404 to select a preferred encryption regime as a default.
[0063] End-to-end encryption not only requires that encryption / decryption code 1710 be inserted into service 1708 when service 1708 is deployed or during its development, but also requires that the calling service 1706 include compatible encryption / decryption code. As previously mentioned, when calling service 1706 needs to use service 1708, API registry 404 can generate one or more client libraries 1702 that fully implement the code necessary to interact with service 1708 in an easy and efficient manner. When this client library 1702 is generated, API registry 404 can determine the encryption scheme used by service 1708 by analyzing property 1704. Then, based on this property 1704, API registry 404 can add compatible encryption / decryption code to client library 1702 for calling service 1706. Thus, when calling service 1706 sends a request to service 1708, information may be encrypted at calling service 1706 and decrypted when service 1708 receives this information. Similarly, service 1708 can encrypt a response before sending it to calling service 1706, which can then decrypt the response before sending it outside client library 1702. This makes the entire encryption process completely transparent to the developer of calling service 1706. Rather than requiring a compatible encryption / decryption scheme to be implemented when calling service 1706, property 1704 can ensure that API registry 404 has already generated compatible encryption / decryption code into client library 1702, thereby implementing the end-to-end encryption property.
[0064] FIG. 18 illustrates properties 1804 for an API registry to enable usage logging of a service 1808, according to some embodiments. Prior to this disclosure, monitoring and logging the frequency, source, success rate, etc. of requests to a service required the service itself to log this information. Alternatively, the container environment would need to monitor the service and log its usage information. Logging information at the service 1808 itself is highly inefficient and slows down the throughput of every request handled by that service. Similarly, the overhead of requiring a container platform to monitor and log every call made to a particular service also represents a significant overhead for scheduling and orchestrating container services. The present embodiment addresses this technology. The technical problem is solved by inserting code directly into the client library for the service that calls service 1808. This allows logging and monitoring of the use of service 1808 without any impact on the performance of service 1808 in terms of memory usage or CPU usage.
[0065] In addition to the API definition file 1505, the API registry 404 can receive a property 1804 that indicates or includes code that implements usage logging 1804. When a developer of a calling service 1806 desires to issue a request to the service 1808, the API registry 404 can automatically generate a client library 1802 that includes code for logging activity related to the service 1808. As previously mentioned, this code can be generated based on default code that the API registry 404 manages and executes, or it can be generated by code received with the property 1804 and executed by the API registry 404.
[0066] The code in client library 1802 for logging activity may include a counter that is incremented each time service 1808 is called, a function that causes activity to be logged to a log file when service 1808 is called, and other functions that monitor and record characteristics of requests sent to service 1808 and responses received from service 1808. Depending on the particular embodiment, this code may monitor many different types of characteristics associated with requests made to service 1808. For example, some embodiments may log the total number of calls made to service 1808. Some embodiments may log the success rate of responses received from service 1808. Some embodiments may log the type of data sent in a request to service 1808. Some embodiments may log the time service 1808 was called or other external information about when service 1808 was called. Some embodiments may log input and output to and from service 1808, which can be used to debug service 1808. Some embodiments may log any or all of these features in any combination, without limitation.
[0067] FIG. 19 shows a hardware / software diagram of a property 1904 capable of implementing an authentication protocol for a service 1908, according to some embodiments. Some services may require that a user's identity be authenticated and that the user be authorized to use the service before responding to a request. Prior to this disclosure, a technical challenge existed in which the authentication and authorization procedures were performed by the service 1908 itself. This increased overhead in terms of memory usage and CPU usage for every call the service 1908 received and increased the service's latency in response. This resulted in reduced throughput and limited the number of requests the service 1908 could process in a given period of time. These embodiments solve this technical challenge by moving the authentication / authorization code into a client library 1902, which the API registry 1404 automatically generates.
[0068] When a calling service 1906 wishes to use a service 1908, the API registry 404 can generate a client library 1902 that includes code to perform authorization and / or authentication. In some embodiments, this may involve contacting an external authentication / authorization service 1920 that specifically validates the user identity and / or determines whether the user is authorized to use the service 1908. The external authentication / authorization service 1920 may be an access manager, a Lightweight Directory Access Protocol (LDAP) managed service, or a third-party service. Access Control Lists (ACLs), network authentication The client library 1902 may include a client authentication protocol manager, authentication protocol manager, etc. The code in the client library 1902 can then send a call to the service 1908 when the authentication / authorization procedure is successful.
[0069] By offloading authentication / authorization enforcement to the API registry 404 and client library 1902, this code can be removed from the service 1908 entirely. Interactions with an external authentication / authorization service 1920 can often involve significant latency, and removing this latency from the service 1908 can increase throughput. Additionally, rather than hard-coding authentication / authorization enforcement into the service 1908, the developer of the service 1908 can instead simply select a pre-defined authentication / authorization scheme using properties 1904 sent to the API registry 404. The API registry 404 can manage the pre-defined list of authorizations / authentications along with the accompanying implementation code in the client library 1902. This also prevents the calling service 1906 from sending requests to the service 1908 that cannot be authorized and / or authenticated. Alternatively, the client library 1902 may abort the call if the authentication and / or authorization routines fail, thereby ensuring that the service 1908 only receives authenticated and / or authorized requests.
[0070] Another technical improvement that API registry 404 provides is the ability to upgrade any of the functionality provided by property 1904 without being required to change any of the code of any of the registered services. For example, because the authentication / authorization code is offloaded to client library 1902 generated by API registry 1404, it is possible to change the authentication / authorization regime by updating client library 1902. There is no need to monitor any of the code in calling service 1906 or service 1908. Because the code is changed only in one place, this greatly reduces the probability of code integration errors that would otherwise accompany distributed patches sent to all individual services.
[0071] FIG. 20 shows a hardware / software diagram of properties 2004 that enable runtime instantiation of a service, according to some embodiments. Some services may be used rarely or only for a predetermined period of time. Therefore, deploying a service to a container platform does not always necessarily result in a ready-to-use instance of the service actually being instantiated in the container. Unlike virtual machines, containers can be instantiated and run very quickly. Therefore, a service developer may want a service to be instantiated only when called. A service developer may also want a service to be instantiated only within a predetermined period of time. Similarly, a service developer may specify that a service instance should be deleted after a predetermined inactivity period.
[0072] In addition to receiving the API definition file 1505, the API registry 404 can receive properties 2004 that specify runtime instantiation or other instantiation parameters. For example, the properties can include a specification of one or more time periods during which the service 2008 should be instantiated after deployment. In another example, the properties can include an indication that the service 2008 should only be instantiated on demand. In another example, the properties can specify a timeout period after which the instantiated service 2008 should be removed from the container platform.
[0073] When a calling service 2006 wishes to use a service 2008, the API registry 404 can generate code in the client library 2002 that handles the runtime instantiation of the service 2008. For example, a CreateInstance( ) function call in the client library 2002 makes a call to the API registry 404. 2008。 The API registry 404 can then communicate with the container platform 210 to determine whether an operating instance of the service 2008 is available. If not, the API registry 404 can instruct the container platform 210 to instantiate an instance of the service 2008 in a container in the container platform 2010. The container platform 210 can then return an endpoint (e.g., an IP address and port number) to the API registry 404. The API registry 404 can then create a binding between the endpoint and the API function call made to the client library 2002. The API registry 404 can then return this endpoint to the client library 2002, which can use it to create a direct connection between the calling service 2006 and the newly instantiated service 2008.
[0074] For services that should only be instantiated during predetermined periods, the API registry 404 may build a table of instantiation and deletion times for a particular service. Based on these stored instantiation / deletion times, the API registry 404 can instruct the container platform 210 to instantiate or delete instances of the service 2008. The API registry 404 can also specify the number of instances to be instantiated during these predetermined periods. For example, the property 2004 may specify that from 5:00 PM to 10:00 PM, at least 10 instances of the service 2008 are active on the container platform 210. At this time, the API registry 404 can instruct the container platform 210 to create additional instances.
[0075] FIG. 21 shows a hardware / software diagram of a property 2104 that implements a rate limiting function for a service 2108, according to some embodiments. Some services may need to limit the rate at which they receive requests. Other services may not need to limit requests from specific senders or specific types of services. Prior to this disclosure, this function had to be performed by the service itself by determining the source of each request, comparing this source to a whitelist / blacklist, and throttling the rate at which these requests were serviced. As with most of the above examples, imposing this overhead on the service itself increases the amount of memory and CPU power the service uses, limiting the service's throughput. These embodiments solve this technical problem by automatically generating rate limiting code into client libraries generated by the API registry. This allows the service to specify a rate limit via property 2104, without the service 2108 having to implement this function with all of its associated overhead.
[0076] When a calling service 2106 wishes to send a request to a service 2108, the API registry 404 can automatically generate a client library 2102 that includes rate limiting code. Once the client library 2102 is generated, the API registry 404 can determine whether rate limiting is required for the particular service 2106. If not, the client library 2102 can be generated normally. If the API registry 404 determines that the calling service 2106 should be rate limited (e.g., by comparison with a whitelist / blacklist), then the API registry 404 can automatically generate a client library 2102 that includes rate limiting code. The PI registry 404 can ensure that the calling service 2106 makes a predetermined maximum number of requests according to a predetermined rate in any given period of time by inserting code into the client library 2102 that adds delays, adds counters, and / or otherwise implements a rate limiting function. This code may implement a time window during which the rate limiting function is active, allowing the service 2108 to automatically enforce rate limiting during periods of high traffic.
[0077] FIG. 22 illustrates a functional diagram of the initial deployment of multiple pods to multiple container nodes, according to some embodiments. Some embodiments of container platform 210 may utilize container platform scheduler 2202 to scale and deploy a large number of containers across container platform 210. When a service is scaled out to multiple host systems within a container platform, the ability to manage each host system and abstract away the complexity of the underlying container platform may be advantageous. "Orchestration" is a broad term that refers to container scheduling, managing the clustering of nodes, and potentially provisioning additional hosts in a container environment. "Scheduling" in the context of a container platform may refer to the ability of an administrator to load a service onto a host system and define how that particular container will operate. Scheduling specifically refers to the process of loading a service definition, but it may also be responsible for managing other aspects of the operation of a node cluster. Managing a cluster of nodes includes the process of controlling a group of computing hosts. This is closely tied to scheduling, because scheduler 2202 may need to access each node in the cluster to schedule services, as defined above. However, the process of scheduler 2202 that is most important to the following embodiments involves host selection. In this sense, scheduler 2202 may be tasked with automatically selecting container nodes 2204, 2206, 2208 on which to deploy and run a particular pod that encapsulates a service.
[0078] When scheduling pods to be deployed to a node, a set of operational constraints for each node can be provided to the scheduler. For example, a node 2204 can be associated with constraints 2210 that define how much CPU usage, memory usage, bandwidth usage, and other computing feature usage can be allocated to the container node 2204. These allocations can be allocated to virtual resources operated by virtual machines or to physical resources at least partially dedicated to the node 2204. CPU usage can involve the number of CPU cores used or the number of operations per second dedicated to the node 2204. Memory usage can refer to both dynamic memory usage and static memory storage on disk arrays and other storage media. Bandwidth usage can refer to the amount of network resources required by the node 2204 or the amount of data sent to or from the node 2204 per second.
[0079] Constraints 2210 can be used by scheduler 2202 when deploying and assigning service pods to nodes 2204 to optimize usage of each of these computing features within constraints 2210. Constraints 2210 can act as either soft or hard limits on the actual usage of these computing features by node 2204. If a pod in node 2204 begins using more computing features than constraints 2210 allow, container platform scheduler 2202 can ensure compliance with the constraints by throttling node 2204. In some cases, constraints 2210 can represent physical limitations of the underlying computer hardware being used, and throttling can be based on the physical capabilities of this computing hardware. The illustrated example constraints 2210, 2212, 2214 refer to maximum usage by way of example, but this is not intended to be limiting. Indeed, constraints 2210, 2212, 2214 may include upper and lower limits, ranges of values, time intervals, threshold number operations, target values, optimum values, and any other type of classification that may be used to characterize computing usage.
[0080] When assigning pods to nodes, scheduler 2202 can attempt to maximize the usage of each computing feature within each node while ensuring that the actual usage of the computing features falls within constraints 2210, 2212, and 2214. However, scheduler 2202 must rely on estimates of the pod's actual usage when initially deploying the pod into a container. These estimates are often provided by the developer of the service within the pod. For example, when developing a service, a developer might specify that this pod will use 2 units of CPU, 3 units of memory, and 10 units of bandwidth. These developer estimates can be considered absolute maximums, averages, targets, or any other values that the developer feels comfortable specifying as constraints. An inherent technical challenge with this type of estimation is that many developers overestimate the computing usage that their pods actually truly require. Developers often intentionally overestimate to ensure that their services have all the computing resources they need to run at optimal levels. While this ensures fewer failures, it also causes the scheduler 2202 to underutilize available resources. In fact, based on initial deployments using estimated computing usage, an average of 20% of computing resources may go unused within a node. Developers also often use absolute maximums when estimating usage for their services. However, these maximums occur very rarely, so the steady-state usage of all pods within a node is well below the constraint. This inefficient allocation of pods to nodes results in unnecessary failures or underutilization of computing resources.
[0081] The embodiments described herein address these and other technical challenges by improving the performance of a container platform using scheduler 2202, and in some embodiments, API registry 404. After the initial deployment of a pod based on an estimate of computing resource usage, scheduler 2202 can monitor the actual usage of the pod's operations after deployment. Based on the pod's actual usage, scheduler 2202 can optimize hardware usage and pod performance by redistributing and / or redeploying the pod among different nodes of the container platform. Additionally, because usage can be tracked in real time, scheduler 2202 and / or API registry 404 can detect when the usage rate is increasing and may spike beyond one or more of constraints 2210, 2212, and 2214. In response, scheduler 2202 can use available computing resources to warm up additional instances of the pod in another container node. If actual usage continues to increase at a rate that indicates that the constraints 2210, 2212, 2214 may be exceeded, the system can begin diverting traffic to the new instance.
[0082] In describing these embodiments, the units used to measure and characterize the usage of various computing features will be simplified for ease of explanation. Instead of describing microprocessor cycles, gigabytes of memory, bits per second bandwidth, etc., each of these measurements will be simply referred to as a "unit" for comparison purposes. For example, constraint 2210 may state that CPU usage is at most "20 units." This may correspond to two processor cores running at 3.46 GHz. Nodes associated with constraint 2210 When comparing the usage of pod 2220 within 2204, the usage of pod 2220 can be described as using 5 units of CPU usage, which would represent approximately 25% of the total amount available under constraint 2210. Similarly, a "unit" of memory usage may represent megabytes, gigabytes, terabytes, or any other standard measurement of memory usage.
[0083] The example of FIG. 22 corresponds to an initial deployment of pods within nodes 2204, 2206, and 2208 using the estimated CPU usage for each pod shown in FIG. 22. These estimates may be provided by the developer of the service or may be estimated using automated tools or other methods. Additionally, FIG. 22 may show only CPU usage without showing memory usage, bandwidth usage, and other computing characteristics. This is for clarity and is not intended to be limiting. One skilled in the art will understand that in addition to balancing CPU usage, scheduler 2202 also simultaneously schedules according to memory usage, bandwidth usage, and other usage characteristics in constraints 2210, 2212, and 2214. An example of balancing multiple usage factors is further described below.
[0084] For simplicity, it can be assumed that the CPU usage of each of nodes 2204, 2206, and 2208 specified in respective constraints 2210, 2212, and 2214 is stated as a maximum CPU usage of 20 units for each of nodes 2204, 2206, and 2208. When scheduler 2202 receives the seven pods shown in FIG. 22, scheduler 2202 can deploy these pods in a manner that maximizes resource usage within each node but does not violate the constraints associated with each node. This can be done in several different ways, and in some embodiments, scheduler 2202 can use a round-robin method. In some embodiments, scheduler 2202 can use a greedy algorithm that places the pod with the highest usage first. For example, scheduler 2202 can deploy pod 2232, which has a maximum CPU usage of 18 units, to node 2208 first. Scheduler 2202 may then deploy pod 2222, which has the second-highest CPU usage of 10 units, to node 2204. Scheduler 2202 may then deploy pod 2224, which has the third-highest CPU usage of 9 units, to node 2206, and so on. Scheduler 2202 can fill each node's available usage space by using this or other algorithms. Some schedulers may also leave a buffer between usage and constraints by leaving a guard band between the pod's total usage and the node's constraint usage, especially when the constraints reflect the limitations of the underlying physical hardware.
[0085] However, as briefly mentioned above, the actual CPU usage of one or more of the pods in a node may not be as constant as the estimate during actual operation. Figure 23 shows a graph of CPU usage over time. Line 2312 represents pod 2228's estimated usage of 6 CPU units. Line 2322 represents pod 2228's actually measured CPU usage over time. Note that actual usage 2322 is between 10 and 12 units, far exceeding the estimated 6 units of CPU usage used when initially deploying pod 2228. This higher-than-estimated usage can occur if the service is more popular than initially estimated. It can also occur when the service is not performing as efficiently as intended. Regardless of the reason, actual usage of 5–6 units above the initial estimate of 6 units is enough to cause node 2206's total usage to exceed the maximum constraint 2212 of 20 CPU units.
[0086] Similarly, line 2310 represents the initial estimated usage of pod 2222, which is 10 CPU units. However, line 2328 represents the actual CPU usage of pod 2222 over time. Note that actual usage 2328 is between 4 and 5 units, which is 5 to 6 units below the estimated usage 2310 of 10 units. As a result, the total usage of node 2204 may fall significantly below the 20 CPU units of constraint 2210. While this does not constitute a failure, it could result in the host of node 2204 being underutilized. If this occurs on multiple nodes, it would significantly reduce the efficiency of the overall container platform.
[0087] The embodiments described herein address these and other challenges by monitoring the post-deployment usage of services on each node. If these usages deviate from the estimated usage used in the initial deployment by more than a threshold amount, scheduler 2202 and / or API registry 404 can reassign the pod deployment to a different node within the container platform to ensure compliance with constraints 2210, 2212, and 2214 while efficiently utilizing available hosts. Some embodiments can be implemented using scheduler 2202 without API registry 404. Other embodiments can be implemented using API registry 404 without scheduler 2202. Other embodiments use a combination of both the API registry and scheduler 2202.
[0088] Other embodiments may monitor the usage of other computing features at runtime and use other methods to track pod deployments. In some embodiments, scheduler 2202 can monitor transactions between pods and between nodes. These implementations add logging functionality to the scheduler to log the transmissions each pod receives as service requests. A data structure can store a count of these transmissions, incremented with each new transmission. The log of each transmission includes information about the specific computing resource usage described in the node's constraints within the container platform. For example, the log can monitor the transmission time, transmission frequency, size of the data packet being transmitted, etc. Additionally, the log can store processing and memory usage requests from the pod to the container platform, including requests to allocate new storage locations or delete old storage locations, requests to process functions, etc. Scheduler 2202 combines this logging functionality with real-time analysis algorithms to determine absolute usage, peak usage, minimum usage, average usage, instantaneous usage, etc., using the timing and magnitude of each input stored in the log. By continuously running this analysis algorithm in real time, scheduler 2202 is able to maintain a record of up-to-date usage information for all requested usage characteristics that are compared against constraints.
[0089] In an embodiment using the API registry 404, the API registry 404 can embed usage code into the client library of each of the calling services. Specifically, a property indicating usage logging may be used to enable logging of interactions between services. This allows the API registry 404 to generate usage logging code into the client library of the calling service. Additionally, when a service is deployed, the API registry 404 can embed usage logging code into the deployed service. This allows the service to self-report memory usage information, CPU usage information, bandwidth usage information, and the like to the API registry 404. Note that this code is automatically generated by the API registry, so service developers do not need to embed this code themselves. Instead, this code may be automatically generated, logged, calculated, and analyzed by the API registry. The same analysis algorithms executed by the scheduler 2202 may be used. Similarly, the API registry 404 and / or client library code can analyze the usage information in real time to determine usage characteristics such as peak usage, average usage, instantaneous usage, minimum usage, etc.
[0090] After monitoring the usage information, scheduler 2202 and / or API registry 404 can identify when the actual usage characteristics of any pods in the container platform deviate from their initial estimated usage by more than a threshold amount. When this deviation occurs, scheduler 2202 and / or API registry 404 can determine that any pods that deviate from their initial estimates by more than a threshold amount should be redeployed based on their actual estimates. FIG. 24 shows a diagram depicting pod redeployment based on actual usage. Recall that pod 2222 was initially estimated to have 10 units of CPU usage. However, its actual usage was closer to 4-5 CPU units. Assuming constraints 2210 and 2212 relate to maximum CPU usage, pod 2222's estimated usage can be redefined to 6 units of CPU usage based on the actual recorded usage. Similarly, recall that pod 2228 was initially estimated to have 6 units of CPU usage. However, over time, pod 2228's actual usage was closer to the maximum of 12 units. Therefore, pod 2228's estimated usage can be reallocated to 12 units of CPU usage.
[0091] If it is detected that the actual usage is sufficiently off from the current estimate, the scheduler 2202 and / or the API registry 404 can reallocate the pods to multiple nodes. In some embodiments, it may be inefficient to reallocate pods that are not off from their respective usage estimates. In this example, only pods 2222 and 2228 require reallocation; pods 2220, 2224, 2226, 2230, and 2232 can remain where they are currently deployed. In an algorithm, the off-limits pods can be removed from their respective constraints and redeployed using the algorithm (round robin, greedy, etc.). If all off-limits pods could be redeployed using this method, this would represent the most efficient reallocation method available. If the off-limits pods cannot be redeployed themselves, the scheduler 202 and / or the API registry 404 can initiate a reallocation of the node with the least estimated usage, even if they are not off-limits from the actual usage. This algorithm can be run repeatedly until all pods are redeployed within constraints 2210, 2212, 2214. This also ensures that each host's resources are used most efficiently by the pod deployments.
[0092] In embodiments that use API registry 404, redeployment may cause API registry 404 to generate new bindings between the node's endpoints and functions registered with the API registry. As mentioned above, the API registry can update its bindings when a new IP address and port number is assigned to the redeployed pod. This can then update any client libraries generated to handle interactions between any of the redeployed services and calling services. This also reduces the ripple effects that can typically occur when endpoints change for services in a container platform.
[0093] Figure 25 shows how multiple usage features can be balanced simultaneously within a container node. In this embodiment, the estimated usage 2502 for a pod 2220 includes three different usage factors: CPU usage, memory usage, and bandwidth usage. These three usage features are calculated as three different values: 8 units for CPU usage, 8 units for memory usage, and 8 units for bandwidth usage. The estimated usage 2504 for pod 2222 may correspond to 3 units of dosage, and 5 units of bandwidth usage. Similarly, the estimated usage 2504 for pod 2222 includes three usage factors: 10 units of CPU usage, 13 units of memory usage, and 1 unit of bandwidth usage. When deploying or redeploying pod 2220 and pod 2222 according to the above method, these factors may be balanced together to determine the appropriate node to assign these pods to. In some embodiments, pods may be placed first according to their highest estimated usage. This corresponds to placing pod 2222 first according to memory and pod 2220 first according to CPU usage. Other embodiments may deploy pods based on least available or most available constraints and / or usage characteristics.
[0094] FIG. 26 illustrates the deployment of pods after the initial deployment, according to some embodiments. In this embodiment, constraint 2212 may be assumed to include a maximum CPU usage of 20 units. The combined usage of pods 2224, 2228, and 2230 in node 2206 is approximately 17 CPU units. In some cases, a pod, such as pod 2224, may experience a temporary increase in usage above its normal average expected usage. In this case, if such an increase is temporary and sparse, it may not be efficient to redeploy the pod to adjust its usage. However, to prevent a negative impact on the performance of pod 2224, along with the cumulative performance of any other pods on the same node 2206, API registry 404 and / or scheduler 2202 can take additional steps to handle the temporary increase in usage by temporarily deploying additional instances of pod 2224.
[0095] In one example, the CPU usage of pod 2224 may increase from 9 CPU units to 15 CPU units, causing the total CPU usage of node 2206 to exceed the maximum usage of 20 CPU units specified by constraint 2212. This could cause all pods on node 2206 to fail, especially if the underlying hardware host does not have the CPU resources required by node 2206.
[0096] 27 shows a graph of CPU usage over time, according to some embodiments. Line 2710 shows the actual usage of pod 2224 over time. Line 2702 represents pod 2224's estimated usage of 9 CPU units. Line 2714 represents pod 2224's estimated usage that would cause node 2206 to exceed constraint 2212, which is 20 CPU usage units. If left unchecked, pod 2224's usage would first exceed its estimated maximum usage of 9 CPU units, then exceed 12 CPU units, resulting in node 2206 exceeding its maximum constraint of 20 CPU units.
[0097] Using scheduler 2202 and / or API registry 404, the container platform can effectively reduce pod 2224's usage before it exceeds these thresholds. As previously mentioned, CPU usage can be tracked in real time by scheduler 2202 and / or API registry 404 as services in pod 2224 request processing. Because the current CPU usage logging includes a timestamp, scheduler 2202 and / or API registry 404 can determine the rate of increase in CPU usage. If the rate of increase in CPU usage exceeds first threshold 2704, these systems can "warm up" a new instance of pod 2224's service in another part of node 2206 or in a different node, such as node 2204. Warming up a new instance of the service can include instantiating a new pod and loading the instance of the service into the new pod. This can also include running the new pod's initialization routines and loading test inputs / vectors into the service. The warm-up phase may include sending request traffic to the new pod and starting processing. A node may be selected for the new pod with the lowest total utilization for a selected utilization factor, e.g., CPU usage. During the warm-up phase, live traffic does not need to be routed to this new pod. This is a period that can be used to prepare for a continuous increase in CPU utilization. If this rate continues to increase, the system can be prepared to respond by diverting request traffic to the new pod.
[0098] If utilization begins to decrease or does not maintain a predetermined growth rate threshold, the newly instantiated pod can be removed. However, if the growth rate maintains a predetermined level and exceeds a second threshold 2706, the system can respond by launching a newly instantiated pod. In other words, if the increasing CPU usage threatens to exceed the node-wide maximum constraint, service request traffic can be rerouted to a new pod running on a different node. This may include routing traffic from pod 2224 in node 2206 to the new pod in container 2204. After the new pod is launched, curve 2712 shows the new CPU usage trajectory of pod 2224. This new trajectory is reduced before significantly exceeding line 2702, which represents pod 2224's estimated utilization. This new trajectory is also reduced significantly before approaching exceeding line 2714, which represents the node's 2206 constraint limit.
[0099] FIG. 28 shows a diagram of the pod instantiation process described in FIG. 27 , according to some embodiments. All request traffic 2804 is first sent to pod 2224. If CPU usage begins to increase, scheduler 2202 and / or API registry 404 can instantiate a new pod 2802 in node 2204. Node 2204 can be selected because it currently has the lowest CPU usage on the container platform: 8 CPU units. Note that even after new pod 2802 is instantiated on node 2204, none of the request traffic 2804 is diverted to the new pod 2802. Instead, if pod 2224's CPU usage continues to increase steadily, pod 2802 can be instantiated, initialized, and otherwise “warmed up” in preparation for receiving some of the request traffic 2804.
[0100] 29 shows a diagram of pod instantiation and usage, according to some embodiments. Continuing with the example of FIG. 28, it can be assumed that the CPU usage of pod 2224 continues to increase after a new pod 2802 is instantiated in node 2204. After the capacity threshold level of CPU usage growth increases, API registry 404 and / or scheduler 2202 can begin routing traffic to the new pod 2802.
[0101] In some embodiments, this may include instantiating a pod that implements a load balancer that receives incoming requests directed by API registry 404. The load balancer can then equalize the number of requests between pod 2224 and pod 2802. In some embodiments, the load balancer can first begin by splitting the request traffic equally between pod 2224 and pod 2802. The load balancer can then determine which of node 2204 and node 2206 is closer to their respective CPU usage constraints 2210 and 2212. The load balancer can then adjust the flow of request traffic between the two pods 2224, 2802 to maintain an equal guard band between the usage of nodes 2204, 2206 and their respective constraints 2210, 2212. For example, if two pods split the request traffic equally, this may result in a first pod splitting the request traffic equally between pod 2224 and pod 2802. It's possible for the total CPU usage of a first node containing a pod to be closer to its constraint maximum than the total CPU usage of a second node containing a second pod. In this case, the load balancer can shift traffic from the first pod to the second pod, resulting in an unequal distribution, but with a roughly equal buffer between the constraint maximum and the actual usage.
[0102] If the increase in CPU usage that caused the instantiation and launch of new pod 2802 begins to decrease over time, scheduler 2202 and / or API registry 404 can detect this decrease and subsequently shift request traffic 2902 back to pod 2224. This allows the temporary instantiation process to handle the additional request traffic to act as an intermediate reaction to the increase in computing resource usage. If this increase is temporary and lasts for less than a certain threshold amount of time, it can simply remove new pod 2802 and continue operation as normal. However, if the increase in computing resource usage is more sustained and lasts for more than a certain threshold amount of time, API registry 404 and / or scheduler 2202 can instead increase the estimated resource usage of pod 2224 and redeploy the pod into a container node with sufficient resources for one service instance. This redeployment process can be performed as previously described in FIGS. 22-24. In some embodiments, a process of temporary instantiation can always precede the rebalancing and redeployment of Figures 22-24, although this is not required.
[0103] FIG. 30 illustrates a flowchart of a method for dynamically rebalancing services in a container platform, according to some embodiments. The method may include deploying multiple pods to multiple nodes of the container platform (3001). As used herein, the term "pod" may refer to a service or a container, since in some embodiments, a service may be deployed in a pod of one or more containers. These pods may be distributed and deployed across multiple nodes in the container platform, as previously described in connection with FIG. 22. Each of the nodes may be associated with usage constraints that describe constraints on computing resource usage within each node. As previously described, these constraints may be associated with any computing resource, such as CPU usage, memory usage, bandwidth usage, power usage, time usage, software module usage, etc. While the above example specifically references CPU usage as an example, without limitation, any of these other computing resources may be combined in place of CPU usage.
[0104] The method may also include monitoring usage factors associated with the plurality of pods after deployment (3003). Monitoring these usage factors may be performed by a scheduler, by an implementation of the API registry, or by other software processes operating within the container platform. Monitoring usage factors may include maintaining logs with time-stamped information describing service / pod behavior. These operations may include memory resource requests, CPU usage requests, data transmissions over a network, requests sent between services within the container platform, hardware measurements including power measurements and / or CPU clock cycles or operations, and / or other characterizations of pod / service behavior. In some embodiments, the system may also monitor usage factors in aggregate across nodes compared to constraints for the nodes. These operations may include timing factors that allow the system to calculate utilization rates, including instantaneous rates, average rates, maximum rates, minimum rates, target rates, etc. These rates may be calculated based on these factors. It may be calculated in addition to its logged average measurements, minimum measurements, maximum measurements, instantaneous measurements, etc. Other mathematical calculations may be applied to the measured usage factors, such as first derivatives, second derivatives, statistical characterizations, comparisons, differences, etc.
[0105] The method may also include identifying when a pod's actual usage deviates from its initial characterization of its usage factors (3005). The deviation may be a comparison of some type of usage information measured after deployment with some type of usage information estimated before deployment. For example, if absolute memory usage is limited to 10 GB by a constraint, the estimated usage before deployment may be a measurement such as 5 GB for a particular pod in a node. The actual deviation may include a comparison between the measured usage after deployment and the estimated usage used during deployment. For example, a pre-deployment estimate of 5 GB can be compared to a post-deployment measurement of 7 GB. If the deviation exceeds a predetermined threshold, such as 1 GB, the pod can be identified as deviating. In another example, if a constraint specifies a memory allocation rate such as 10 MB / s, the system can use recorded memory allocation requests to calculate the memory allocation rate to compare with the estimated usage before deployment. Some embodiments may require that this misalignment be maintained for at least a predetermined period of time before being reported as a misalignment, thereby preventing a transient or temporary misalignment from causing the system to change deployments or initiate new pod instantiations.
[0106] The method may further include redistributing at least some of the pods based on a deviation in their usage factors (3007). The redistribution may include moving pods from one node to a second node. The redistribution may also include adjusting the estimated usage factors so that the deviation matches the actual usage measured by the system after deployment. In some embodiments, the redistribution may include first instantiating and warming up a replicated or cloned pod on the second node after the first usage threshold is exceeded and diverting traffic from the first pod to the replicated or cloned pod to handle the temporary change in usage and prevent the usage from exceeding the constraint for the node encapsulating the original first pod.
[0107] It should be understood that the specific steps illustrated in FIG. 30 provide a particular method for dynamically rebalancing services in a container platform according to various embodiments of the present invention. Other sequences of steps may be performed according to alternative embodiments. For example, alternative embodiments of the present invention may perform the steps outlined above in a different order. In addition, individual steps illustrated in FIG. 30 may include multiple sub-steps that may be performed in various sequences as appropriate for the individual step. Furthermore, other steps may be added or removed depending on the particular application. Those skilled in the art will recognize numerous variations, modifications, and alternatives.
[0108] Each of the methods described herein can be implemented by a dedicated computer system. Each of the method steps can be performed automatically by the computer system and / or can be provided with required input / output from a user. For example, a user can provide inputs to each method step, and each of these inputs can be provided in response to a particular output generated by the computer system that requires such input. Each input can be received in response to a corresponding requested output. Furthermore, inputs can be received from a user, as a data stream from another data system, retrieved from a memory location, retrieved over a network, requested from a web service, and / or the like. Similarly, outputs can be generated in response to a request for a particular output. may be provided to a user, provided as a data stream to another computer system, stored in a memory location, sent over a network, provided to a web service, and / or the like. That is, each step of the methods described herein may be performed by a computer system and may require any number of inputs to, outputs from, and / or requests to / from the computer system, which may or may not require a user. Steps that do not require a user may be said to be performed automatically by a computer system without human intervention. Thus, in light of this disclosure, each step of each method described herein may be modified to include inputs and outputs to and from a user, or may be performed automatically by a computer system without human intervention if a processor makes some decisions. Furthermore, some embodiments of each method described herein may be embodied as a set of instructions stored on a tangible, non-transitory storage medium to form a tangible software product.
[0109] 31 shows a simplified diagram of a distributed system 3100 capable of interacting with any of the above embodiments. In the illustrated embodiment, the distributed system 3100 includes one or more client computing devices 3102, 3104, 3106, and 3108 configured to run and operate client applications such as web browsers, dedicated clients (e.g., Oracle Forms), etc., via one or more networks 3110. A server 3112 may be communicatively coupled to the remote client computing devices 3102, 3104, 3106, and 3108 via the network 3110.
[0110] In various embodiments, server 3112 may be adapted to run one or more services or software applications provided by one or more of the components of the system. In some embodiments, these services may be provided to users of client computing devices 3102, 3104, 3106, and / or 3108 as web-based or cloud services or under a software-as-a-service (SaaS) model. Users operating client computing devices 3102, 3104, 3106, and / or 3108 may then utilize the services provided by these components by interacting with server 3112 using one or more client applications.
[0111] In the configuration shown in the figures, software components 3118, 3120, and 3122 of system 3100 are shown as implemented on server 3112. In other embodiments, one or more of the components of system 3100 and / or the services they provide may be implemented by one or more of client computing devices 3102, 3104, 3106, and / or 3108. A user operating a client computing device may then utilize one or more client applications to use the services provided by these components. These components may be implemented in hardware, firmware, software, or a combination thereof. It should be understood that a variety of different system configurations are possible that may differ from distributed system 3100. The embodiment shown in the figures is therefore an example of a distributed system for implementing the system of the embodiments and is not intended to be limiting.
[0112] Client computing devices 3102, 3104, 3106, and / or 3108 may be implemented using software such as Microsoft Windows Mobile® and / or various mobile operating systems such as iOS, Windows Phone, Android, BlackBerry 10, Palm OS, and others. The client computing device may be a portable handheld device (e.g., iPhone®, mobile phone, iPad®, computing tablet, personal digital assistant (PDA)) or a wearable device (e.g., Google Glass® head-mounted display) running a Microsoft® operating system and capable of connecting to the Internet, email, short message service (SMS), Blackberry®, or other communication protocols. Client computing devices may be, by way of example, personal computers and tablets running various versions of Microsoft Windows®, Apple Macintosh®, and / or Linux® operating systems. The client computing device may be a general-purpose personal computer, including a laptop computer, and / or a mobile device. The client computing device may be any of a variety of commercially available operating systems, including, but not limited to, various GNU / Linux operating systems such as Google Chrome OS. Alternatively or additionally, client computing devices 3102, 3104, 3106, and 3108 may be electronic devices, such as thin-client computers, internet-enabled gaming systems (e.g., Microsoft Xbox game consoles with or without Kinect gesture input devices), and / or personal messaging devices, capable of communicating over network 3110.
[0113] Although the exemplary distributed system 3100 is shown with four client computing devices, any number of client computing devices may be supported. Other devices, such as devices with sensors, etc., may also interact with the server 3112.
[0114] The network 3110 of the distributed system 3100 may be any type of network familiar to those skilled in the art that can support data communications using any of a variety of commercially available protocols, including, but not limited to, TCP / IP (transmission control protocol / Internet protocol), SNA (systems network architecture), IPX (Internet packet exchange), AppleTalk®, etc. By way of example only, the network 3110 may be a local area network (LAN), based, for example, on Ethernet, token ring, and / or the like. The network 3110 may also be a wide area network and the Internet. This may include, but is not limited to, a virtual private network (VPN), an intranet, an extranet, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., using the Institute of Electrical and Electronics (IEEE) 802.11 protocol), etc. Corsuite, Bluetooth, and / or any other wireless protocol networks operating under any of these), and / or virtual networks, including any combination of the above and / or other networks.
[0115] Server(s) 3112 may comprise one or more general-purpose computers, dedicated server computers (including, by way of example, PC (personal computer) servers, UNIX servers, mid-range servers, mainframe computers, rack-mounted servers, etc.), server farms, server clusters, or any other suitable configuration and / or combination. In various embodiments, server(s) 3112 may be configured to run one or more services or software applications described in the above disclosure. For example, server(s) 3112 may comprise one or more servers configured to run one or more of the services or software applications described in the above disclosure. The server may be compatible with the above.
[0116] Server 3112 may run an operating system, including any of the operating systems listed above, as well as commercially available server operating systems. Server 3112 may also run any of a variety of additional server and / or mid-tier applications, including a hypertext transport protocol (HTTP) server, a file transfer protocol (FTP) server, a common gateway interface (CGI) server, a JAVA server, a database server, etc. Exemplary database servers include, but are not limited to, those commercially available from Oracle, Microsoft, Sybase, IBM (International Business Machines), etc.
[0117] In some implementations, server 3112 may include one or more applications for analyzing and consolidating data feeds and / or event updates received from users of client computing devices 3102, 3104, 3106, and 3108. By way of example, the data feeds and / or event updates may include, but are not limited to, Twitter® feeds, Facebook® updates, or real-time updates received from one or more third-party sources and continuous data streams. These may include real-time events related to sensor data applications, financial tickers, network performance measurement tools (e.g., network monitoring and traffic management applications), clickstream analysis tools, automobile traffic monitoring, etc. Server 3112 may also include one or more applications for displaying data feeds and / or real-time events via one or more display devices of client computing devices 3102, 3104, 3106, and 3108.
[0118] Distributed system 3100 may also include one or more databases 3114 and 3116. Databases 3114 and 3116 may reside in a variety of locations. By way of example, one or more of databases 3114 and 3116 may reside on non-transitory storage media local to (and / or within) server 3112. Alternatively, databases 3114 and 3116 may be located remotely from server 3112 and communicate with server 3112 via a network-based or dedicated connection. In one set of embodiments, databases 3114 and 3116 may reside within a storage area network (SAN). Similarly, any files necessary to perform the functions attributed to server 3112 may be stored locally and / or remotely from server 3112, as appropriate. In one set of embodiments, databases 3114 and 3116 may include relational databases, such as those provided by Oracle, adapted to store, update, and retrieve data in response to SQL-formatted commands.
[0119] 32 is a simplified block diagram of one or more components of a system environment 3200 in which one or more components of an embodiment system may provide services as cloud services, according to an embodiment of the present disclosure. In the embodiment shown, system environment 3200 includes one or more client computing devices 3204, 3206, and 3208 that users may use to interact with a cloud infrastructure system 3202 that provides cloud services. The client computing devices may include a web browser, a dedicated client application (e.g., Oracle Forms), or any other application that a user of the client computing device may use to interact with cloud infrastructure system 3202 and thereby use the services provided by cloud infrastructure system 3202. The device may be configured to operate a client application, such as an application from
[0120] It should be understood that the cloud infrastructure system 3202 depicted in the figures may have components other than those shown. Additionally, the embodiment depicted in the figures is only one example of a cloud infrastructure system that may incorporate embodiments of the present invention. In other embodiments, the cloud infrastructure system 3202 may have more or fewer components than those depicted, may combine two or more components, or may have a different configuration or arrangement of components.
[0121] Client computing devices 3204, 3206, and 3208 may be devices similar to those described above for 3102, 3104, 3106, and 3108.
[0122] Although the exemplary system environment 3200 is shown with three client computing devices, any number of client computing devices may be supported. Other devices, such as devices with sensors, etc., may interact with the cloud infrastructure system 3202.
[0123] Network 3210 can facilitate communication and exchange of data between clients 3204, 3206, and 3208 and cloud infrastructure system 3202. Each network can be any type of network familiar to those skilled in the art that can support data communication using any of a variety of commercially available protocols, including those previously described for network 3110.
[0124] Cloud infrastructure system 3202 may include one or more computers and / or servers, which may include those previously described for server 3112.
[0125] In particular embodiments, the services offered by a cloud infrastructure system may include numerous services made available on demand to users of the cloud infrastructure system, such as online data storage and backup solutions, web-based email services, hosted office suites and document collaboration services, database processing, managed technical support services, etc. The services offered by the cloud infrastructure system may be dynamically scaled to meet the needs of its users. A specific instantiation of a service offered by the cloud infrastructure system is referred to herein as a "service instance." Generally, any service made available to users from a cloud service provider's system over a communications network such as the Internet is referred to as a "cloud service." Typically, in a public cloud environment, the servers and systems comprising the cloud service provider's system are distinct from the customer's own on-premises servers and systems. For example, the cloud service provider's system may host an application, which users can order and use on demand over a communications network such as the Internet.
[0126] In some examples, services in a computer network cloud infrastructure may include protected access to storage, hosted databases, hosted web servers, software applications, or other services provided to users by a cloud vendor or in other manners known in the art. The services may include computer network access hosted on a cloud vendor's website. For example, the services may include password-protected access to remote storage on a cloud via the Internet. As another example, the services may include a web-services-based hosted relational database and scripting language middleware engine for the private use of a networked developer. As another example, the services may include access to an email software application hosted on a cloud vendor's website.
[0127] In particular embodiments, cloud infrastructure system 3202 may include a suite of application, middleware, and database service offerings delivered to customers in a self-service, subscription-based, elastically scalable, highly reliable, highly available, and secure manner. One example of such a cloud infrastructure system is the Oracle Public Cloud, offered by the assignee of the present application.
[0128] In various embodiments, cloud infrastructure system 3202 may be configured to automatically provision, manage, and track customer subscriptions to services provided by cloud infrastructure system 3202. Cloud infrastructure system 3202 may provide cloud services through different deployment models. For example, services may be provided under a public cloud model, in which an organization that sells cloud services (e.g., owned by Oracle) owns cloud infrastructure system 3202 and makes the services available to the general public or to different industry enterprises. As another example, services may be provided under a private cloud model, in which cloud infrastructure system 3202 is operated solely for one organization and may provide services for one or more entities within that organization. Cloud services may also be provided under a community cloud model, in which cloud infrastructure system 3202 and the services it provides are shared among several organizations within an associated community. Cloud services may also be provided under a hybrid cloud model, which is a combination of two or more different models.
[0129] In some embodiments, the services offered by cloud infrastructure system 3202 may include one or more services offered under the Software as a Service (SaaS) category, the Platform as a Service (PaaS) category, the Infrastructure as a Service (IaaS) category, or other categories of services, including hybrid services. A customer may order one or more services offered by cloud infrastructure system 3202 through a subscription order. Cloud infrastructure system 3202 then performs processing to provide the services for the customer's subscription order.
[0130] In some embodiments, the services provided by the cloud infrastructure system 3202 may include, but are not limited to, application services, platform services, and infrastructure services. In some examples, application services may be provided by the cloud infrastructure system via a SaaS platform. The SaaS platform may be configured to provide cloud services that fall under the SaaS category. For example, the SaaS platform may provide the ability to build and deliver a suite of on-demand applications on an integrated development and deployment platform. The SaaS platform may manage and control the underlying software and infrastructure to provide the SaaS services. Customers who utilize the services provided by the SaaS platform may By using a cloud infrastructure system, customers can utilize applications that run on the cloud infrastructure system. Customers can obtain application services without the customer having to purchase separate licenses and support. A variety of different SaaS services can be offered. Examples include, but are not limited to, services that provide solutions for sales performance management, enterprise integration, and business flexibility for large organizations.
[0131] In some embodiments, platform services can be provided by a cloud infrastructure system via a PaaS platform. The PaaS platform can be configured to provide cloud services that fall under the PaaS category. Examples of platform services can include, but are not limited to, services that allow organizations (such as Oracle) to integrate existing applications on a shared, common architecture, and the ability to build new applications that leverage the shared services provided by the platform. The PaaS platform can manage and control the underlying software and infrastructure to provide the PaaS services. Customers can obtain the PaaS services provided by the cloud infrastructure system without the customer having to purchase separate licenses and support. Examples of platform services include, but are not limited to, Oracle Java Cloud Service (JCS). ), Oracle Database Cloud Service (DBCS), and others.
[0132] By utilizing the services provided by the PaaS platform, customers can adopt programming languages and tools supported by the cloud infrastructure system and also have control over the deployed services. In some embodiments, the platform services provided by the cloud infrastructure system may include database cloud services, middleware cloud services (e.g., Oracle Fusion Middleware services), and Java cloud services. In one embodiment, database cloud services allow organizations to pool database resources and offer database as a service in the form of a database cloud. The middleware cloud service may provide a platform for customers to develop and deploy various business applications, and the Java cloud service may provide a platform for customers to deploy Java applications in a cloud infrastructure system.
[0133] A variety of different infrastructure services may be provided by IaaS platforms in cloud infrastructure systems that facilitate the management and control of underlying computing resources, such as storage, network, and other fundamental computing resources, for customers who use the services provided by SaaS and PaaS platforms.
[0134] In particular embodiments, cloud infrastructure system 3202 may also include infrastructure resources 3230 for providing resources used to provide various services to customers of the cloud infrastructure system. In one embodiment, infrastructure resources 3230 may include a pre-integrated and optimized combination of hardware such as servers, storage, and networking resources for running the services provided by the PaaS and SaaS platforms.
[0135] In some embodiments, in the cloud infrastructure system 3202 Resources may be shared by multiple users and dynamically reallocated per request. Additionally, resources may be allocated to users in different time zones. For example, cloud infrastructure system 3202 may maximize resource utilization by allowing a first set of users in a first time zone to utilize the cloud infrastructure system's resources for a specified number of hours, and then reallocating the same resources to another set of users in a different time zone.
[0136] In particular embodiments, multiple internal shared services 3232 may be provided that are shared by different components or modules of cloud infrastructure system 3202 and by services provided by cloud infrastructure system 3202. These internal shared services may include, but are not limited to, security and identity services, integration services, enterprise repository services, enterprise manager services, virus scanning and whitelisting services, high availability, backup and recovery services, services to enable cloud support, email services, notification services, file transfer services, etc.
[0137] In particular embodiments, cloud infrastructure system 3202 may provide comprehensive management of cloud services (e.g., SaaS, PaaS, and IaaS services) in the cloud infrastructure system. In one embodiment, cloud management functionality may include functionality to provision, manage, and track customer subscriptions received by cloud infrastructure system 3202.
[0138] In one embodiment, as shown in the figure, cloud management functionality may be provided by one or more modules, such as an order management module 3220, an order orchestration module 3222, an order provisioning module 3224, an order management and monitoring module 3226, and an identity management module 3228. These modules may include or be provided using one or more computers and / or servers, which may be general-purpose computers, dedicated server computers, server farms, server clusters, or any other suitable configuration and / or combination.
[0139] In exemplary operation 3234, a customer using a client device, such as client device 3204, 3206, or 3208, may interact with cloud infrastructure system 3202 by requesting one or more services offered by cloud infrastructure system 3202 and ordering subscriptions for one or more services offered by cloud infrastructure system 3202. In particular embodiments, the customer may access and place subscription orders through cloud user interfaces (UIs), cloud UI 3212, cloud UI 3214, and / or cloud UI 3216. Order information received by cloud infrastructure system 3202 in response to the customer placing an order may include information identifying the customer and one or more services offered by cloud infrastructure system 3202 to which the customer intends to subscribe.
[0140] After a customer places an order, the order information is received via cloud UI 3212, 3214 and / or 3216.
[0141] In operation 3236, the order is stored in order database 3218. Order database 3218 may be one of several databases operated by cloud infrastructure system 3202 along with other system elements.
[0142] At operation 3238, the order information may be forwarded to the order management module 3220. In some examples, the order management module 3220 may be configured to perform billing and accounting functions related to the order, such as verifying the order and filling the order after verification.
[0143] At operation 3240, information about the order is communicated to order orchestration module 3222. Order orchestration module 3222 may be configured to orchestrate the provisioning of services and resources for orders placed by customers by utilizing the order information. In some examples, order orchestration module 3222 may support subscribed services that use the services of order provisioning module 3224 by orchestrating the provisioning of resources.
[0144] In particular embodiments, the order orchestration module 3222 enables management of business processes associated with each order and applies business logic to determine whether the order should proceed to provisioning. In operation 3242, upon receiving an order for a new subscription, the order orchestration module 3222 sends a request to the order provisioning module 3224 to allocate and configure the resources necessary to fulfill the subscription order. The order provisioning module 3224 enables the allocation of resources for the services ordered by the customer. The order provisioning module 3224 provides a level of abstraction between the cloud services provided by the cloud infrastructure system 3202 and the physical implementation layer used to provision the resources to provide the requested services. In this way, the order orchestration module 3222 can be decoupled from implementation details, such as whether services and resources are actually provisioned on the fly or whether they are pre-provisioned and allocated / assigned after the request.
[0145] In operation 3244 , once the services and resources are provisioned, a notification of the services to be provided may be sent by order provisioning module 3224 of cloud infrastructure system 3202 to the customer of client device 3204 , 3206 and / or 3208 .
[0146] At operation 3246, the customer's subscription order may be managed and tracked by the order management and monitoring module 3226. In some examples, the order management and monitoring module 3226 may be configured to collect usage statistics for the services in the subscription order, such as storage usage, amount of data transferred, number of users, and amount of system uptime and system downtime.
[0147] In particular embodiments, cloud infrastructure system 3202 may include identity management module 3228. Identity management module 3228 may be configured to provide identity services, such as access management and authorization services, in cloud infrastructure system 3202. In some embodiments, identity management module 3228 may manage information regarding customers who wish to utilize services offered by cloud infrastructure system 3202. Such information may include information to authenticate the identities of such customers and the accessibility of various system resources (e.g., files, directories, applications, communications, etc.). The identity management module 3228 may also include management of descriptive information about each customer and how and who can access and modify this descriptive information.
[0148] 33 illustrates an exemplary computer system 3300 upon which various embodiments of the present invention may be implemented. System 3300 may be used to implement any of the computer systems described above. As shown in the figure, computer system 3300 includes a processing unit 3304 that communicates with multiple peripheral subsystems via a bus subsystem 3302. These peripheral subsystems may include a processing acceleration unit 3306, an input / output subsystem 3308, a storage subsystem 3318, and a communications subsystem 3324. The storage subsystem 3318 may include a tangible computer-readable storage medium 3322 and a system memory 3310.
[0149] Bus subsystem 3302 provides a mechanism for allowing the various components and subsystems of computer system 3300 to communicate with each other in an organized manner. While bus subsystem 3302 is shown schematically as a bus, alternative embodiments of the bus subsystem may utilize multiple buses. Bus subsystem 3302 may be any of several types of bus structures including a memory bus or memory controller, a peripheral bus, and a local bus using any of a variety of bus architectures. For example, such architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) local bus, and I It can be implemented as a Mezzanine bus manufactured in accordance with the IEEE P1386.1 standard. The PCI bus may include a Peripheral Component Interconnect (PCI) bus.
[0150] Processing unit 3304, which may be implemented as one or more integrated circuits (e.g., conventional microprocessors or microcontrollers), controls the operation of computer system 3300. One or more processors may be included in processing unit 3304. These processors may include single-core or multi-core processors. In particular embodiments, processing unit 3304 may be implemented as one or more independent processing units 3332 and / or 3334, with single or multi-core processors included in each processing unit. In other embodiments, processing unit 3304 may also be implemented as a quad-core processing unit formed by integrating two dual-core processors into one chip.
[0151] In various embodiments, the processing unit 3304 may execute various programs according to program code and may manage multiple programs or processes running simultaneously. At any given time, some or all of the program code to be executed may reside in the processor 3304 and / or the memory subsystem 3318. Through appropriate programming, the processor 3304 may provide the various functions described above. The computer system 3300 may further include a processing acceleration unit 3306, which may include a digital signal processor (DSP), a special purpose processor, and / or the like.
[0152] The input / output subsystem 3308 may include user interface input devices and user interface output devices, such as a keyboard, a pointing device such as a mouse or trackball, a touchpad or touchscreen integrated into a display, a scroll wheel, a click wheel, dials, buttons, switches, a keypad, and voice input with a voice command recognition system. The user interface input devices may include, for example, a motion sensing and / or gesture recognition device, such as a Microsoft Kinect® motion sensor in a Microsoft Xbox® 360 game controller, that allows a user to control and interact with the input device through a natural user interface using gestures and speech commands. The user interface input devices may also detect a user's eye activity (e.g., "blinking" while taking a picture and / or selecting a menu) and translate eye gestures into input to an input device (e.g., Google Glass®). In addition, the user interface input devices may include a voice recognition sensing device that allows a user to interact with a voice recognition system (e.g., the Siri® navigator) through voice commands.
[0153] User interface input devices may also include, but are not limited to, audio / visual devices such as three-dimensional (3D) mice, joysticks or pointing sticks, gamepads and graphics tablets, and speakers, digital cameras, digital camcorders, portable media players, webcams, image scanners, fingerprint scanners, barcode readers, 3D scanners, 3D printers, laser ranging devices, and eye-tracking devices. In addition, user interface input devices may include medical imaging input devices, such as, for example, computed tomography (CT) scanners, magnetic resonance imaging (MRI) scanners, positron emission tomography (PET) scanners, medical ultrasound scanners, etc. User interface input devices may also include audio input devices, such as, for example, MIDI keyboards, digital musical instruments, etc.
[0154] User interface output devices may include a display subsystem, indicator lights, or non-visual displays such as audio output devices. The display subsystem may be a flat panel device such as one using a cathode ray tube (CRT), liquid crystal display (LCD), or plasma display, a projection device, a touch screen, etc. In general, the use of the term "output device" is intended to include all possible types of devices and mechanisms for outputting information from computer system 3300 to a user or to another computer. For example, user interface output devices may include various display devices that visually convey text, graphics, and audio / video information, such as, but not limited to, monitors, printers, speakers, headphones, car navigation systems, plotters, audio output devices, and modems.
[0155] Computer system 3300 may include a storage subsystem 3318 that includes software elements currently shown as residing in system memory 3310. System memory 3310 may store program instructions loadable onto and executable on processing unit 3304, as well as data generated during the execution of these programs.
[0156] Depending on the configuration and type of computer system 3300, the system memory 3310 may be volatile (e.g., random access memory (RAM)) and / or non-volatile (e.g., read-only memory (ROM), flash memory, etc.). Typically, RAM contains data and / or program modules that are immediately accessible to and / or currently being operated on and executed by the processing unit 3304. In some implementations, the system memory 3310 may include multiple different types of memory, such as static random access memory (SRAM) or dynamic random access memory (DRAM). In some implementations, the system memory 3310 may be configured to store data and / or program modules ...), for example, during startup of the computer. A basic input / output system (BIOS), containing the basic routines that help to transfer information between elements within system 3300, is typically stored in ROM. By way of example, and not limitation, system memory 3310 also represents application programs 3312, which may include client applications, a web browser, mid-tier applications, a relational database management system (RDBMS), etc., program data 3314, and operating system 3316. By way of example, operating system 3316 may be any of various versions of Microsoft Windows®, Apple Macintosh®, and / or Linux® operating systems, market The operating systems may include various UNIX or UNIX-like operating systems available in the market (including, but not limited to, various GNU / Linux operating systems, Google Chrome OS, etc.), and / or mobile operating systems such as iOS, Windows Phone, Android OS, BlackBerry 10 OS, and Palm OS operating systems.
[0157] The storage subsystem 3318 may also provide a tangible computer-readable storage medium for storing the basic programming and data constructs that provide the functionality of some embodiments. Software (programs, code modules, instructions) that, when executed by a processor, perform the functions described above may be stored in the storage subsystem 3318. These software modules or instructions may be executed by the processing unit 3304. The storage subsystem 3318 may also provide a repository for storing data used in accordance with the present invention.
[0158] Storage subsystem 3318 may also include computer readable storage medium reader 3320 that may further connect to computer readable storage medium 3322. Along with system memory 3310, and optionally in combination with system memory 3310, computer readable storage medium 3322 may comprehensively represent remote, local, fixed, and / or removable storage devices plus storage media for containing, storing, transmitting, and retrieving computer readable information temporarily and / or more permanently.
[0159] The computer-readable storage medium 3322 containing the code or portions of code may also include any suitable medium known or used in the art, including, but not limited to, storage and communication media, such as volatile and nonvolatile, removable and non-removable media, implemented in any method or technology for storing and / or transmitting information. This may include tangible computer-readable storage media, such as RAM, ROM, Electronically Erasable Programmable ROM (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage device, or other tangible computer-readable medium. It may also include non-tangible computer-readable media, such as data signals, data transmission, or any other medium that can be used to transmit the desired information and that can be accessed by the computing system 3300.
[0160] By way of example, computer-readable storage medium 3322 may include a hard disk drive that reads from and writes to non-removable, non-volatile magnetic media, a magnetic disk drive that reads from and writes to a removable, non-volatile magnetic disk, and a CD-ROM, DVD, Blu-Ray® disk, or other optical The computer readable storage medium 3322 may include, but is not limited to, a removable non-volatile optical disk drive, such as a Zip drive, a flash memory card, a Universal Serial Bus drive, a USB flash ... The computer-readable storage media 3322 may include USB flash drives, Secure Digital (SD) cards, DVD disks, digital video tapes, etc. The computer-readable storage media 3322 may also include non-volatile memory-based solid-state drives (SSDs) such as flash memory-based SSDs, enterprise flash drives, solid-state ROM, etc., volatile memory-based SSDs such as solid-state RAM, dynamic RAM, static RAM, etc., DRAM-based SSDs, magnetoresistive RAM (MRAM) SSDs, and hybrid SSDs using a combination of DRAM and flash memory-based SSDs. The disk drives and their associated computer-readable media may provide non-volatile storage of computer-readable instructions, data structures, program modules, and other data for the computer system 3300.
[0161] The communications subsystem 3324 provides an interface to other computer systems and networks. The communications subsystem 3324 serves as an interface for receiving data from other systems and transmitting data from the computer system 3300 to other systems. For example, the communications subsystem 3324 allows the computer system 3300 to connect to one or more devices via the Internet. In some embodiments, the communications subsystem 3324 may include a radio frequency (RF) transceiver component for accessing wireless voice and / or data networks (e.g., using cellular technology, advanced data network technologies such as 3G, 4G, or EDGE (enhanced data rates for global evolution), Wi-Fi (IEEE 802.11 family of standards, or other mobile communications technologies, or any combination thereof), a global positioning system (GPS) receiver component, and / or other components. In some embodiments, the communications subsystem 3324 may provide wired network connectivity (e.g., Ethernet) in addition to or instead of a wireless interface.
[0162] In some embodiments, the communications subsystem 3324 may also receive incoming communications in the form of structured and / or unstructured data feeds 3326, event streams 3328, event updates 3330, etc., on behalf of one or more users who may be using the computer system 3300.
[0163] For example, the communication subsystem 3324 may provide a Twitter feed, Facebook feed, Registered Trademark) updates, web feeds such as Rich Site Summary (RSS) feeds, and / or may be configured to receive data feeds 3326 in real time from users of social networks and / or other communication services, such as real-time updates from one or more third party sources.
[0164] Additionally, the communications subsystem 3324 may be configured to receive data in the form of a continuous data stream, which may include an event stream 3328 of real-time events and / or event updates 3330, which may be continuous or infinite in nature with no apparent end. Examples of applications that generate continuous data may include, for example, sensor data applications, financial tickers, network performance measurement tools (e.g., network monitoring and traffic management applications), clickstream analysis tools, automobile traffic monitoring, etc.
[0165] The communications subsystem 3324 may also be configured to output structured and / or unstructured data feeds 3326, event streams 3328, event updates 3330, etc. to one or more databases that may communicate with one or more streaming data source computers coupled to the computer system 3300.
[0166] The computer system 3300 may be one of a variety of types, including a handheld portable device (e.g., an iPhone® mobile phone, an iPad® computing tablet, a PDA), a wearable device (e.g., a Google Glass® head-mounted display), a PC, a workstation, a mainframe, a kiosk, a server rack, or any other data processing system.
[0167] Due to the ever-changing nature of computers and networks, the description of computer system 3300 shown in the drawings is intended as a specific example only. Many other configurations are possible having more or fewer components than the system shown in the drawings. For example, customized hardware may be used and / or particular elements may be implemented in hardware, firmware, software (including applets), or a combination. Furthermore, connections to other computing devices, such as network input / output devices, may be used. Based on the disclosure and teachings provided herein, one of ordinary skill in the art will recognize other ways and / or methods for implementing various embodiments.
[0168] In the foregoing description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of various embodiments of the present invention. However, it will be apparent to one skilled in the art that embodiments of the present invention may be practiced without some of these specific details. In other instances, well-known structures and devices are shown in block diagram form.
[0169] The foregoing description provides only exemplary embodiments and is not intended to limit the scope, applicability, or configuration of the present disclosure. Rather, the foregoing description of exemplary embodiments will provide those skilled in the art with an enabling description for implementing the exemplary embodiments. It should be understood that various changes can be made in the function and arrangement of elements without departing from the spirit and scope of the invention as set forth in the following claims.
[0170] In the above description, specific details are provided to provide a thorough understanding of the embodiments. However, those skilled in the art will understand that the embodiments may be practiced without these specific details. For example, circuits, systems, networks, processes, and other components may be shown as components in block diagram form so as not to obscure the embodiments in unnecessary detail. In other instances, well-known circuits, processes, algorithms, structures, and techniques may be shown without unnecessary detail to avoid obscuring the embodiments.
[0171] It is also noted that particular embodiments may be described as a process that is depicted as a flowchart, a flow diagram, a data flow diagram, a structure diagram, or a block diagram. While a flowchart may describe operations as a sequential process, many of the operations may be performed in parallel or simultaneously. In addition, the order of operations may be rearranged. A process terminates when its operations are completed, but may have additional steps not included in the diagram. A process may correspond to a method, a function, a procedure, a subroutine, a subprogram, etc. When a process corresponds to a function, its termination may correspond to a return of the function to the calling function or the main function.
[0172] The term "computer-readable medium" includes, but is not limited to, portable or fixed storage devices, optical storage devices, wireless channels, and various other media that can store, contain, or retain instructions and / or data. A code segment or machine-executable instruction can be a procedure, a function, a subprogram, a program, a routine, a subroutine, a module, a software package, a class, or a combination of instructions, data, and the like. A code segment may represent any combination of a program structure, a program structure, or program statements. A code segment may be coupled to another code segment or a hardware circuit by passing and / or receiving information, data, arguments, parameters, or memory contents. Information, arguments, parameters, data, etc. can be passed, forwarded, or transmitted via any suitable means including memory sharing, message passing, token passing, network transmission, etc.
[0173] Furthermore, embodiments may be implemented in hardware, software, firmware, middleware, microcode, hardware description languages, or any combination thereof. When implemented in software, firmware, middleware, or microcode, the program code or code segments to perform the necessary tasks may be stored on a machine-readable medium. A processor(s) may perform the necessary tasks.
[0174] While the foregoing specification describes aspects of the invention with reference to specific embodiments thereof, those skilled in the art will recognize that the invention is not limited to these embodiments. Various features and aspects of the invention may be used individually or together. Moreover, embodiments may be utilized in any number of environments and applications beyond those described herein without departing from the broader spirit and scope of the specification. Accordingly, the specification and drawings should be regarded as illustrative rather than restrictive.
[0175] Additionally, for purposes of explanation, the methods are described in a particular order. It should be understood that in alternative embodiments, the methods may be performed in an order different from that described. It should also be understood that the methods may be performed by hardware components or embodied in a sequence of machine-executable instructions. Machine-executable instructions can be used to cause a machine, such as a general-purpose or special-purpose processor or logic circuit programmed with the instructions, to perform the method. These machine-executable instructions may be stored on one or more machine-readable media, such as a CD-ROM or other type of optical disk, floppy disk, ROM, RAM, EPROM, EEPROM, magnetic or optical card, flash memory, or any other type of machine-readable medium suitable for storing electronic instructions. Alternatively, the methods may be performed by a combination of hardware and software.
Claims
1. 1. A method for rebalancing container pod usage in a container environment, the method comprising: deploying a plurality of container pods to a plurality of container nodes in a container environment; each of the plurality of container pods includes one or more services; each of the plurality of container nodes includes one or more container pods; The plurality of container pods are deployed to the plurality of container nodes based on an initial characterization of a usage factor for each of the plurality of container pods, the method further comprising: logging an actual usage factor for each of the plurality of container pods with a timestamp after deployment to the plurality of container nodes; identifying one or more container pods among the plurality of container pods that deviate from an initial characterization of their usage factor; redistributing the one or more container pods among the plurality of container nodes based on the actual usage factor; determining that a rate of increase of at least one of the actual usage factors of a first container pod exceeds a first threshold for a predetermined period of time; instantiating a clone of the first container pod on a different container node in response to determining that a rate of increase of at least one of the actual usage factors of the first container pod exceeds the first threshold for a predetermined period of time; determining that a rate of increase of at least one of the actual usage factors of the first container pod exceeds a second threshold; In response to determining that a rate of increase of at least one of the actual usage factors of the first container pod exceeds the second threshold, routing request traffic from the first container pod to a clone of the first container pod on the different container node.
2. the usage factor includes a CPU usage factor; or the usage factor comprises a bandwidth usage factor; or The method of claim 1 , wherein the usage factor comprises a memory usage factor.
3. The method further comprises:
3. The method of claim 1, further comprising: in response to detecting a decrease in a rate of increase of at least one of the actual usage factors of the first container pod, shifting the request traffic from a clone of the first container pod on the different container node back to the first container pod.
4. 1. A program comprising instructions that, when executed by one or more processors, cause the one or more processors to perform operations, the operations comprising: deploying a plurality of container pods to a plurality of container nodes in a container environment; each of the plurality of container pods includes one or more services; each of the plurality of container nodes includes one or more container pods; The plurality of container pods are deployed to the plurality of container nodes based on an initial characterization of a usage factor for each of the plurality of container pods, and the operation further comprises: logging an actual usage factor for each of the plurality of container pods with a timestamp after deployment to the plurality of container nodes; identifying one or more container pods among the plurality of container pods that deviate from an initial characterization of their usage factor; redistributing the one or more container pods among the plurality of container nodes based on the actual usage factor; determining that a rate of increase of at least one of the actual usage factors of a first container pod exceeds a first threshold for a predetermined period of time; In response to determining that a rate of increase of at least one of the actual usage factors of a first container pod exceeds the first threshold for a predetermined period of time, instantiating a clone of the first container pod on a different container node; determining that a rate of increase of at least one of the actual usage factors of the first container pod exceeds a second threshold; In response to determining that a rate of increase of at least one of the actual usage factors of the first container pod exceeds the second threshold, routing request traffic from the first container pod to a clone of the first container pod on the different container node.
5. 5. The program of claim 4, wherein redistributing the one or more container pods to the plurality of container nodes based on the actual usage factors comprises distributing the one or more container pods using a weighted combination of a plurality of the usage factors.
6. The program of claim 4 , wherein the clone of the first container pod is warmed up, but request traffic is not routed to the clone of the first container pod.
7. 5. The program of claim 4, wherein exceeding the first threshold indicates that the actual usage factor of the first container pod has a trajectory that exceeds an initial characterization of the usage factor of the first container pod.
8. 8. The program of claim 4 or 7, wherein exceeding the second threshold indicates that the actual usage factor of the first container pod has a trajectory that causes the actual usage factor of a container node that includes the first container pod to exceed a usage factor limit for the first container pod.
9. the one or more container pods are redistributed among the plurality of container nodes by an API registry; The API registry includes: Services being developed in an integrated development environment (IDE), The program according to claim 4 , wherein a service already deployed in the container environment can be used.
10. The operation further comprises:
10. The program of claim 4, further comprising: in response to detecting a decrease in a rate of increase of at least one of the actual usage factors of the first container pod, shifting the request traffic from a clone of the first container pod on the different container node back to the first container pod.
11. one or more processors; one or more memory devices, the one or more memory devices containing instructions that, when executed by the one or more processors, cause the one or more processors to perform operations, the operations comprising: deploying a plurality of container pods to a plurality of container nodes in a container environment; each of the plurality of container pods includes one or more services; each of the plurality of container nodes includes one or more container pods; The plurality of container pods are deployed to the plurality of container nodes based on an initial characterization of a usage factor for each of the plurality of container pods, and the operation further comprises: logging an actual usage factor for each of the plurality of container pods with a timestamp after deployment to the plurality of container nodes; identifying one or more container pods among the plurality of container pods that deviate from an initial characterization of their usage factor; redistributing the one or more container pods among the plurality of container nodes based on the actual usage factor; determining that a rate of increase of at least one of the actual usage factors of a first container pod exceeds a first threshold for a predetermined period of time; instantiating a clone of the first container pod on a different container node in response to determining that a rate of increase of at least one of the actual usage factors of the first container pod exceeds the first threshold for a predetermined period of time; determining that a rate of increase of at least one of the actual usage factors of the first container pod exceeds a second threshold; In response to determining that the rate of increase of at least one of the actual usage factors of the first container pod exceeds the second threshold, routing request traffic from the first container pod to a clone of the first container pod on the different container node.
12. The system of claim 11 , wherein the one or more container pods are redistributed among the plurality of container nodes by a container platform scheduler.
13. The system of claim 11 , wherein the one or more container pods are redistributed among the plurality of container nodes by an API registry.
14. The system of claim 13 , wherein the API registry is deployed as a service encapsulated in a container in the container environment.
15. The API registry includes: Services being developed in an integrated development environment (IDE), The system according to claim 13 or 14, wherein services already deployed in the container environment can be used.
16. The system of claim 13 , wherein the API registry maps service endpoints of the plurality of container pods to one or more API functions.
17. The operation further comprises:
17. The system of claim 11, further comprising: in response to detecting a decrease in the rate of increase of at least one of the actual usage factors of the first container pod, shifting the request traffic from a clone of the first container pod on the different container node back to the first container pod.
18. A program for causing a computer to execute the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Automatic power control policy based on application-specific redundancy characteristics
JP2006508445A
Information processing device
JP2012037935A
Distributed processing system and program
JP2014197340A
Abstraction method of performance of server in it system and resource management method
JP2015225524A
Computer system and container management method
JP2017037403A