Service processing methods, devices and systems
By receiving the tag and network interface card name information from the service creation request, the system identifies and adds the service endpoint to the list, thus solving the problem of underutilization of the network plane in container groups and achieving efficient utilization of network resources.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA TELECOM CORP LTD
- Filing Date
- 2022-11-10
- Publication Date
- 2026-05-26
Smart Images

Figure CN115712481B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of virtualized network technology, and in particular to a method, apparatus and system for processing services. Background Technology
[0002] With the development of cloud technology, cloud networks are an important direction for network evolution for telecom operators. By cloudifying traditional hardware network elements (e.g., containerizing them), these elements can exist in container form. Depending on their service functions, network elements can be broken down into multiple container groups, and each container group can form a service to provide services to the outside world. Summary of the Invention
[0003] The inventors noted that network elements in traditional hardware forms in related technologies can have multiple network planes, such as multiple Internet Protocol (IP) addresses. Each of these multiple network planes can carry different types of network traffic, so when a network element with multiple network planes is split into container groups, each container group also has multiple network planes.
[0004] Further analysis by the inventors revealed that when a network element with multiple network planes is split into multiple container groups, only one default network plane of each container group (e.g., the first IP address in the IP address list corresponding to the container group) can be added to the service endpoints list to provide services externally. Instead, other network planes of the container group cannot be used to create services externally, resulting in the network planes in the container group not being fully utilized.
[0005] To address the aforementioned problems, the present disclosure proposes the following solutions.
[0006] According to one aspect of the embodiments of this disclosure, a service processing method is provided, comprising: receiving a service creation request corresponding to a network element, the network element including a plurality of container groups, the creation request including first information, second information and third information, the first information indicating at least one first label of the container group required by the service among the plurality of container groups, the second information indicating at least one first network interface card (NIC) name, and the third information indicating that the service is a service of a first preset type; determining a first group of container groups providing the service, the first group of container groups including each container group among the plurality of container groups having the at least one first label and the at least one first NIC name; and adding the Internet Protocol (IP) address corresponding to each container group in the first group of container groups and the at least one first NIC name to a service endpoint list to create the service.
[0007] In some embodiments, the at least one first network interface card (NIC) name includes a plurality of first NIC names.
[0008] In some embodiments, the method further includes: receiving a request to join a new container group, the request including at least one second label of the new container group and at least one second network interface name corresponding to the new container group; and adding the IP address corresponding to the at least one second network interface name to the server endpoint list if the at least one second label includes the at least one first label and the at least one second network interface name is the same as the at least one first network interface name.
[0009] In some embodiments, the method further includes: receiving a change request for the service, the change request indicating a change to at least one IP address in the service endpoint list; and changing the at least one IP address.
[0010] In some embodiments, the first information and the second information are carried in the annotation of the creation request.
[0011] In some embodiments, the service includes a stateful service or a stateless service.
[0012] In some embodiments, the service includes the Kubernetes service, a container cluster management system.
[0013] According to another aspect of the embodiments of this disclosure, a service processing apparatus is provided, comprising: a receiving module configured to receive a service creation request corresponding to a network element, the network element including a plurality of container groups, the creation request including first information, second information and third information, the first information indicating at least one first label of the container group required by the service among the plurality of container groups, the second information indicating at least one first network interface card (NIC) name, and the third information indicating that the service is a service of a first preset type; a determining module configured to determine a first group of container groups providing the service, the first group of container groups including each container group among the plurality of container groups having the at least one first label and the at least one first NIC name; and a creation module configured to add each container group in the first group of container groups and the Internet Protocol (IP) address corresponding to the at least one first NIC name to a service endpoint list to create the service.
[0014] According to another aspect of the present disclosure, a service processing apparatus is provided, comprising: a memory; and a processor coupled to the memory, the processor being configured to execute the method described in any of the above embodiments based on instructions stored in the memory.
[0015] According to another aspect of the embodiments of this disclosure, a service processing system is provided, comprising: a first controller, including the service processing apparatus described in any of the above embodiments; and a second controller configured to: receive another creation request for another service corresponding to the network element, the other creation request including fourth information, the fourth information indicating that the other service is a service of a second preset type and a third tag of the container group required by the other service among the plurality of container groups; determine a second group of container groups providing the other service, the second group of container groups including each container group among the plurality of container groups having the third tag; and add the default IP address of each container group in the second group of container groups to another service endpoint list to create the other service.
[0016] According to another aspect of the present disclosure, a computer-readable storage medium is provided, including computer program instructions, wherein the computer program instructions, when executed by a processor, implement the method described in any of the above embodiments.
[0017] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program, when executed by a processor, implements the method described in any of the above embodiments.
[0018] In this embodiment of the disclosure, by receiving a service creation request corresponding to a network element, and utilizing the three types of information carried in the creation request—indicating at least one tag of the container group required for the service, indicating at least one network interface card (NIC) name, and indicating the type of service—a set of container groups providing the service is determined. Then, the IP address corresponding to each container group and at least one NIC name in this set of container groups is added to the service endpoint list to create the service. This achieves the selection of network planes from all network planes of the container group to create services for external use, thereby improving the utilization rate of network planes in the container group.
[0019] The technical solutions of this disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart illustrating a service processing method according to some embodiments of this disclosure;
[0022] Figure 2This is a flowchart illustrating a service processing method according to other embodiments of this disclosure;
[0023] Figure 3 This is a schematic diagram of the structure of a service processing apparatus according to some embodiments of the present disclosure;
[0024] Figure 4 This is a schematic diagram of the structure of a service processing apparatus according to some embodiments of the present disclosure. Detailed Implementation
[0025] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0026] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of this disclosure.
[0027] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.
[0028] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0029] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.
[0030] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0031] Furthermore, in the description of this disclosure, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or order. Similarly, although operations are depicted in a specific order in the accompanying drawings, this should not be construed as requiring such operations to be performed in the specific order shown or in sequential order, or requiring the execution of all illustrated operations to achieve the desired result. In some cases, multitasking and parallel processing can be advantageous.
[0032] Figure 1This is a flowchart illustrating a service processing method according to some embodiments of the present disclosure.
[0033] In step 102, a service creation request corresponding to the network element is received. Here, the network element includes multiple container groups, and the creation request includes first information, second information, and third information. The first information indicates at least one first label of the container group required by the service in the multiple container groups, the second information indicates at least one first network interface card name, and the third information indicates that the service is a first preset type of service.
[0034] In some embodiments, a first label corresponds to one or more container groups.
[0035] In some embodiments, a container group can be a Pod.
[0036] In some embodiments, services include stateful services and stateless services.
[0037] In some embodiments, the service includes a container cluster management system (Kubernetes) service. In this case, third-party information can be indicated by the "selector" directive in the Kubernetes service creation request.
[0038] As one implementation, the second information may indicate one or more first network interface card names.
[0039] In some embodiments, network interface card (NIC) names may exist in different container groups. In this case, one NIC name may correspond to multiple IP addresses.
[0040] In some embodiments, a service of the first preset type may refer to a service that selects a network plane from among multiple network planes in each required container group.
[0041] In some embodiments, the first and second information may be carried in the annotations of the service creation request.
[0042] As one implementation, when the service creation request is a Kubernetes service creation request, the first information can be indicated in the form of a "podSelector" instruction, and the second information can be indicated in the form of a "netSelector" instruction. Here, both the "podSelector" and "netSelector" instructions are included in the annotations of the Kubernetes service creation request.
[0043] In step 104, a first group of container groups providing services is determined. Here, the first group of container groups includes each container group among multiple container groups that has at least one first tag and at least one first network interface name as described in step 102.
[0044] For example, if the first information indicates label A and label B, the second information indicates network interface card name C and network interface card name D, and the third information indicates that the service is a first preset type of service, all container groups in the first group of container groups have at least label A, label B, network interface card name C, and network interface card name D.
[0045] For example, if the first information indicates label E, the second information indicates network interface card name F, and the third information indicates that the service is a first preset type of service, all container groups in the first group of container groups have at least label E and network interface card name F.
[0046] In step 106, each container group in the first group of containers is added to the server endpoint list along with the IP address corresponding to at least one first network interface name mentioned in step 102 to create a service.
[0047] For the same container group, one primary network interface name corresponds to one IP address.
[0048] In some embodiments, a network plane can be created using IP addresses from a list of server endpoints.
[0049] In this way, by receiving the service creation request corresponding to the network element, and using the three pieces of information carried in the creation request—indicating at least one tag of the container group required for the service, indicating at least one network interface card (NIC) name, and indicating the type of service—a set of container groups that provide the service is determined. Then, the IP address corresponding to each container group and at least one NIC name in this set of container groups is added to the service endpoint list to create the service. This realizes the selection of network planes from all network planes of the container group to create services for external use, thereby improving the utilization rate of network planes in the container group.
[0050] In some embodiments, a service change request may be received to change at least one IP address. Here, the change request indicates a change to at least one IP address in the service endpoint list.
[0051] For example, at least one IP address in the server endpoint list can be deleted; or, for another example, at least one IP address in the server endpoint list can be replaced. Yet another example is deleting the first group of IP addresses in the server endpoint list and replacing it with the second group of IP addresses, where each group contains at least one IP address.
[0052] Next, we will illustrate how to perform a service processing method according to some embodiments of this disclosure using a specific example. Figure 1 The specific method is shown.
[0053] A service creation request may include the following instructions:
[0054] annotations:
[0055] podSelector:{app:nginx}
[0056] netSelector:{eth0,net1}
[0057] spec:
[0058] selector:[]”
[0059] In this context, "app:nginx" is the first tag of the container group required by the service, "eth0" and "net1" are the first network interface card names, and an empty "selector" attribute value indicates that the service is of the first preset type. That is, the first information indicates at least one first tag of the container group required by the service among multiple container groups, the second information indicates at least one first network interface card name, and the third information indicates that the service is of the first preset type.
[0060] A Kubernetes cluster consists of two Pods, Pod1 and Pod2. Pod1 has two network interface names: "eth0" and "net1," corresponding to IP addresses "10.1.2.1" and "10.2.2.1," respectively. Pod2 also has two network interface names: "eth0" and "net1," corresponding to IP addresses "10.1.2.2" and "10.2.2.2," respectively. Both Pod1 and Pod2 are labeled "app:nginx."
[0061] The following describes the specific steps for processing the service.
[0062] Step 1: The service creation request is submitted to the Kubernetes cluster. Since the "selector" attribute is empty, while the "podSelector" and "netSelector" attributes are not empty, the service is a service of the first preset type.
[0063] Step 2: Since it is a service of the first preset type, the EP controller first filters out two Pods (i.e., Pod1 and Pod2) based on the value of "podSelector", and then selects the two network planes "eth0" and "net1" (a total of 4 IP addresses, i.e. "10.1.2.1", "10.2.2.1", "10.1.2.2", and "10.2.2.2") from the two Pods based on the value of "netSelector".
[0064] Step 3: EP-Controller adds these 4 IP addresses to the server endpoint list.
[0065] The inventors also noted that in related technologies, if a service is to be created using the network plane of a new container group, the network plane of the new container group needs to be added to the service endpoint list in order to create the service based on the new service creation request.
[0066] Figure 2 This is a flowchart illustrating a service processing method according to other embodiments of this disclosure.
[0067] In step 202, a request to join a new container group is received. Here, the request to join includes at least one second label for the new container group and at least one second network interface name corresponding to the new container group.
[0068] In some embodiments, the new container group can be as follows: Figure 1 The newly separated container group from the network element in the steps shown can also be similar to... Figure 1 The steps shown are for the newly split container groups of other network elements with the same network element function.
[0069] In step 204, if the at least one second label in step 202 includes the at least one first label in step 102, and the at least one second network interface name in step 202 is the same as the at least one first network interface name in step 102, then the IP address corresponding to the second network interface name in step 202 is added to the server endpoint list.
[0070] In this way, by corresponding the relationship between the second label and the first label, and the relationship between the second network interface name and the first network interface name, the IP address corresponding to the second network interface name of the new container group can be added to the service endpoint list. Thus, when it is necessary to create a service using the network plane of the new container group, it is not necessary to add the network plane of the new container group to the service endpoint list to create the service based on the new service creation request, which reduces the service creation time and improves the utilization rate of the network plane in the container group.
[0071] Next, we will illustrate how to perform a service processing method according to some embodiments of this disclosure using a specific example. Figure 2 The specific method is shown.
[0072] There are two new Pods, Pod1 and Pod2.
[0073] Pod1 has two labels ("app:web" and "frontend:true") and two network interface names ("eth0" and "net1"). The IP address corresponding to "eth0" is "10.1.26.26" and the IP address corresponding to "net1" is "10.2.26.26".
[0074] Pod2 has three labels ("app:web", "frontend:true", and "backend:true") and three network interface names: "eth0", "net1", and "eth2". The IP address corresponding to "eth0" is "10.1.26.27", the IP address corresponding to "eth1" is "10.2.26.27", and the IP address corresponding to "eth2" is "10.3.26.27".
[0075] It is known that there are three services of the first preset type, namely service1, service2 and service3.
[0076] The "podSelector" and "netSelector" of service1 are "podSelector:{app:web}" and "netSelector:[eth0]" respectively.
[0077] The "podSelector" and "netSelector" of service2 are "podSelector:{app:web,backend:true}" and "netSelector:[eth2]" respectively.
[0078] The "podSelector" and "netSelector" of service3 are "podSelector:{backend:true}" and "netSelector:[eth4]" respectively.
[0079] Upon receiving join requests from these two Pods, the service's processing steps are as follows (using service1 as an example).
[0080] Step 1: Both Pod1 and Pod2 have the tag "app:web" in the "podSelector" of service1, so both Pods will be selected.
[0081] Step 2: Match with "netSelector". The value of "netSelector" in service1 is "eth0". Both Pod1 and Pod2 have "eth0". Therefore, the network interface name "eth0" in these two Pods will be selected. So the IP addresses that can be added to the endpoints list of service1 are 10.1.26.26 and 10.1.26.27.
[0082] Following this logic, we can conclude that the IP address that can be added to the endpoint list of service2 is 10.3.26.27; there is no IP address that can be added to the endpoint list of service3.
[0083] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus embodiments, since they largely correspond to the method embodiments, the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0084] Figure 3 This is a schematic diagram of the structure of a service processing apparatus according to some embodiments of the present disclosure.
[0085] like Figure 3 As shown, the service processing device includes a receiving module 301, a determining module 302, and a creating module 303.
[0086] The receiving module 301 is configured to receive a service creation request corresponding to a network element. The network element includes multiple container groups. The creation request includes first information, second information and third information. The first information indicates at least one first label of the container group required by the service in the multiple container groups. The second information indicates at least one first network interface card name. The third information indicates that the service is a first preset type of service.
[0087] The determination module 302 is configured to determine a first group of container groups that provide services, the first group of container groups including each of a plurality of container groups having at least one first label and at least one first network interface name.
[0088] The creation module 303 is configured to add each container group in the first group of container groups to the service endpoint list along with the IP address corresponding to at least one first network interface name to create a service.
[0089] In some embodiments, the service processing apparatus may further include other modules to perform the service processing method of any of the above embodiments.
[0090] Figure 4 This is a schematic diagram of the structure of a service processing apparatus according to some embodiments of the present disclosure.
[0091] like Figure 4 As shown, the service processing apparatus 400 includes a memory 401 and a processor 402 coupled to the memory 401. The processor 402 is configured to execute the method of any of the foregoing embodiments based on instructions stored in the memory 401.
[0092] The memory 401 may include, for example, system memory, fixed non-volatile storage media, etc. The system memory may store, for example, an operating system, application programs, a boot loader, and other programs.
[0093] The service processing device 400 may also include an input / output interface 403, a network interface 404, and a storage interface 405. These interfaces 403, 404, and 405, as well as the memory 401 and processor 402, can be connected, for example, via a bus 406. The input / output interface 403 provides a connection interface for input / output devices such as monitors, mice, keyboards, and touchscreens. The network interface 404 provides a connection interface for various networked devices. The storage interface 405 provides a connection interface for external storage devices such as SD cards and USB flash drives.
[0094] This disclosure also provides a service processing system, including: a first controller and a second controller.
[0095] The first controller includes the service processing apparatus of any of the above embodiments.
[0096] The second controller is configured to receive another creation request for another service corresponding to a network element, the other creation request including fourth information indicating that the other service is a service of a second preset type and a third label of the container group required by the other service among multiple container groups; determine a second set of container groups to provide the other service, the second set of container groups including each container group among multiple container groups with the third label; and add the default IP address of each container group in the second set of container groups to the other service endpoint list to create the other service.
[0097] In some embodiments, a service of the second preset type may refer to a service that adds a default network plane of the container group to the list of service endpoints.
[0098] In some embodiments, the first controller and the second controller can simultaneously listen for service creation requests. If the service is detected to be a service of a first preset type, the first controller performs the subsequent response operations described above, while the second controller does not need to perform any subsequent response operations. If the service is detected to be a service of a second preset type, the first controller does not need to perform any subsequent response operations, while the second controller performs the subsequent response operations.
[0099] In some embodiments, the fourth information may be the information corresponding to "selector". For example, if the attribute value of "selector" is not empty, it may indicate that the service is a service of the second preset type, and the specific attribute value of "selector" may indicate the third tag of the required container group.
[0100] This disclosure also provides a computer-readable storage medium including computer program instructions that, when executed by a processor, implement the method of any of the above embodiments.
[0101] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the method of any of the above embodiments.
[0102] The embodiments of this disclosure have now been described in detail. To avoid obscuring the concept of this disclosure, some details known in the art have not been described. Those skilled in the art can fully understand how to implement the technical solutions disclosed herein based on the above description.
[0103] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0104] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that the functions specified in one or more flowchart illustrations and / or one or more blocks in a block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate functions for implementing the functions in the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1A device that provides the functions specified in one or more boxes.
[0105] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0106] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0107] While specific embodiments of this disclosure have been described in detail by way of examples, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of this disclosure. Those skilled in the art should understand that modifications can be made to the above embodiments or equivalent substitutions can be made to some technical features without departing from the scope and spirit of this disclosure. The scope of this disclosure is defined by the appended claims.
Claims
1. A method for processing a service, comprising: Receive a service creation request corresponding to a network element. The network element includes multiple container groups. The creation request includes first information, second information, and third information. The first information indicates at least one first label of the container group required by the service in the multiple container groups. The second information indicates at least one first network interface card name. The third information indicates that the service is a service of a first preset type. The service of the first preset type is a service that selects a network plane from multiple network planes in each required container group. A first group of container groups is determined to provide the service, the first group of container groups including each of the plurality of container groups having the at least one first label and the at least one first network interface name; Add the Internet Protocol IP address corresponding to each container group in the first group of container groups and the at least one first network interface name to the service endpoint list to create the service.
2. The method of claim 1, wherein, The at least one first network interface card name includes multiple first network interface card names.
3. The method according to claim 1 or 2, further comprising: Receive a request to join a new container group, the request including at least one second label of the new container group and at least one second network interface name corresponding to the new container group; If at least one second label contains at least one first label and at least one second network interface name is identical to at least one first network interface name, then the IP address corresponding to the at least one second network interface name is added to the server endpoint list.
4. The method according to claim 1, further comprising: Receive a change request for the service, the change request indicating a change to at least one IP address in the service endpoint list; Change the at least one IP address.
5. The method of claim 1, wherein, The first and second information are carried in the annotation of the creation request.
6. The method of claim 1, wherein, The services include stateful services or stateless services.
7. The method of claim 1, wherein, The services include the Kubernetes service, a container cluster management system.
8. A service processing apparatus, comprising: The receiving module is configured to receive a service creation request corresponding to a network element, wherein the network element includes multiple container groups, and the creation request includes first information, second information and third information. The first information indicates at least one first label of the container group required by the service in the multiple container groups, the second information indicates at least one first network interface card name, and the third information indicates that the service is a service of a first preset type. The service of the first preset type is a service that selects a network plane from multiple network planes in each required container group. The determination module is configured to determine a first group of container groups that provide the service, the first group of container groups including each of the plurality of container groups having the at least one first label and the at least one first network interface name; The creation module is configured to add each container group in the first group of container groups and the Internet Protocol IP address corresponding to the at least one first network interface name to the service endpoint list to create the service.
9. A service processing apparatus, comprising: Memory; as well as A processor coupled to the memory is configured to execute the method of any one of claims 1-7 based on instructions stored in the memory.
10. A service processing system, comprising: The first controller includes the service processing apparatus of claim 8 or 9; The second controller is configured as follows: Receive another creation request for another service corresponding to the network element, the other creation request including fourth information, the fourth information indicating that the other service is a service of a second preset type and a third tag of the container group required by the other service among the plurality of container groups; A second group of containers is determined to provide the other service, the second group of containers comprising each of the plurality of container groups having the third tag; Add the default IP address of each container group in the second group to another service endpoint list to create the other service.
11. A computer readable storage medium comprising computer program instructions, wherein, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1-7.
12. A computer program product comprising a computer program, wherein, When the computer program is executed by a processor, it implements the method described in any one of claims 1-7.