Traffic distribution method, device, system and storage medium
By designing the data processing system in a serverless architecture and using activation, storage queue, expansion and scheduling components for balanced traffic distribution, the problem of uneven traffic distribution in the serverless architecture is solved and resource utilization and request processing efficiency are improved.
Patent Information
- Application Number
- CN202010038309.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-01-14
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2040-01-14
AI Technical Summary
The existing serverless architecture leads to uneven traffic distribution during the autonomous expansion process, resulting in resource waste and request processing delays.
A data processing system is designed, including an activation component, a storage queue, an expansion component, and a scheduling component. By storing requests and balancing them after the container group is successfully expanded, it ensures that the number of requests assigned to each container group does not exceed what it can handle. The number of concurrent requests avoids assigning requests to container groups that are successfully expanded later to container groups that are successfully expanded first.
It achieves balanced distribution of traffic, improves resource utilization, reduces resource waste and request processing delays, and especially improves the resource utilization of container groups that have been successfully expanded.
Smart Images

Figure CN113190324B
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a traffic distribution method, device, system and storage medium. Background Art
[0002] The serverless architecture can automatically implement backend tasks related to virtual machines (VMs) and containers. For example, it can independently implement application load balancing and autonomous capacity expansion. Therefore, users do not need to worry about how the backend supports service operation, but only need to implement the service itself, thereby improving development efficiency.
[0003] However, the way existing serverless architecture distributes traffic during autonomous expansion can easily lead to uneven traffic distribution, resulting in a waste of resources. Summary of the invention
[0004] Multiple aspects of the present application provide a traffic distribution method, device, system and storage medium to achieve balanced traffic distribution, thereby helping to improve resource utilization.
[0005] The embodiment of the present application provides a data processing system, including: an activation component, a storage queue, a capacity expansion component and a scheduling component;
[0006] The activation component is used to receive a plurality of first requests and store the plurality of first requests in the storage queue;
[0007] The expansion component is used to expand the container group according to the multiple first requests to expand at least one first container group;
[0008] The scheduling component is used to allocate the multiple first requests in the storage queue to the at least one first container group with the goal that the number of first requests allocated to each first container group is not greater than the number of concurrent requests that can be processed by the first container group.
[0009] The embodiment of the present application also provides a data processing system, including: an activation component, a storage queue, a capacity expansion component, a scheduling component and a load balancing component;
[0010] The activation component is configured to receive a plurality of first requests and a second request during the expansion of at least one first container group, and store the plurality of first requests and the second request in the storage queue;
[0011] The at least one first container group is expanded by the expansion component in response to the multiple first requests;
[0012] The scheduling component is used to allocate the multiple first requests in the storage queue to the at least one first container group during the expansion process of the at least one first container group;
[0013] The load balancing component is used to balance the second requests in the storage queue among the at least one first container group after the at least one first container group is successfully expanded.
[0014] The present application also provides a flow distribution method, including:
[0015] receiving a plurality of first requests, and storing the plurality of first requests in a storage queue;
[0016] Expanding the container group for the multiple first requests to expand at least one first container group;
[0017] With the goal that the number of first requests allocated to each first container group is not greater than the number of concurrent requests that can be processed by the first container group, multiple first requests in the storage queue are allocated to the at least one first container group.
[0018] The present application also provides a flow distribution method, including:
[0019] storing the received multiple first requests into a storage queue;
[0020] Expanding the container group for the multiple first requests to expand at least one first container group;
[0021] During the expansion of the at least one first container group, allocating the plurality of first requests in the storage queue to the at least one first container group; and
[0022] storing the second request received during the expansion of the at least one first container group in a storage queue;
[0023] After the capacity of the at least one first container group is successfully expanded, the second requests in the storage queue are balanced among the at least one first container group.
[0024] The embodiment of the present application also provides a computer device, including: a memory, a processor, and a communication component; wherein the memory is used to store a computer program;
[0025] The processor is coupled to the memory and is configured to execute the computer program for:
[0026] receiving a plurality of first requests through the communication component, and storing the plurality of first requests in a storage queue;
[0027] Expanding the container group for the multiple first requests to expand at least one first container group;
[0028] With the goal that the number of first requests allocated to each first container group is not greater than the number of concurrent requests that can be processed by the first container group, multiple first requests in the storage queue are allocated to the at least one first container group.
[0029] The embodiment of the present application also provides a computer device, including: a memory, a processor, and a communication component; wherein the memory is used to store a computer program;
[0030] The processor is coupled to the memory and is configured to execute the computer program for:
[0031] storing the plurality of first requests received by the communication component into a storage queue;
[0032] Expanding the container group for the multiple first requests to expand at least one first container group;
[0033] During the expansion of the at least one first container group, allocating the plurality of first requests in the storage queue to the at least one first container group; and
[0034] storing, in a storage queue, a second request received by the communication component during the process of expanding the at least one first container group;
[0035] After the at least one first container group is successfully expanded, the second requests in the storage queue are balanced among the at least one first container group.
[0036] An embodiment of the present application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the above methods.
[0037] In an embodiment of the present application, the data processing system includes: an activation component, a storage queue, an expansion component, and a scheduling component; wherein the activation component can store multiple requests received in the storage queue; the expansion component can expand the container group for multiple requests to obtain at least one container group; further, the scheduling component can allocate multiple requests in the storage queue to at least one container group with the goal that the number of requests allocated to each container group is not greater than the number of concurrent requests it can process, so that each container group can be allocated a corresponding number of requests. The serverless system provided in the embodiment of the present application will not allocate the requests that should be allocated to the container group that has successfully expanded later to the container group that has successfully expanded first, thereby achieving traffic balance between container groups, which helps to improve resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0039] Figure 1a A schematic diagram of the structure of a data processing system provided in an embodiment of the present application;
[0040] Figure 1b A schematic diagram of the structure of another data processing system provided in an embodiment of the present application;
[0041] Figure 1c A structural diagram of another data processing system provided in an embodiment of the present application;
[0042] Figure 2a A flow chart of a flow distribution method provided in an embodiment of the present application;
[0043] Figure 2b A flow chart of another flow distribution method provided in an embodiment of the present application;
[0044] Figure 3 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0046] In response to the technical problems of uneven traffic distribution and low resource utilization in existing serverless systems, a data processing system is provided in some embodiments of the present application, which includes: an activation component, a storage queue, an expansion component and a scheduling component. Among them, the activation component can store multiple requests received in the storage queue; the expansion component can expand the container group for multiple requests to obtain at least one container group; further, the scheduling component can allocate multiple requests in the storage queue to at least one container group with the goal that the number of requests allocated to each container group is not greater than the number of concurrent requests it can process, so that each container group can be allocated a corresponding number of requests. The serverless system provided in the embodiment of the present application will not allocate the requests that should be allocated to the container group that has successfully expanded later to the container group that has successfully expanded first, thereby achieving traffic balance between container groups, which helps to improve resource utilization.
[0047] For the data processing architecture system, the corresponding number of container groups can be expanded according to the received request. In the embodiment of the present application, the expansion process of the container group not only includes the creation process of the container group from scratch, but also includes the health check process of the container group after the creation is completed, that is, the expansion process of the container group includes the process of the container group being in a usable state (ready state). Accordingly, the successful expansion of the container group means that the container group reaches the ready state.
[0048] Optionally, if there are multiple container groups, multiple container groups can be expanded in parallel or in series. However, even if multiple first container groups are expanded in parallel, the expansion rate of each first container group will be different, which will result in multiple first container groups not being able to be successfully expanded at the same time.
[0049] In the prior art, during the expansion of a container group, the requests that should be allocated to the container group that successfully expanded later are often allocated to the container group that successfully expanded first, resulting in a waste of resources of the container group that successfully expanded later. On the other hand, for the container group that successfully expanded first, the number of requests actually received exceeds the number of concurrent requests that it can handle, which will also cause delays or exceptions in the processing of some requests. For example, assuming that the number of requests is 300 and the number of concurrent requests that each container group can handle is 100, the number of container groups that need to be expanded is 3. Further, assuming that two container groups successfully expanded first, 100 requests will be allocated to the container group that successfully expanded first. Before the last container group is successfully expanded, if the two container groups that successfully expanded first are known to have processed a part of the requests, the traffic that should be allocated to the last container group will be allocated to the two container groups that successfully expanded first, resulting in the number of requests allocated to the last container group that successfully expanded is less than 100, or even no requests can be allocated, resulting in a waste of resources of the last container group that successfully expanded.
[0050] In order to solve the above technical problems, the embodiments of the present application provide a new serverless system architecture. The technical solutions provided by the embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0051] Figure 1a This is a schematic diagram of the structure of a data processing system provided in an embodiment of the present application. In some embodiments, the data processing system provided in this embodiment may also be referred to as a serverless system. Figure 1a As shown, the data processing system includes: an activation component 11, a storage queue 12, a capacity expansion component 13 and a scheduling component 14.
[0052] In this embodiment, the activation component 11, storage queue 12, capacity expansion component 13 and scheduling component 14 can be software modules, applications, services or a physical device with corresponding functions. The activation component 11, storage queue 12, capacity expansion component 13 and scheduling component 14 can be deployed on different physical machines, or in different containers or virtual machines (VM). Of course, these containers or virtual machines can be deployed on the same physical machine or on multiple different physical machines. Optionally, for the case where the activation component 11, storage queue 12, capacity expansion component 13 and scheduling component 14 are located on different physical machines, these physical machines need to be in the same data processing system cluster.
[0053] The physical machine may be a single server device, a cloud server array, or a VM running in a cloud server array. In addition, the physical machine may also refer to other computing devices with corresponding service capabilities, such as computers and other terminal devices (running service programs).
[0054] Optionally, different physical machines may be connected wirelessly or by wire. For example, different physical machines may be connected by network cables or communication optical fibers. Alternatively, different physical machines may be connected by mobile network communication. Accordingly, the network standard of the mobile network may be any one of 2G (GSM), 2.5G (GPRS), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4G+ (LTE+), 5G, WiMax, etc. Optionally, different physical machines may also be connected by communication via Bluetooth, WiFi, infrared, virtual private cloud (VPC) or remote direct memory access (RDMA).
[0055] In this embodiment, the activation component 11 may receive a request. The request may be a network request, such as an http request, etc., but is not limited thereto. Optionally, the activation component 11 may receive a request when the number of instances of the container group in the background of the data processing system is 0. Alternatively, in some embodiments, the activation component 11 may also receive a request when the container groups in the background of the data processing system are all working at full capacity. The full capacity of the container group means that the data of the request processed by the container group at the current moment reaches the number of concurrent requests that it can process.
[0056] For the convenience of description and distinction, in the embodiment of the present application, the request received by the activation component 11 when the number of instances of the container group in the background of the data processing system is 0 or the container groups are all working at full capacity is defined as the first request. Among them, the number of first requests can be 1 or more. Multiple means 2 or more. For the case where the first request is 1, since the traffic distribution mechanism is relatively simple, it is not described in this embodiment. Therefore, in the embodiment of the present application, the balanced distribution of multiple first requests by the data processing system is mainly described.
[0057] like Figure 1a As shown, in this embodiment, the activation component 11 can also store the received multiple first requests in the storage queue 12. Correspondingly, the expansion component 13 can expand the container group for multiple first requests, and then expand at least one container group. In the embodiment of the present application, for the convenience of description and distinction, the container group expanded at this stage is defined as the first container group. Among them, the number of first container groups can be 1 or more, and its specific value is determined by the number of first requests. In some embodiments, the container group can be implemented as a Pod, wherein the Pod contains one or more containers.
[0058] Optionally, the expansion component 13 may determine the number of container groups M according to the number of the multiple first requests and the number of concurrent requests that each container group can process. Wherein, M is a positive integer, and its specific value is determined by the number of first requests and the number of concurrent requests that each container group can process. Further, the expansion component 13 may expand the container group according to the number of container groups M to obtain M first container groups.
[0059] In practical applications, if the number of the first requests is an integer multiple of the number of concurrent requests that can be processed by each container group, then M is equal to the result of dividing the two. If the number of the first requests is not an integer multiple of the number of concurrent requests that can be processed by each container group, then the result of dividing the two can be rounded up as the value of M.
[0060] Optionally, if there are multiple first container groups, the expansion component 13 may expand the multiple first container groups in parallel or in series.
[0061] Further, the scheduling component 14 can allocate the multiple first requests stored in the storage queue 12 to at least one first container group. The number of first requests allocated to each first container group is not greater than (less than or equal to) the number of concurrent requests that it can process. That is, the scheduling component 14 can allocate the multiple first requests stored in the storage queue 12 to at least one first container group with the goal of ensuring that the number of first requests allocated to each first container group is not greater than the number of concurrent requests that it can process. The number of first requests allocated to each first container group can be the same or different, but both are less than or equal to the number of concurrent requests that the first container group can process.
[0062] In the embodiment of the present application, the number of concurrent requests that can be processed by each first container group can be the same or different. In the embodiment of the present application, the number of concurrent requests that can be processed by each first container group is not limited, and can be set by the user or by the developer of the data processing system, but is not limited thereto.
[0063] Optionally, in an embodiment of the present application, the scheduling component 14 may allocate the first request in real time during the expansion of the container group, that is, each time a first container group is successfully expanded, the first number of requests that will not be greater than the number of concurrent requests that can be processed by the first container group that has been successfully expanded is retrieved from the storage queue 12, and the retrieved number of first requests is allocated to the first container group that has been successfully expanded. For example, assuming that the first container group that has been successfully expanded is the first container group 2, and the number of concurrent requests that can be processed by the first container group 2 is S, where S is a positive integer, the scheduling component 14 may retrieve R (R≤S, and R is a positive integer) first requests from the storage queue 12 when the first container group 2 is successfully expanded, and allocate these R first requests to the first container group 2.
[0064] Alternatively, the scheduling component 14 may evenly distribute the multiple first requests among at least one first container group after the capacity of at least one first container group is successfully expanded, and the total number of first requests allocated to each first container group is less than or equal to the number of concurrent requests that it can process.
[0065] The data processing system provided by the embodiment of the present application includes: an activation component, a storage queue, an expansion component and a scheduling component; wherein the activation component can store multiple requests received in the storage queue; the expansion component can expand the container group for multiple requests to obtain at least one container group; further, the scheduling component can allocate multiple requests in the storage queue to at least one container group with the goal that the number of requests allocated to each container group is not greater than the number of concurrent requests it can process, so that each container group can be allocated a corresponding number of requests. The data processing system provided by the present embodiment will not allocate the requests that should be allocated to the container group that has successfully expanded later to the container group that has successfully expanded first, thereby achieving traffic balance between container groups, which helps to improve resource utilization, especially helps to improve the resource utilization of the container group that has successfully expanded later.
[0066] For example, assuming that the number of first requests is 300 and the number of concurrent requests that each container group can process is 100, the number of first container groups that need to be expanded is 3. Further, assuming that two container groups are successfully expanded first, the scheduling component 14 allocates 100 requests to the first container group that is successfully expanded first. Before the last first container group is successfully expanded, even if the two first container groups that are successfully expanded first are known to have processed a part of the requests, the scheduling component 14 will not allocate the traffic that should be allocated to the last container group to the two container groups that are successfully expanded first. Instead, after the last container group is successfully expanded, the scheduling component 14 retrieves the remaining 100 first requests from the storage queue 12 and allocates these 100 requests to the container group that is successfully expanded last. This can achieve traffic balance between container groups, help improve resource utilization, and especially help improve resource utilization of container groups that are successfully expanded later.
[0067] In the embodiment of the present application, the scheduling component 14 can monitor the status of the currently expanded container group, and when the currently expanded container group is successfully expanded, retrieve the corresponding number of first requests from the storage queue 12, and allocate the corresponding number of first requests to the currently expanded container group. In order to facilitate description and distinction, the currently successfully expanded first container group is defined as the first target container group. In this embodiment, the corresponding number is less than or equal to the number of concurrent requests that can be processed by the first target container group.
[0068] Optionally, in this embodiment, the number of first requests that can be processed by each first container group can be set, and the number is defined as a set number. The set number is less than or equal to the number of concurrent requests that can be processed by the first target container group. In actual applications, the number of first requests received by the activation component 11 may not be an integer multiple of the set number. In this case, for the last first container group that successfully expands, the first request allocated to it is less than the set number.
[0069] Based on the above analysis, if when the first target container group is monitored to be successfully expanded, the total number of the first container groups that are successfully expanded is less than M, that is, the first target container group is not the last container group that is successfully expanded in at least one first container group, then the scheduling component 14 can call the set number of first requests from the storage queue 12. Correspondingly, when the first target container group is monitored to be successfully expanded, the total number of the first container groups that are successfully expanded is equal to M, that is, the first target container group is the last container group that is successfully expanded in at least one first container group, then the scheduling component 14 can call the remaining first requests from the storage queue 12 and allocate the remaining first requests to the first target container group. Among them, the number of remaining first requests is less than or equal to the set number. In actual applications, if the number of first requests received by the activation component 11 is an integer multiple of the set number, the number of remaining first requests is equal to the set number; if the number of first requests received by the activation component 11 is not an integer multiple of the set number, the number of remaining first requests is less than the set number.
[0070] In some embodiments, Figure 1b As shown, the data processing system also includes: an access endpoint control component 15. Among them, the access endpoint control component 15 can write the IP address of the first target container group to the access endpoint when the first target container group is successfully expanded. Correspondingly, the scheduling component 14 can detect whether a new IP address is added to the access endpoint. If it is detected that a new IP address is added to the access endpoint, it is determined that the first target container group is successfully expanded, and the newly added IP address is the IP address of the first target container group. Further, the scheduling component 14 can allocate the corresponding number of first requests retrieved above to the first target container group corresponding to the newly added IP address. From the above analysis, it can be seen that if the first target container group is the last container group successfully expanded among the M first container groups, the corresponding number is equal to the number of first requests remaining in the storage queue 12; if the first target container group is not the last container group successfully expanded among the M first container groups, the corresponding number is equal to the above set number.
[0071] In the embodiment of the present application, the activation component 11 can receive requests not only when the container group instance in the background of the data processing system is 0, but also when the number of container group instances is expanded from 0 to M. In the embodiment of the present application, for the convenience of description and distinction, the request received by the activation component 11 during the expansion of at least one first container group is defined as a second request. The number of second requests can be 1 or more.
[0072] Accordingly, the activation component 11 may receive a second request during the expansion of at least one first container group, and store the second request in the storage queue 12. For the second request, the data processing system provided by the embodiment of the present application will no longer expand the container group for the second request. Based on this, a new scheduling mechanism may be introduced for the scheduling of the second request, using Figure 1b The load balancing component (Service) 16 shown performs traffic balancing. In this embodiment, for the convenience of description and distinction, the scheduling of the first request is defined as primary scheduling; and the scheduling of the second request is defined as secondary scheduling. Accordingly, the data processing system provided in this embodiment can enter the secondary scheduling mode after successfully expanding the capacity of at least one first container group.
[0073] Accordingly, after successfully expanding the capacity of at least one of the above-mentioned first container groups, the load balancing component 16 can evenly distribute the second requests in the storage queue 12 among at least one of the first container groups, with the goal that the number of requests currently processed by each first container group is not greater than the number of concurrent requests that it can process. Optionally, at different stages, the requests currently processed by the first container group may all be first requests; or may be partly first requests and partly second requests; or all second requests. Regardless of the stage in which the requests currently processed by each first container group are received, the total number of these requests is less than or equal to the number of concurrent requests that the first container group can process.
[0074] Optionally, the load balancing component 16 may obtain the number of requests currently processed by at least one first container group, and select a second target container group from at least one first container group whose number of currently processed requests has not yet reached the number of concurrent requests corresponding to each. Further, the load balancing component 16 retrieves N second requests from the storage queue 12, and allocates the N second requests to the second target container group; wherein N is less than or equal to the difference between the number of concurrent requests that can be processed by the second target container group and the number of requests currently processed by the second target container group.
[0075] The data processing system provided in the embodiment of the present application can not only receive requests that arrive before at least one first container group is expanded and during at least one first container group is expanded, but also receive requests that arrive after at least one first container group is successfully expanded. For ease of description and distinction, in the embodiment of the present application, the requests that arrive after at least one first container group is successfully expanded are defined as third requests. The number of third requests can be one or more.
[0076] Further, in order to improve the distribution and processing efficiency of requests, requests arriving after the successful expansion of at least one first container group can be received by the load balancing component 16. In this way, when performing traffic distribution, the two hops of the activation component 11 and the storage queue 12 can be reduced, which helps to improve the traffic distribution and processing efficiency.
[0077] Based on the above analysis, in an embodiment of the present application, the load balancing component 16 may also receive a third request after successfully expanding at least one first container group. Further, the load balancing component 16 may also determine whether the at least one first container group can process the third request. If the result of the judgment is yes, the third request is balanced among at least one first container group with the goal that the number of requests currently processed by each first container group is not greater than the number of concurrent requests it can process. Correspondingly, if the result of the judgment is no, the expansion component 13 is triggered to expand the container group. For ease of description and distinction, the container group expanded by the expansion component 13 for the third request is defined as the second container group.
[0078] Furthermore, the load balancing component 16 may also determine whether the number of requests that can currently be processed by at least one first container group is greater than or equal to the number of the third request. If the judgment result is yes, it is determined that at least one first container group can process the third request; if the judgment result is no, it is determined that at least one first container group cannot process the third request.
[0079] In the case where at least one first container group cannot process the third request, the expansion component 13 can expand the container group for the third request to obtain Q second container groups. Wherein, Q is a positive integer. Optionally, the expansion component 13 can determine the number of container groups Q according to the number of requests currently processed by at least one first container group, the number of concurrent requests that each container group can process, and the number of third requests, and expand Q second container groups. For example, assuming that the number of concurrent requests that each container group can process is 100, the number of at least one first container group is 3, the total number of requests currently processed by these three first container groups is 200, and the number of third requests is 250, then the number of requests that can be processed by the three first container groups is 100, and the number of third requests is 250, then it can be determined that these three first container groups cannot process the third request. Accordingly, the capacity expansion component 13 can determine that 150 third requests cannot be allocated among the three first container groups based on the number of requests that can be processed by the three first container groups being 100 and the number of third requests being 250, and that the container group needs to be expanded for the 150 third requests. Further, the capacity expansion component 13 can determine that two second container groups need to be expanded based on the 150 third requests and the number of concurrent requests that can be processed by each container group being 100.
[0080] Accordingly, the load balancing component 15 can balance the third request between at least one first container group and the Q second container groups with the goal that the number of requests currently processed by each first container group and each second container group is not greater than the concurrent request volume that can be processed. The specific implementation of balancing the third request between at least one first container group and the Q second container groups can refer to the above-mentioned content related to the load balancing component 15 balancing the second request between at least one first container group, which will not be repeated here.
[0081] The data processing system provided in the embodiment of the present application can also provide a two-level traffic scheduling mode. Figure 1c The two-level traffic scheduling mode is exemplified.
[0082] Figure 1c A structural diagram of another data processing system provided in an embodiment of the present application. Figure 1c As shown, the system includes: an activation component 11, a storage queue 12, a scheduling component 14 and a load balancing component 16.
[0083] The data processing system provided in this embodiment can schedule requests received before the container group is expanded, and can also schedule requests received during the container group expansion process. In this embodiment, the scheduling of requests received before the container group is defined as primary traffic scheduling; and the scheduling of requests received during the container group expansion process is defined as secondary traffic scheduling.
[0084] In this embodiment, the activation component 11 may receive a request when the number of instances of the container group in the background of the data processing system is 0. Alternatively, in some embodiments, the activation component 11 may also receive a request when the container groups in the background of the data processing system are all working at full capacity. For ease of description and distinction, in this embodiment of the application, the request received by the activation component 11 when the number of instances of the container group in the background of the data processing system is 0 or the container groups are all working at full capacity is defined as the first request. Among them, the scheduling of the first traffic request adopts a first-level traffic scheduling method. Figure 1c As shown, the activation component 11 can store the received multiple first requests in the storage queue 12. Accordingly, the expansion component 13 can expand the container group for the multiple first requests, thereby expanding at least one first container group. For the specific implementation of the expansion component 13 determining the number of first container groups, please refer to the relevant content of the above embodiment, which will not be repeated here.
[0085] Furthermore, the scheduling component 14 can allocate the multiple first requests stored in the storage queue 12 to at least one first container group. In the process of expanding the container group, the scheduling component 14 can allocate the first requests in real time, that is, each time a first container group is successfully expanded, the first request is retrieved from the storage queue 12 and the retrieved first request is allocated to the first container group that is currently successfully expanded.
[0086] In this embodiment, the activation component 11 may also receive a request during the expansion process of at least one first container group. For ease of description and distinction, the request received at this stage is defined as a second request. Further, the activation component 11 may also store the second request in the storage queue 12. For the second request, the data processing system provided in this embodiment will no longer expand the container group for the second request. Based on this, a new scheduling mechanism may be introduced for the scheduling of the second request, using Figure 1c The load balancing component (Service) 16 shown performs traffic balancing on the second request, that is, distributes the second request using secondary traffic scheduling. Accordingly, after successfully expanding the capacity of at least one first container group, the load balancing component 16 can distribute the second request in the storage queue 12 evenly among at least one first container group.
[0087] The data processing system provided in this embodiment adopts a two-level traffic scheduling mechanism to balance the traffic of requests received before the expansion of the container group and requests received during the expansion of the container group. Among them, the first-level traffic scheduling can allocate the requests received before the expansion of the container group to the container group that has successfully expanded during the expansion of the container group, thereby realizing the traffic balance during the dynamic expansion of the container group and helping to improve the resource utilization of the container group; the second-level traffic scheduling can evenly distribute the requests received during the expansion of the container group among the container groups after all the container groups have successfully expanded, thereby helping to further improve the resource utilization of the container group.
[0088] In this embodiment, for the first-level traffic scheduling mode, the scheduling component 14 can allocate multiple first requests stored in the storage queue 12 to at least one first container group with the goal that the number of first requests allocated to each first container group is not greater than the number of concurrent requests that it can process. Among them, the number of first requests allocated to each first container group can be the same or different, but are less than or equal to the number of concurrent requests that the first container group can process. In this way, the scheduling component 13 will not allocate the requests that should be allocated to the container group that successfully expanded later to the container group that successfully expanded first, thereby achieving traffic balance between container groups, which helps to improve resource utilization, especially helps to improve the utilization of resources of the container group that successfully expanded later.
[0089] The number of concurrent requests that can be processed by each first container group may be the same or different. In the embodiment of the present application, the number of concurrent requests that can be processed by each first container group is not limited, and may be set by the user or by the developer of the data processing system, but is not limited thereto.
[0090] For the secondary traffic scheduling mode, after successfully expanding the capacity of at least one of the above-mentioned first container groups, the load balancing component 16 can evenly distribute the second requests in the storage queue 12 among at least one of the first container groups, with the goal that the requests currently processed by each first container group is not greater than the number of concurrent requests that it can process. Optionally, at different stages, the requests currently processed by the first container group may all be first requests; or some may be first requests and some may be second requests; or all may be second requests. Regardless of the stage in which the requests currently processed by each first container group are received, the total number of these requests is less than or equal to the number of concurrent requests that the first container group can process.
[0091] In the embodiment of the present application, for Figure 1a-Figure 1c The provided data processing system can also reduce the capacity of the container group when there are sufficient container group instances in the background of the data processing system, that is, when the number of requests that can be processed by the container group instances in the background of the data processing system is greater than the number of requests currently received by the data processing system. Accordingly, the expansion component 14 can calculate the number of container groups that need to be reduced according to the number of current container groups, the number of concurrent requests that can be processed by each container group, and the number of requests to be processed, and reduce the current container group.
[0092] The data processing system provided in the embodiment of the present application can perform traffic scheduling for requests received during the expansion of the container group, and can also perform traffic scheduling for requests received during the reduction of the container group. For ease of description and distinction, the request received during the reduction of the container group is defined as the fourth request. During the reduction of the container group, the load balancing component 16 can receive the fourth request, and balance the fourth request between the currently existing container groups with the goal that the number of requests currently processed by each container group is not greater than the number of concurrent requests that it can process.
[0093] In addition to the above-mentioned system embodiment, the embodiment of the present application also provides a flow distribution method, which is exemplarily described below with reference to the diagram.
[0094] Figure 2a A flow chart of a flow distribution method provided in an embodiment of the present application. Figure 2a As shown, the method includes:
[0095] 201. Receive multiple first requests.
[0096] 202. Store multiple first requests in a storage queue.
[0097] 203. Expand the container group for the multiple first requests to generate at least one first container group.
[0098] 204. With the goal that the number of first requests allocated to each first container group is not greater than the number of concurrent requests that can be processed by the first container group, allocate multiple first requests in the storage queue to at least one first container group.
[0099] The traffic distribution method provided in this embodiment is applicable to a data processing system, which can receive multiple first requests and store the received multiple first requests in a storage queue. Furthermore, the container group can be expanded for multiple first requests, thereby expanding at least one container group. In the embodiment of the present application, for the convenience of description and distinction, the container group expanded at this stage is defined as the first container group. Among them, the number of first container groups can be 1 or more, and its specific value is determined by the number of first requests. In some embodiments, the container group can also be called a Pod, wherein the Pod contains one or more containers.
[0100] Optionally, if there are multiple first container groups, the multiple first container groups may be expanded in parallel or in series.
[0101] Further, the multiple first requests stored in the storage queue may be allocated to at least one first container group. The number of first requests allocated to each first container group is not greater than (less than or equal to) the number of concurrent requests that it can process. The number of first requests allocated to each first container group may be the same or different, but both are less than or equal to the number of concurrent requests that the first container group can process. For the specific implementation of allocating the first request between at least one first container group, please refer to the relevant content of the above embodiment, which will not be repeated here.
[0102] In this embodiment, the number of concurrent requests that can be processed by each first container group can be the same or different. In this embodiment of the application, there is no limit on the number of concurrent requests that can be processed by each first container group. It can be set by the user or by the developer of the data processing system, but is not limited thereto.
[0103] In this embodiment, the received multiple requests can be stored in a storage queue; and the container group can be expanded for the multiple requests to obtain at least one container group; further, the number of requests allocated to each container group can be no greater than the number of concurrent requests that it can process, and the multiple requests in the storage queue can be allocated to at least one container group, so that each container group can be allocated a corresponding number of requests. In this way, the requests that should be allocated to the container group that has been successfully expanded later will not be allocated to the container group that has been successfully expanded earlier, thereby achieving traffic balance between container groups, which helps to improve resource utilization, especially helps to improve the resource utilization of the container group that has been successfully expanded later.
[0104] In some embodiments, an optional implementation of step 203 is: determining the number of container groups M according to the number of the first requests and the number of concurrent requests that each container group can process; and expanding the container group according to the number of container groups M to obtain M first container groups. Wherein, M is a positive integer, and its specific value is determined by the number of first requests and the number of concurrent requests that each container group can process.
[0105] In practical applications, if the number of the first requests is an integer multiple of the number of concurrent requests that can be processed by each container group, then M is equal to the result of dividing the two. If the number of the first requests is not an integer multiple of the number of concurrent requests that can be processed by each container group, then the result of dividing the two can be rounded up as the value of M.
[0106] In the embodiment of the present application, an optional implementation of step 204 is: monitoring the status of the currently expanded container group; and when monitoring that the first target container group is successfully expanded, retrieving a corresponding number of first requests from the storage queue, and allocating the corresponding number of first requests to the first target container group; wherein the corresponding number is less than or equal to the number of concurrent requests that can be processed by the first target container group.
[0107] Furthermore, an optional implementation of retrieving a corresponding number of first requests from the storage queue is: if, when it is monitored that the first target container group is successfully expanded, the total number of successfully expanded first container groups is less than M, a set number of first requests is retrieved from the storage queue; wherein the set number is less than or equal to the number of concurrent requests that can be processed by the first target container group.
[0108] Correspondingly, if it is monitored that the first target container group is successfully expanded, and the total number of the first container groups that are successfully expanded is equal to M, the remaining first requests are retrieved from the storage queue; and the remaining first requests are allocated to the first target container group; wherein the number of the remaining first requests is less than or equal to the set number.
[0109] In some embodiments, when the first target container group is successfully expanded, the IP address of the first target container group can also be written into the access endpoint. Accordingly, one implementation method of monitoring the status of the currently expanded container group is: monitoring whether a new IP address is added to the access endpoint; and when a new IP address is detected in the access endpoint, determining that the first target container group is successfully expanded; wherein the new IP address is the IP address of the first target container group.
[0110] Furthermore, an implementation manner of allocating a corresponding number of first requests to the first target container group is: allocating a corresponding number of first requests to the first target container group corresponding to the newly added IP address.
[0111] In some other embodiments, the data processing system provided by the embodiments of the present application may also receive a second request during the expansion of at least one first container group, and store the second request in a storage queue.
[0112] Furthermore, after successfully expanding at least one first container group, the second requests in the storage queue are evenly distributed among the at least one first container group with the goal that the number of requests currently processed by each first container group is not greater than the number of concurrent requests that it can process.
[0113] Furthermore, an optional implementation of evenly distributing the second request among at least one first container group is as follows: obtaining the number of requests currently processed by at least one first container group; selecting a second target container group from the at least one first container group whose number of requests currently processed has not yet reached the number of concurrent requests; and retrieving N second requests from the storage queue, and distributing the N second requests to the second target container group; wherein N is less than or equal to the difference between the number of concurrent requests that can be processed by the second target container group and the number of requests currently processed by the second target container group.
[0114] Furthermore, after successfully expanding at least one first container group, a third request may be received; and it is determined whether at least one first container group can process the third request; if the determination result is yes, the third request is balanced among at least one first container group with the goal that the number of requests currently processed by each first container group is not greater than the concurrent request amount that it can process.
[0115] Correspondingly, if the judgment result is no, the number of container groups Q is determined according to the number of requests currently processed by at least one first container group, the number of concurrent requests that can be processed by each container group, and the number of third requests; and Q second container groups are expanded; wherein Q is a positive integer;
[0116] Furthermore, the third request may be balanced between at least one first container group and the Q second container groups with the goal that the number of requests currently processed by each first container group and each second container group is not greater than the concurrent request amount that can be processed by the first container group and the Q second container groups.
[0117] Accordingly, an embodiment of the present application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the above-mentioned traffic distribution method.
[0118] Figure 2b A flow chart of another flow distribution method provided in an embodiment of the present application. Figure 2b As shown, the method includes:
[0119] S21. Store the received multiple first requests into a storage queue.
[0120] S22: Expand the container group for the multiple first requests to generate at least one first container group.
[0121] S23: During the expansion of at least one first container group, allocate multiple first requests in the storage queue to at least one first container group.
[0122] S24: Storing a second request received during the expansion process of at least one first container group in a storage queue.
[0123] S25: After the capacity of at least one first container group is expanded successfully, the second request is balanced among the at least one first container group.
[0124] In this embodiment, the request received before the container group is expanded can be scheduled, and the request received during the container group expansion process can also be scheduled. In this embodiment, the scheduling of the first request received before the container group is defined as the first-level traffic scheduling; and the scheduling of the second request received during the container group expansion process is defined as the second-level traffic scheduling.
[0125] In steps S21-S23, the first traffic request is scheduled using a first-level traffic scheduling method. In step S21, the received multiple first requests can be stored in a storage queue. And in step S22, the container group is expanded for the multiple first requests, and then at least one first container group is expanded. Among them, for the specific implementation method of determining the number of first container groups, please refer to the relevant content of the above embodiment, which will not be repeated here.
[0126] Further, in step S23, the multiple first requests stored in the storage queue can be allocated to at least one first container group. In the process of expanding the container group, the first requests can be allocated in real time, that is, each time a first container group is successfully expanded, the first request is retrieved from the storage queue and allocated to the first container group that has been successfully expanded.
[0127] In this embodiment, a request may also be received during the expansion process of at least one first container group. For ease of description and distinction, the request received at this stage is defined as a second request. Further, in step S24, the second request may also be stored in the storage queue. For the second request, the data processing system provided in this embodiment will no longer expand the container group for the second request. Based on this, a new scheduling mechanism may be introduced for the scheduling of the second request, that is, the second request may be allocated using secondary traffic scheduling. Accordingly, in step S25, after successfully expanding the at least one first container group, the second request in the storage queue 12 may be evenly distributed among the at least one first container group.
[0128] In this embodiment, a two-level traffic scheduling mechanism is used to balance the traffic of requests received before the expansion of the container group and requests received during the expansion of the container group. In the first-level traffic scheduling, requests received before the expansion of the container group are allocated to the container group that has been successfully expanded, thereby achieving traffic balance during the dynamic expansion of the container group and helping to improve the resource utilization of the container group; the second-level traffic scheduling can evenly distribute the requests received during the expansion of the container group among the container groups after all the container groups have been successfully expanded, thereby helping to further improve the resource utilization of the container group.
[0129] In this embodiment, for the first-level traffic scheduling mode, the number of first requests allocated to each first container group can be no greater than the number of concurrent requests that it can process, and the multiple first requests stored in the storage queue can be allocated to at least one first container group. Among them, the number of first requests allocated to each first container group can be the same or different, but both are less than or equal to the number of concurrent requests that the first container group can process. In this way, the requests that should be allocated to the container group that successfully expands later will not be allocated to the container group that successfully expands first, thereby achieving traffic balance between container groups, which helps to improve resource utilization, especially helps to improve the resource utilization of the container group that successfully expands later.
[0130] The number of concurrent requests that can be processed by each first container group may be the same or different. In the embodiment of the present application, the number of concurrent requests that can be processed by each first container group is not limited, and may be set by the user or by the developer of the data processing system, but is not limited thereto.
[0131] For the secondary traffic scheduling mode, after successfully expanding the capacity of at least one of the above-mentioned first container groups, the second requests in the storage queue can be evenly distributed among at least one first container group, with the goal that the requests currently processed by each first container group is not greater than the number of concurrent requests that it can process. Optionally, at different stages, the requests currently processed by the first container group may all be first requests; or some may be first requests and some may be second requests; or all may be second requests. Regardless of the stage in which the requests currently processed by each first container group are received, the total number of these requests is less than or equal to the number of concurrent requests that the first container group can process.
[0132] Accordingly, an embodiment of the present application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the above-mentioned traffic distribution method.
[0133] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 202 and 203 can be device A; for another example, the execution subject of step 201 can be device A, and the execution subject of step 202 can be device B; and so on.
[0134] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations appearing in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this document or may be executed in parallel, and the sequence numbers of the operations, such as 202, 203, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel.
[0135] Accordingly, an embodiment of the present application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the above method.
[0136] Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 3 As shown, the computer device includes: a memory 30a, a processor 30b and a communication component 30c.
[0137] In this embodiment, the memory 30a is used to store a computer program. The processor 30b is coupled to the memory 30a and is used to execute the computer program to: receive multiple first requests through the communication component 30c, and store the multiple first requests in a storage queue; expand the container group for the multiple first requests to expand at least one first container group; and allocate the multiple first requests in the storage queue to the at least one first container group with the goal that the number of first requests allocated to each first container group is not greater than the number of concurrent requests that it can process.
[0138] In some embodiments, when the processor 30b expands the container group for the multiple first requests, it is specifically configured to: determine the number of container groups M according to the number of the multiple first requests and the number of concurrent requests that each container group can process; and expand the container group according to the number of container groups M to obtain M first container groups. Wherein, M is a positive integer, and its specific value is determined by the number of first requests and the number of concurrent requests that each container group can process.
[0139] In some other embodiments, when allocating multiple first requests in the storage queue to at least one first container group, the processor 30b is specifically used to: monitor the status of the currently expanded container group; and when monitoring that the first target container group is successfully expanded, retrieve a corresponding number of first requests from the storage queue, and allocate the corresponding number of first requests to the first target container group; wherein the corresponding number is less than or equal to the number of concurrent requests that can be processed by the first target container group.
[0140] Further, when the processor 30b retrieves the corresponding number of first requests from the storage queue, it is specifically used to: if the total number of first container groups that have been successfully expanded is less than M when the first target container group is monitored to be successfully expanded, then retrieve the set number of first requests from the storage queue; wherein the set number is less than or equal to the number of concurrent requests that the first target container group can handle. Correspondingly, if the total number of first container groups that have been successfully expanded is equal to M when the first target container group is monitored to be successfully expanded, then retrieve the remaining first requests from the storage queue; and allocate the remaining first requests to the first target container group; wherein the number of remaining first requests is less than or equal to the set number.
[0141] In some other embodiments, the processor 30b is further used to: when the first target container group is successfully expanded, the IP address of the first target container group can also be written into the access endpoint. Accordingly, when the processor 30b monitors the status of the currently expanded container group, it is specifically used to: monitor whether a new IP address is added in the access endpoint; and when a new IP address is detected in the access endpoint, it is determined that the first target container group is successfully expanded; wherein the new IP address is the IP address of the first target container group.
[0142] Further, when allocating the corresponding number of first requests to the first target container group, the processor 30b is specifically configured to: allocate the corresponding number of first requests to the first target container group corresponding to the newly added IP address.
[0143] In some further embodiments, the processor 30b is further configured to: during the process of expanding the capacity of at least one first container group, receive a second request through the communication component 30c, and store the second request in the storage queue.
[0144] Further, the processor 30b is further configured to: after successfully expanding at least one first container group, evenly distribute the second requests in the storage queue among the at least one first container group with the goal that the number of requests currently processed by each first container group is not greater than the number of concurrent requests that can be processed by the first container group.
[0145] Optionally, when evenly distributing the second request among the at least one first container group, the processor 30b is specifically configured to: obtain the number of requests currently processed by the at least one first container group; select a second target container group from the at least one first container group, the number of requests currently processed of which has not yet reached the number of concurrent requests; and retrieve N second requests from the storage queue, and distribute the N second requests to the second target container group; wherein N is less than or equal to the difference between the number of concurrent requests that can be processed by the second target container group and the number of requests currently processed by the second target container group.
[0146] In some other embodiments, the processor 30b is further used to: after successfully expanding at least one first container group, receive a third request through the communication component 30c; and determine whether at least one first container group can process the third request; if the determination result is yes, then balance the third request between at least one first container group with the goal that the number of requests currently processed by each first container group is not greater than the number of concurrent requests it can process. Correspondingly, if the determination result is no, determine the number of container groups Q based on the number of requests currently processed by at least one first container group, the number of concurrent requests that each container group can process, and the number of third requests; and expand Q second container groups; wherein Q is a positive integer;
[0147] Furthermore, the processor 30b is further configured to balance the third request between the at least one first container group and the Q second container groups with the goal that the number of requests currently processed by each first container group and each second container group is not greater than the concurrent request amount that can be processed by the first container group and the second container group.
[0148] In some embodiments, the processor 30b may further store multiple first requests received by the communication component 30c into a storage queue; expand the container group for the multiple first requests to expand at least one first container group; during the expansion of at least one first container group, allocate the multiple first requests in the storage queue to at least one first container group; and store the second request received by the communication component 30c during the expansion of at least one first container group into the storage queue; and after the expansion of at least one first container group is successful, balance the second request in the storage queue between at least one first container group.
[0149] Optionally, when allocating multiple first requests in the storage queue to at least one first container group, the processor 60b is specifically configured to: allocate the multiple first requests in the storage queue to at least one first container group with the goal that the number of first requests allocated to each first container group is not greater than the number of concurrent requests that can be processed by the first container group.
[0150] In some optional embodiments, such as Figure 3 As shown, the computer device may further include: a power supply component 30d. Optionally, some computer devices may further include: a display 30e and an audio component 30f and other optional components. Figure 3 The components are shown only schematically, and do not mean that the computer equipment must include Figure 3 The components shown do not necessarily mean that the computer equipment can only include Figure 3 Components shown.
[0151] In this embodiment, the memory is used to store computer programs and can be configured to store various other data to support operations on the computer device. The processor can execute the computer program stored in the memory to implement the corresponding control logic. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0152] In this embodiment, the processor can be any hardware processing device that can execute the logic of the above method. Optionally, the processor can be a central processing unit (CPU), a graphics processing unit (GPU) or a microcontroller unit (MCU); it can also be a field programmable gate array (FPGA), a programmable array logic device (PAL), a general array logic device (GAL), a complex programmable logic device (CPLD) and other programmable devices; or an advanced reduced instruction set (RISC) processor (Advanced RISC Machines, ARM) or a system on chip (System on Chip, SOC), etc., but not limited to this.
[0153] In this embodiment, the communication component is configured to facilitate wired or wireless communication between the computer device and other devices. The computer device can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G, 5G or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component can also be implemented based on near field communication (NFC) technology, radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology or other technologies.
[0154] In this embodiment, the display may include a liquid crystal display (LCD) and a touch panel (TP). If the display includes a touch panel, the display may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0155] In this embodiment, the power supply component is configured to provide power to various components of the computer device. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply component is located.
[0156] In this embodiment, the audio component may be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal may be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting an audio signal. For example, for a computer device with a language interaction function, voice interaction with a user can be achieved through an audio component.
[0157] The computer device provided in this embodiment can store multiple received requests in a storage queue; and expand the container group for multiple requests to obtain at least one container group; further, the number of requests allocated to each container group can be no greater than the number of concurrent requests it can process, and the multiple requests in the storage queue can be allocated to at least one container group, so that each container group can be allocated a corresponding number of requests. In this way, the requests that should be allocated to the container group that successfully expanded later will not be allocated to the container group that successfully expanded earlier, thereby achieving traffic balance between container groups, which helps to improve resource utilization, especially helps to improve the resource utilization of the container group that successfully expanded later.
[0158] It should be noted that the descriptions such as “first” and “second” in this article are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence, nor do they limit “first” and “second” to different types.
[0159] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0160] The present invention is described with reference to the flowchart and / or block diagram of the method, device (system), and computer program product according to the embodiment of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the process and / or box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0161] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0162] These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0163] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0164] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0165] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0166] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0167] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A data processing system, characterized in that: include: Activation components, storage queues, capacity expansion components, and scheduling components; The activation component is used to receive a plurality of first requests and store the plurality of first requests in the storage queue; The capacity expansion component is used to determine the number M of container groups according to the number of the multiple first requests and the number of concurrent requests that can be processed by each container group, and expand the container group according to the number M of container groups to obtain M first container groups, where M is the result of dividing the number of the multiple first requests and the number of concurrent requests that can be processed by each container group or the result of rounding up the division between the two; wherein M is a positive integer; The scheduling component is used to allocate multiple first requests in the storage queue to at least one first container group with the goal that the number of first requests allocated to each first container group is not greater than the number of concurrent requests that can be processed by the first container group.
2. The system according to claim 1, characterized in that The scheduling component is specifically used for: Monitor the status of the currently expanded container group; When it is detected that the first target container group is successfully expanded, a corresponding number of first requests are retrieved from the storage queue, and the corresponding number of first requests are allocated to the first target container group; The corresponding number is less than or equal to the number of concurrent requests that can be processed by the first target container group.
3. The system according to claim 2, characterized in that The scheduling component, when retrieving a corresponding number of first requests from the storage queue, is specifically configured to: If, when monitoring that the first target container group is successfully expanded, the total number of the first container groups successfully expanded is less than M, calling a set number of first requests from the storage queue; The set number is less than or equal to the number of concurrent requests that can be processed by the first target container group.
4. The system according to claim 3, characterized in that When a corresponding number of first requests are retrieved from the storage queue, it is specifically used to: If, when monitoring that the first target container group is successfully expanded, the total number of the first container groups successfully expanded is equal to M, the remaining first requests are retrieved from the storage queue; Allocate the remaining first requests to the first target container group; wherein the number of the remaining first requests is less than or equal to the set number.
5. The system according to claim 2, characterized in that Also includes: Access endpoint control component; the access endpoint control component is also used to: when the first target container group is successfully expanded, write the IP address of the first target container group into the access endpoint; When the scheduling component monitors the status of the currently expanded container group, it is specifically used to: Monitoring whether a new IP address is added to the access endpoint; When a newly added IP address is detected in the access endpoint, it is determined that the first target container group is successfully expanded; the newly added IP address is the IP address of the first target container group.
6. The system according to claim 5, characterized in that When allocating the corresponding number of first requests to the first target container group, the scheduling component is specifically configured to: The corresponding number of first requests are allocated to a first target container group corresponding to the newly added IP address.
7. The system according to claim 1, characterized in that Also includes: Load balancing component; The activation component is further configured to: receive a second request during the expansion of the at least one first container group, and store the second request in the storage queue; The load balancing component is further used to: after successfully expanding the at least one first container group, with the goal that the requests currently processed by each first container group is not greater than the number of concurrent requests that can be processed by the first container group, evenly distribute the second requests in the storage queue among the at least one first container group.
8. The system according to claim 7, characterized in that The load balancing component, when evenly distributing the second request among the at least one first container group, is specifically configured to: Obtaining the number of requests currently processed by the at least one first container group; Selecting a second target container group from the at least one first container group, in which the number of currently processed requests has not yet reached the number of concurrent requests; Retrieving N second requests from the storage queue, and allocating the N second requests to the second target container group; Wherein, N is less than or equal to the difference between the number of concurrent requests that can be processed by the second target container group and the number of requests currently processed by the second target container group.
9. The system according to claim 7, characterized in that The load balancing component is further configured to: after successfully expanding the at least one first container group, receive a third request; and determine whether the at least one first container group can process the third request; If the judgment result is yes, the third request is balanced among the at least one first container group with the goal that the number of requests currently processed by each first container group is not greater than the concurrent request amount that can be processed by the first container group.
10. The system according to claim 9, characterized in that The load balancing component is further used to: if the judgment result is no, trigger the capacity expansion component to expand the container group; The expansion component is further used to: determine the number of container groups Q according to the number of requests currently processed by the at least one first container group, the number of concurrent requests that can be processed by each container group, and the number of the third requests; and expand the capacity to Q second container groups; wherein Q is a positive integer; The load balancing component is further configured to balance the third request between the at least one first container group and the Q second container groups with the goal that the number of requests currently processed by each first container group and each second container group is not greater than the concurrent request amount that can be processed by them.
11. A data processing system, characterized in that: include: Activation components, storage queues, capacity expansion components, scheduling components, and load balancing components; The activation component is configured to receive a plurality of first requests and a second request during the expansion of at least one first container group, and store the plurality of first requests and the second request in the storage queue; The at least one first container group is expanded by the expansion component for the multiple first requests. When the expansion component expands the multiple first requests, it is specifically used to determine the number of container groups M according to the number of the multiple first requests and the number of concurrent requests that can be processed by each container group, and expand the container group according to the number of container groups M to obtain M first container groups, where M is the result of dividing the number of the multiple first requests and the number of concurrent requests that can be processed by each container group or the result of rounding up the division between the two; wherein M is a positive integer; The scheduling component is used to allocate the multiple first requests in the storage queue to the at least one first container group during the expansion process of the at least one first container group; The load balancing component is used to balance the second requests in the storage queue among the at least one first container group after the at least one first container group is successfully expanded.
12. The system according to claim 11, characterized in that The scheduling component is specifically used for: With the goal that the number of first requests allocated to each first container group is not greater than the number of concurrent requests that can be processed by the first container group, multiple first requests in the storage queue are allocated to the at least one first container group.
13. A flow distribution method, characterized in that: include: receiving a plurality of first requests, and storing the plurality of first requests in a storage queue; Determine the number of container groups M according to the number of the multiple first requests and the number of concurrent requests that can be processed by each container group, and expand the container group according to the number of container groups M to obtain M first container groups, where M is the result of dividing the number of the multiple first requests and the number of concurrent requests that can be processed by each container group or the result of rounding up the division between the two; wherein M is a positive integer; With the goal that the number of first requests allocated to each first container group is not greater than the number of concurrent requests that can be processed by the first container group, multiple first requests in the storage queue are allocated to at least one first container group.
14. The method according to claim 13, characterized in that Also includes: During the expansion of the at least one first container group, receiving a second request and storing the second request in the storage queue; After the at least one first container group is successfully expanded, the second requests in the storage queue are evenly distributed among the at least one first container group with the goal that the number of requests currently processed by each first container group is not greater than the number of concurrent requests that can be processed by the first container group.
15. A flow distribution method, characterized in that: include: storing the received multiple first requests into a storage queue; Determine the number of container groups M according to the number of the multiple first requests and the number of concurrent requests that can be processed by each container group, and expand the container group according to the number of container groups M to obtain M first container groups, where M is the result of dividing the number of the multiple first requests and the number of concurrent requests that can be processed by each container group or the result of rounding up the division between the two; wherein M is a positive integer; During the expansion of the at least one first container group, allocating the plurality of first requests in the storage queue to the at least one first container group; and storing the second request received during the expansion of the at least one first container group in a storage queue; After the capacity of the at least one first container group is successfully expanded, the second requests in the storage queue are balanced among the at least one first container group.
16. The method according to claim 15, characterized in that The allocating the plurality of first requests in the storage queue to the at least one first container group comprises: With the goal that the number of first requests allocated to each first container group is not greater than the number of concurrent requests that can be processed by the first container group, multiple first requests in the storage queue are allocated to the at least one first container group.
17. A computer device, characterized in that: include: Memory, processor and communication components; wherein the memory is used to store computer programs; The processor is coupled to the memory and is configured to execute the computer program for: receiving a plurality of first requests through the communication component, and storing the plurality of first requests in a storage queue; Determine the number of container groups M according to the number of the multiple first requests and the number of concurrent requests that can be processed by each container group, and expand the container group according to the number of container groups M to obtain M first container groups, where M is the result of dividing the number of the multiple first requests and the number of concurrent requests that can be processed by each container group or the result of rounding up the division between the two; wherein M is a positive integer; With the goal that the number of first requests allocated to each first container group is not greater than the number of concurrent requests that can be processed by the first container group, multiple first requests in the storage queue are allocated to at least one first container group.
18. A computer device, characterized in that: include: Memory, processor and communication components; wherein the memory is used to store computer programs; The processor is coupled to the memory and is configured to execute the computer program for: storing the plurality of first requests received by the communication component into a storage queue; Expanding the container group for the multiple first requests to expand at least one first container group; During the expansion of the at least one first container group, allocating the plurality of first requests in the storage queue to the at least one first container group; and storing, in a storage queue, a second request received by the communication component during the process of expanding the at least one first container group; After the capacity of the at least one first container group is successfully expanded, the second requests in the storage queue are balanced among the at least one first container group.
19. A computer-readable storage medium storing computer instructions, characterized in that: When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the method according to any one of claims 13 to 16.
