A flow adjustment method, device and computer readable storage medium
By utilizing the Ingress controller and load balancer service in the Kubernetes container cloud platform to segment traffic information within the cluster, the problem of increased network overhead due to east-west traffic adjustment is solved, achieving efficient traffic processing and canary releases.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-21
- Publication Date
- 2026-03-24
AI Technical Summary
Existing technologies add extra network overhead through gateways when adjusting east-west traffic, leading to increased operational complexity and making it difficult to conduct A/B testing and canary releases without interrupting service.
In the Kubernetes container cloud platform, traffic information is directly split within the cluster through the Ingress controller and load balancer service, avoiding processing through the gateway. The Ingress controller parses the reverse proxy rules, senses traffic changes in real time, generates or obtains splitting strategies, and splits traffic according to the weight configuration ratio.
It reduces the overhead of traffic adjustment, improves the efficiency of traffic processing within the cluster, supports canary releases and A/B testing, and reduces the complexity of operation and maintenance.
Smart Images

Figure CN115695430B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a flow adjustment method, apparatus and computer-readable storage medium. Background Technology
[0002] With the development of digitalization in society, more and more information systems are becoming increasingly large. To address a series of issues related to maintainability, scalability, and elasticity, technologies such as microservices, cloud-native technologies, and containers have emerged. This has brought with it various challenges related to increased operational complexity. One such challenge is how to ensure uninterrupted service when launching new versions of a system and conducting A / B testing on them. Canary releases are one of the industry's common solutions to this problem, requiring the ability to adjust traffic between old and new versions.
[0003] One traditional method for traffic scaling is to provide traffic scaling capabilities through geared traffic sensors or Ingress controllers that correlate server load balancing, directly sending client traffic information to each microservice via the gateway. This adds additional network overhead when scaling east-west traffic. Summary of the Invention
[0004] The purpose of this application is to provide a traffic adjustment method, apparatus, and computer-readable storage medium that, by segmenting traffic information within a cluster, enables east-west traffic to be processed within the cluster without passing through a gateway, thereby helping to reduce the additional overhead of traffic adjustment.
[0005] To achieve the above objectives:
[0006] In a first aspect, embodiments of this application provide a traffic adjustment method applied to a Kubernetes container cloud platform, comprising the following steps:
[0007] Obtain traffic information from the client;
[0008] Determine whether a segmentation strategy corresponding to the traffic information exists within the cluster;
[0009] If it is determined that there is no segmentation strategy corresponding to the traffic information within the cluster, then a corresponding segmentation strategy is generated based on the annotation information of the traffic information; if it is determined that there is a segmentation strategy corresponding to the traffic information within the cluster, then the segmentation strategy is obtained.
[0010] According to the aforementioned splitting strategy, the client traffic is split within the cluster.
[0011] Optionally, the traffic information includes traffic size, traffic type, and traffic-related annotation information;
[0012] The flow types include east-west flow and north-south flow.
[0013] Optionally, after obtaining the traffic information of the client traffic, the method further includes:
[0014] By exposing ports through the load balancer service, external network access is made possible, allowing traffic to flow into the service;
[0015] Create an Ingress cluster service as the internal interface for incoming traffic, so as to migrate client traffic to the cluster for access;
[0016] Within the cluster, the east-west traffic is controlled to access microservices based on the introduced client traffic information.
[0017] Optionally, determining whether a splitting strategy corresponding to the traffic information exists within the cluster further includes:
[0018] An Ingress controller is created between the microservice gateway and the service instance. The Ingress controller interacts with the client traffic information, parses the reverse proxy rules of the Ingress, detects changes in the Ingress in real time, and determines whether there is a corresponding splitting strategy for the traffic information within the cluster. The traffic is then split accordingly to provide a microservice access point for traffic migration to the service instance.
[0019] Optionally, the method further includes:
[0020] If it is determined that there is no corresponding segmentation strategy, the relevant annotation information of the traffic information is obtained through the Ingress controller;
[0021] The created Ingress is written according to the replication strategy rules and annotation information, and the traffic information is segmented.
[0022] Optionally, if it is determined that a splitting strategy corresponding to the traffic information exists within the cluster, obtaining the splitting strategy includes:
[0023] Obtain all Ingress and Ingress controllers from Kubernetes container cloud platform, and read traffic information through the Ingress controller detection interface;
[0024] If it is determined that there is a corresponding segmentation strategy for the traffic information of the service, the segmentation strategy is obtained, the weight configuration ratio of each service instance corresponding to the traffic is calculated, and the traffic is segmented according to the corresponding segmentation strategy.
[0025] The second method, according to embodiments of this application, provides a flow adjustment device, the device comprising:
[0026] The acquisition module is used to acquire traffic information from client traffic.
[0027] The judgment module is used to determine whether there is a segmentation strategy corresponding to the traffic information within the cluster;
[0028] The module is configured to generate a corresponding splitting strategy based on the annotation information of the traffic information if it is determined that there is no splitting strategy corresponding to the traffic information within the cluster; and to obtain the splitting strategy if it is determined that there is a splitting strategy corresponding to the traffic information within the cluster.
[0029] The segmentation module is used to control the segmentation of client traffic within the cluster according to the segmentation strategy.
[0030] Optionally, the formulation module is specifically used to obtain relevant annotation information of the traffic information through the Ingress controller when it is determined that there is no corresponding segmentation strategy; write the created Ingress according to the replication strategy rules and annotation information, and segment the traffic information.
[0031] If it is determined that there is a corresponding segmentation strategy for the traffic information of the service, the segmentation strategy is obtained, the weight configuration ratio of each service instance corresponding to the traffic is calculated, and the traffic is segmented according to the corresponding segmentation strategy.
[0032] Thirdly, embodiments of this application disclose an electronic device, including: a memory storing executable program code; a processor coupled to the memory; the processor calling the executable program code stored in the memory to execute the flow adjustment method as described in the first aspect.
[0033] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor of an electronic device, enables the electronic device to implement the flow adjustment method as described in the first aspect.
[0034] The traffic adjustment method, apparatus, and computer-readable storage medium provided in this application are applied to a Kubernetes container cloud platform. The method includes: acquiring traffic information of client traffic; determining whether a splitting strategy corresponding to the traffic information exists within the cluster; if it is determined that no splitting strategy corresponding to the traffic information exists within the cluster, generating a corresponding splitting strategy based on the annotation information of the traffic information; if it is determined that a splitting strategy corresponding to the traffic information exists within the cluster, acquiring the splitting strategy; and controlling the client traffic to be split within the cluster according to the splitting strategy. Thus, by splitting the traffic information within the cluster, east-west traffic is processed within the cluster without passing through a gateway, which helps reduce the additional overhead of traffic adjustment. Attached Figure Description
[0035] Figure 1 A flowchart illustrating a preferred embodiment of the flow adjustment method of the present invention;
[0036] Figure 2 A schematic diagram of the specific structure of a flow adjustment device provided in a preferred embodiment of the present invention;
[0037] Figure 3 This is a schematic diagram of a flow adjustment device according to a preferred embodiment of the present invention;
[0038] Figure 4 This is a schematic diagram of a flow adjustment device provided in another preferred embodiment of the present invention. Detailed Implementation
[0039] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0040] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of this application may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.
[0041] It should be understood that although the terms first, second, third, etc., may be used herein to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another. For example, without departing from the scope of this document, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if," as used herein, can be interpreted as "when," "when," or "in response to determination." Furthermore, as used herein, the singular forms "a," "an," and "the" are intended to also include the plural forms unless the context indicates otherwise. It should be further understood that the terms "comprising," "including," indicate the presence of the stated feature, step, operation, element, component, item, kind, and / or group, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, kinds, and / or groups. The terms "or" and "and / or" as used herein are to be interpreted as inclusive, or mean any one or any combination thereof. Therefore, "A, B, or C" or "A, B, and / or C" means "any one of the following: A; B; C; A and B; A and C; B and C; A, B, and C". Exceptions to this definition will only occur if the combination of elements, functions, steps, or operations is inherently mutually exclusive in some way.
[0042] It should be understood that although the steps in the flowcharts of this application's embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0043] It should be noted that step designations such as S101 and S102 are used in this document for the purpose of more clearly and concisely describing the corresponding content, and do not constitute a substantial limitation on the order. In specific implementation, those skilled in the art may execute S102 first and then S101, etc., but these should all be within the protection scope of this application.
[0044] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0045] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.
[0046] See Figure 1 This application provides a traffic adjustment method, which can be executed by a traffic adjustment device provided in this application. The traffic adjustment device can be implemented in software and / or hardware. Taking the Kubernetes container cloud platform as an example, the traffic adjustment method applied to the Kubernetes container cloud platform provided in this embodiment includes the following steps:
[0047] In one implementation, the Kubernetes container is used to manage a cluster of containerized applications on multiple hosts in a cloud platform, providing a mechanism for application deployment, planning, updating, and maintenance.
[0048] Step S101: Obtain traffic information of client traffic.
[0049] In one embodiment, the traffic information includes traffic size, traffic type, and traffic-related annotation information. The traffic type includes east-west traffic and north-south traffic. Here, east-west traffic mainly refers to traffic flow between different microservices, and north-south traffic mainly refers to traffic flow between the client and the microservice.
[0050] Here, after obtaining the traffic information of the client traffic, the load balancer service exposes the port to allow external network access, thus migrating the traffic into the service.
[0051] Step S102: Determine whether there is a splitting strategy within the cluster that corresponds to the traffic information.
[0052] In one implementation, an Ingress cluster service and an Ingress controller are created between the microservice gateway and service instances. The Ingress cluster service serves as the internal interface for incoming traffic to migrate client traffic to the cluster. Within the cluster, east-west traffic is controlled to access between microservices based on the introduced client traffic information.
[0053] The Ingress controller interacts with client traffic information, parses the reverse proxy rules of the Ingress, detects changes in the Ingress in real time, and determines whether there is a corresponding splitting strategy within the cluster to split the traffic accordingly, providing a microservice access point for traffic migration to service instances.
[0054] Here, after the traffic is migrated to the cluster, the Ingress controller determines whether there is a corresponding splitting strategy for the traffic within the cluster.
[0055] Step S103: If it is determined that there is no segmentation strategy corresponding to the traffic information within the cluster, then generate a corresponding segmentation strategy based on the annotation information of the traffic information; if it is determined that there is a segmentation strategy corresponding to the traffic information within the cluster, then obtain the segmentation strategy.
[0056] In one implementation, all Ingresses and Ingress controllers of the container cloud platform are obtained from Kubernetes, and traffic information is read through the Ingress controller detection interface. If it is determined that there is no corresponding splitting strategy for the traffic information within the cluster, such as when obtaining data information related to a new version of the application during a canary release, the cluster Ingress will not have a splitting strategy corresponding to the new version's traffic information. When creating a service, the relevant annotation information in the traffic information is obtained through the Ingress controller, and the reverse proxy splitting strategy of the Ingress is parsed through the Ingress controller. The obtained rule information and annotation information are stored in the created Ingress to split the obtained traffic information.
[0057] If it is determined that there is a corresponding segmentation strategy for the traffic information of the service, the segmentation strategy is obtained, the weight configuration ratio of each service instance corresponding to the traffic is calculated, and the traffic is segmented according to the corresponding segmentation strategy.
[0058] Step S104: According to the splitting strategy, control the client traffic to be split within the cluster.
[0059] In summary, the traffic adjustment method provided in the above embodiments controls the flow of east-west traffic within the cluster through the Ingress cluster service, and divides the traffic into various microservices through the Ingress controller, which helps to reduce the additional overhead of traffic flow.
[0060] See Figure 2 This application provides a traffic adjustment device, which is applied to a Kubernetes container cloud platform to control the flow of east-west traffic within the cluster. The device includes an Ingress load balancer service, an Ingress controller, a microservice gateway, an Ingress cluster service, services, and service instances.
[0061] Here, the Ingress load balancer service exposes ports to allow external network access, migrates client information traffic, and directs traffic into Kubernetes containers.
[0062] The Ingress cluster service serves as the internal interface for incoming traffic, migrating client traffic to the cluster for access, and the Ingress controller 2 determines whether there is a splitting strategy within the cluster corresponding to the traffic information.
[0063] Here, the Ingress controller 2 parses the reverse proxy rules of the Ingress and monitors the changes of the Ingress in real time to update the corresponding splitting strategy in real time, so as to split the traffic.
[0064] Here, the traffic information includes east-west traffic and north-south traffic;
[0065] The north-south traffic refers to the process of traffic being obtained from the client and flowing to various service instances;
[0066] The east-west traffic refers to the traffic between different microservices. The traffic enters the cluster through the Ingress cluster service, so that the east-west traffic between service instance 1 and service instance n flows within the cluster without passing through the gateway.
[0067] In summary, the traffic adjustment device provided in the above embodiments provides a port for traffic migration through the Ingress load balancer service, obtains client traffic information, enables east-west traffic to flow within the cluster through the Ingress cluster service, and controls traffic splitting through the Ingress controller. This helps to achieve traffic adjustment during canary releases in a Kubernetes cluster and reduces the cost of east-west traffic flow.
[0068] See Figure 3 This application provides a flow adjustment device, which includes an acquisition module, a judgment module, a setting module, and a segmentation module.
[0069] The acquisition module is used to acquire traffic information from client traffic.
[0070] The judgment module is used to determine whether there is a segmentation strategy corresponding to the traffic information within the cluster;
[0071] The module is configured to generate a corresponding splitting strategy based on the annotation information of the traffic information if it is determined that there is no splitting strategy corresponding to the traffic information within the cluster; and to obtain the splitting strategy if it is determined that there is a splitting strategy corresponding to the traffic information within the cluster.
[0072] The segmentation module is used to control the segmentation of client traffic within the cluster according to the segmentation strategy.
[0073] In one embodiment, the acquisition module is specifically used to acquire traffic information of client traffic. The traffic information includes traffic size, traffic type, and traffic-related annotation information. The traffic type includes east-west traffic and north-south traffic. Here, east-west traffic mainly refers to traffic flow between different microservices, and north-south traffic mainly refers to traffic flow between the client and the microservice.
[0074] In one embodiment, the judgment module is specifically used to create an Ingress cluster service and an Ingress controller, and to use the Ingress cluster service as an internal interface for traffic entry, so as to migrate client traffic to the cluster. Within the cluster, the module controls east-west traffic to access between microservices based on the introduced client traffic information.
[0075] The Ingress controller interacts with client traffic information, parses the reverse proxy rules of the Ingress, detects changes in the Ingress in real time, and determines whether a corresponding splitting strategy exists within the cluster. It then performs traffic splitting accordingly, providing a microservice access point for traffic migration to service instances. After the traffic is migrated to the cluster, the Ingress controller checks whether a corresponding splitting strategy exists within the cluster.
[0076] In one embodiment, the formulation module is specifically used to read traffic information; if it is determined that there is no corresponding splitting strategy for the traffic information within the cluster, such as when obtaining data information related to a new version of the application during a canary release, there will be no corresponding splitting strategy for the new version traffic information within the cluster. An Ingress is created for the service. At the same time, the relevant annotation information in the traffic information is obtained through the Ingress controller. The reverse proxy rules of the Ingress are parsed through the Ingress controller, and the obtained rule information and annotation information are stored in the created Ingress to split the obtained traffic information.
[0077] If it is determined that there is a corresponding segmentation strategy for the traffic information of the service, the segmentation strategy is obtained, the weight configuration ratio of each service instance corresponding to the traffic is calculated, and the traffic is segmented according to the corresponding segmentation strategy.
[0078] In summary, the traffic adjustment device provided in the above embodiments obtains traffic information through the acquisition module and determines whether there is a corresponding segmentation strategy through the judgment module. If there is no corresponding segmentation strategy, the corresponding strategy rules are obtained through the formulation module so that the segmentation module can segment the traffic information, which helps to realize traffic adjustment during canary releases in a Kubernetes cluster.
[0079] Based on the same inventive concept as the foregoing embodiments, this embodiment of the invention provides a flow rate adjustment device, such as... Figure 4 As shown, the device includes: a processor 210 and a memory 211 storing a computer program; wherein, Figure 4The processor 210 shown in the diagram does not refer to a single processor 210, but rather to its positional relationship relative to other devices. In practical applications, there can be one or more processors 210. Figure 4 The memory 211 illustrated herein has the same meaning, that is, it is only used to indicate the positional relationship of memory 211 relative to other devices. In practical applications, there can be one or more memories 211. When the processor 210 runs the computer program, the flow adjustment method applied to the above-described device is implemented.
[0080] The device may also include at least one network interface 212. The various components of the device are coupled together via a bus system 213. It is understood that the bus system 213 is used to implement communication between these components. In addition to a data bus, the bus system 213 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 4 The general designated all buses as Bus System 213.
[0081] The memory 211 can be volatile or non-volatile, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); magnetic surface memory can be disk storage or magnetic tape storage. Volatile memory can be random access memory (RAM), used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memory 211 described in the embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.
[0082] The memory 211 in this embodiment of the invention is used to store various types of data to support the operation of the device. Examples of such data include: any computer programs used to operate on the device, such as operating systems and applications; contact data; phonebook data; messages; pictures; videos, etc. The operating system includes various system programs, such as the framework layer, core library layer, driver layer, etc., used to implement various basic services and handle hardware-based tasks. Applications can include various applications, such as media players, browsers, etc., used to implement various application services. Here, the program implementing the method of this embodiment of the invention can be included in the application.
[0083] Based on the same inventive concept as the foregoing embodiments, this embodiment also provides a computer-readable storage medium storing a computer program. The computer-readable storage medium can be a magnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM), etc.; it can also be various devices including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc. When the computer program stored in the computer-readable storage medium is executed by a processor, it implements the flow adjustment method applied to the above-mentioned device. For the specific steps implemented when the computer program is executed by the processor, please refer to [link to relevant documentation]. Figure 1 The description of the illustrated embodiments will not be repeated here.
[0084] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0085] In this document, the terms “comprising,” “including,” or any other variations thereof are intended to cover non-exclusive inclusion, which includes not only the elements listed but also other elements not expressly listed.
[0086] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A traffic adjustment method applied to a Kubernetes container cloud platform, characterized in that, The method comprises: acquiring traffic information of client traffic; determining whether there is a splitting strategy corresponding to the traffic information in the cluster; if it is determined that there is no splitting strategy corresponding to the traffic information in the cluster, generating a corresponding splitting strategy according to the annotation information of the traffic information; if it is determined that there is a splitting strategy corresponding to the traffic information in the cluster, acquiring the splitting strategy; controlling the client traffic to be split in the cluster according to the splitting strategy; the traffic information comprises traffic size, traffic type and traffic-related annotation information; the traffic type comprises east-west traffic and north-south traffic; the determination of whether there is a splitting strategy corresponding to the traffic information in the cluster further comprises: creating an Ingress controller between a micro-service gateway and a service instance, interacting with client traffic information through the Ingress controller, analyzing the reverse proxy rules of Ingress, real-time sensing the changes of Ingress, and determining whether there is a splitting strategy corresponding to the traffic information in the cluster to correspondingly split the traffic and provide a micro-service access portal for traffic migration to the service instance; if it is determined that there is a splitting strategy corresponding to the traffic information in the cluster, acquiring the splitting strategy comprises: acquiring all Ingress and Ingress controllers of a container cloud platform from kubernetes, and reading traffic information through an Ingress controller detection interface; if it is determined that there is a splitting strategy corresponding to the traffic information of the service, acquiring the splitting strategy and calculating the weight configuration ratio of each service instance corresponding to the traffic, and splitting the traffic according to the corresponding splitting strategy.
2. The method of claim 1, wherein, After acquiring the traffic information of the client traffic, the method further comprises: exposing a port through a load balancer service to allow external network access and enable traffic migration to the service; creating an Ingress cluster service as an internal interface for traffic entry to migrate client traffic to the cluster for access; controlling east-west traffic to access between micro-services according to the introduced client traffic information in the cluster.
3. The method of claim 2, wherein, The method further comprises: if it is determined that there is no corresponding splitting strategy, acquiring the related annotation information of the traffic information through the Ingress controller; writing the created Ingress according to the copied policy rules and annotation information, and splitting the traffic information.
4. A flow regulating device, characterized by The device comprises: an acquisition module for acquiring traffic information of client traffic; the traffic information comprises traffic size, traffic type and traffic-related annotation information; the traffic type comprises east-west traffic and north-south traffic; a judgment module for determining whether there is a splitting strategy corresponding to the traffic information in the cluster; The judgment module is further configured to create an Ingress controller between the micro-service gateway and the service instance, interact with the client traffic information through the Ingress controller, parse the reverse proxy rules of the Ingress, perceive the changes of the Ingress in real time, and determine whether there is a splitting strategy corresponding to the traffic information in the cluster, so as to perform traffic splitting accordingly and provide a micro-service access portal for traffic migration to the service instance. The formulation module is configured to generate a corresponding splitting strategy according to the annotation information of the traffic information if it is determined that there is no splitting strategy corresponding to the traffic information in the cluster, and acquire the splitting strategy if it is determined that there is a splitting strategy corresponding to the traffic information in the cluster. The splitting module is configured to control the client traffic to be split in the cluster according to the splitting strategy. The formulation module is configured to acquire all Ingresses and Ingress controllers of a container cloud platform from kubernetes, read the traffic information through an Ingress controller detection interface, acquire the splitting strategy if it is determined that there is a splitting strategy corresponding to the traffic information of a service, and calculate the weight configuration ratio of each service instance corresponding to the traffic, so as to split the traffic according to the corresponding splitting strategy.
5. The apparatus of claim 4, wherein, The formulation module is specifically configured to: acquire the related annotation information of the traffic information through the Ingress controller if it is determined that there is no corresponding splitting strategy, write the replication strategy rules and the annotation information into the created Ingress, and split the traffic.
6. A flow regulating device, characterized by Specifically comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the traffic adjustment method according to any one of claims 1-3.
7. A computer-readable storage medium, characterized in that, When the instructions in the computer readable storage medium are executed by the processor, the traffic adjustment method according to any one of claims 1-3 is implemented.
Citation Information
Patent Citations
Multi-service flow shunt system based on SDN architecture and shunt data processing method
CN108566342A
Traffic shunting method and device, terminal and computer storage medium
CN114650293A