CN117082152B - Service processing method, system and device - Google Patents

Service processing method, system and device Download PDF

Info

Publication number
CN117082152B
CN117082152B CN202311269312.8A CN202311269312A CN117082152B CN 117082152 B CN117082152 B CN 117082152B CN 202311269312 A CN202311269312 A CN 202311269312A CN 117082152 B CN117082152 B CN 117082152B
Authority
CN
China
Prior art keywords
service
domain name
private network
network domain
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311269312.8A
Other languages
Chinese (zh)
Other versions
CN117082152A (en
Inventor
谢瑞涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN202311269312.8A priority Critical patent/CN117082152B/en
Publication of CN117082152A publication Critical patent/CN117082152A/en
Application granted granted Critical
Publication of CN117082152B publication Critical patent/CN117082152B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a service processing method, a service processing system and a service processing device. The domain name is not exhausted like the port number, so that the problem that the port number is exhausted and service cannot be provided is solved, the domain name is dynamically configured through the input component without manual distribution, the working efficiency of the K8S system can be effectively improved, and the working efficiency of an MEP platform to which the K8S system belongs is improved.

Description

Service processing method, system and device
Technical Field
The present application relates to the field of internet technologies, and in particular, to a service processing method, system, and device.
Background
With the growth of new services such as virtual reality technology, high-definition video and automatic driving technology, a telecommunication network is facing new challenges such as real-time computing power, ultra-low time delay and ultra-large bandwidth. To alleviate these problems, moving edge computing (Multi-access Edge Computing, MEC) begins to gradually mold.
The multi-access edge computing platform (Multi access Edge Platform, MEP) is a service center of the MEC. Each service provider Application (APP) typically needs to register in Kubernetes (K8S) in the MEP to expose service capabilities to the outside through K8S before providing services to the MEP. In the prior art, the K8S exposes service capability to the outside in a node port mode, and in the mode, the K8S allocates a corresponding port number to the service providing terminal, so that a user accesses the service providing terminal inside the K8S by means of the IP address and the port number of the K8S.
In the above method, on one hand, the port number resource of the K8S is limited, and under the condition that the number of service providing terminals is continuously increased, the port number is eventually exhausted, so that the service cannot be continuously provided. On the other hand, the service provider registers to K8S, needs to manually and backstage to look up which port numbers are not occupied, and has low efficiency and high error rate.
Disclosure of Invention
In view of this, the present application provides a service processing method, system and device.
The embodiment of the application provides a service processing method, which is applied to an API gateway, wherein the API gateway is in butt joint with a Kubernetes system, the Kubernetes system is provided with a plurality of service providing ends and an Ingress component, the Ingress component is a service interface for providing external services of the Kubernetes system, and the corresponding relation between the IP address of each service providing end and a private network domain name corresponding to the service providing end is recorded; the method comprises the steps that an API gateway associates a DNS server, and the DNS server records the corresponding relation between an IP address of a Kubernetes system and private network domain names corresponding to service providing ends deployed in the Kubernetes system; the method comprises the following steps:
receiving a service request for requesting a target service;
acquiring a target private network domain name of a service providing end for providing target service based on the target service;
acquiring an IP address of a Kubernetes system corresponding to a target private network domain name from a DNS server;
the service request and the target private network domain name are forwarded to the Kubernetes system corresponding to the IP address, so that the Ingress component of the Kubernetes system forwards the service request to the service provider providing the target service based on the target private network domain name.
The embodiment of the application also provides a service processing system, which comprises: the system comprises a Kubernetes system, an API gateway for docking the Kubernetes system, and an API gateway associated DNS server; the Kubernetes system is deployed with a plurality of service providers and Ingress components;
any service providing end is used for providing service outwards through the Ingress component;
the access component is used for providing a service interface of the Kubernetes system for external service, recording the corresponding relation between the IP address of each service providing end and the private network domain name corresponding to the service providing end, determining the service providing end corresponding to the target private network domain name from the corresponding relation between each service providing end and the private network domain name corresponding to each service providing end when receiving the target private network domain name and the service request forwarded by the API gateway, and forwarding the service request to the service providing end corresponding to the target private network domain name;
the DNS server is used for recording the corresponding relation between the IP address of the Kubernetes system and the private network domain name corresponding to each service providing end deployed in the Kubernetes system, acquiring the IP address of the Kubernetes system corresponding to the target private network domain name from the corresponding relation between the IP address of the Kubernetes system and the private network domain name corresponding to each service providing end when receiving the target private network domain name forwarded by the API gateway, and issuing the IP address of the Kubernetes system to the API gateway;
and the API gateway is used for executing the steps of the method.
The embodiment of the application also provides a service processing device,
the device is applied to an API gateway, the API gateway is in butt joint with a Kubernetes system, the Kubernetes system is provided with a plurality of service providing ends and an Ingress component, the Ingress component is a service interface for providing external services of the Kubernetes system, and the corresponding relation between the IP address of each service providing end and the private network domain name corresponding to the service providing end is recorded; the method comprises the steps that an API gateway associates a DNS server, and the DNS server records the corresponding relation between an IP address of a Kubernetes system and private network domain names corresponding to service providing ends deployed in the Kubernetes system;
the device comprises:
a first receiving module for receiving a service request for requesting a target service;
the first acquisition module is used for acquiring a target private network domain name of a service providing end for providing target service based on the target service;
the second acquisition module is used for acquiring the IP address of the Kubernetes system corresponding to the target private network domain name from the DNS server;
and the forwarding module is used for forwarding the service request and the target private network domain name to the Kubernetes system corresponding to the IP address, so that the Ingress component of the Kubernetes system forwards the service request to a service providing end for providing the target service based on the target private network domain name.
The embodiment of the application also provides electronic equipment, which comprises: a processor and a memory for storing computer program instructions which, when executed by the processor, cause the processor to perform the steps of the method as above.
The present embodiments also provide a machine-readable storage medium storing computer program instructions that, when executed, enable the steps of the above method to be carried out.
As can be seen from the above technical solution, in the embodiment of the present application, by installing an Ingress component in a K8S system, and using the Ingress component as a service interface for external service of the K8S system, recording, in the Ingress component, a correspondence between each service provider in the K8S system and a private network domain name corresponding to each service provider, recording, in an API gateway that interfaces with the K8S system, a private network domain name corresponding to each service provider, and recording, in a DNS server associated with the API gateway, a correspondence between an IP address of the K8S system and a private network domain name corresponding to each service provider, so as to achieve the following purposes: when receiving a service request for requesting a target service, the API gateway obtains a target private network domain name of a service provider for providing the target service according to private network domain names and target services corresponding to the service providers recorded by the API gateway, obtains an IP address of a K8S system corresponding to the target private network domain name from a DNS server, and forwards the service request and the target private network domain name to the IP address of the K8S system, so that when receiving the service request and the target private network domain name, an access component of the K8S system forwards the service request to the service provider capable of providing the target service according to the corresponding relation between the service providers recorded by the API gateway and the private network domain names corresponding to the service providers, and the service provider capable of providing the target service can provide the service to the outside.
In the method, the private network domain name is not exhausted like the port number, so that the problem that the port number is exhausted and service cannot be provided is solved, the private network domain name is dynamically configured through the Ingress component without manual distribution, the working efficiency of the K8S system can be effectively improved, and the working efficiency of the MEP platform to which the K8S system belongs is improved.
Drawings
Fig. 1 is a schematic diagram of a service processing method provided in the prior art.
Fig. 2 is a grid pattern of a system according to an exemplary embodiment of the present application.
Fig. 3 is a flowchart of a service processing method according to an exemplary embodiment of the present application.
Fig. 4 is a schematic structural diagram of a service processing device according to another embodiment of the present application.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings identify the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
In order to better understand the technical solutions provided by the embodiments of the present application and make the above objects, features and advantages of the embodiments of the present application more obvious, the technical solutions in the embodiments of the present application are described in further detail below with reference to the accompanying drawings.
In order to facilitate understanding of the present solution, prior art technical problems existing in the prior art will be described in detail before describing the present solution:
MEC is a brand new distributed computing mode based on a mobile communication network, and is constructed in a cloud service environment at the side of a wireless access network (Radio Access Network, RAN), and the goals of saving cost, reducing time delay and round trip time, optimizing traffic, enhancing physical security, cache efficiency and the like are achieved by separating certain network services and network functions from a core network. Based on MEC, end users can get a more elegant experience, richer applications and safer and more reliable use.
MEP is the service center of MEC. Each billing service provider typically needs to register in the K8S in the MEP to expose service capabilities externally through the K8S before serving the MEP.
Referring to fig. 1, the K8S system exposes service capabilities in a node port mode, and each service provider occupies one or more port numbers to provide service capabilities and interfaces with the gateway device. The gateway device maps the external service capability to the port number of each service provider. In the above manner, if the service provider needs to occupy a group of port numbers for providing the service to the outside, the port numbers do not have a ready-made management method, and each time, an administrator needs to check which port numbers are not used in the background, and then find the port numbers which are not occupied to provide the service provider, which has low efficiency and high error rate. In addition, in the K8S system, the port number resource is limited, and in the case that the number of service providing terminals is continuously increased, the service providing terminals are eventually exhausted, so that the service cannot be continuously provided.
In view of this, the present application proposes a service processing method to solve the above-mentioned problems.
In order to better understand the technical solutions provided by the embodiments of the present application and make the above objects, features and advantages of the embodiments of the present application more comprehensible, the technical solutions in the embodiments of the present application are described in further detail below with reference to the accompanying drawings.
In order to facilitate understanding of the present method, before describing the present method, a system provided in an embodiment of the present application is described:
fig. 2 is a grid pattern of a system according to an exemplary embodiment of the present application. It should be noted that, the service processing method provided in the embodiment of the present application is implemented in a networking architecture shown in fig. 2. As shown in fig. 2, the system includes: the K8S system, an API gateway interfacing with the Kubernetes system, and an API gateway associated DNS server. The K8S system is deployed with a plurality of service providing terminals and an Ingress component, and the plurality of service providing terminals are distributed. The Ingress component is a service interface for providing external services of the K8S system, and the IP address of each service providing end provides services outwards through the Ingress component.
Each service provider needs to register in the K8S system to provide services externally. The Ingress component receives the domain name configuration file, identifies the service identifier of each service provider in the domain name configuration file and the private network domain name corresponding to each service provider, and establishes a corresponding relationship between each service provider and the private network domain name corresponding to each service provider. As one embodiment, the domain name configuration file is placed in the K8S system in the form of a code, the entry component analyzes the code to obtain the IP address of each service provider and the private network domain name corresponding to each service provider, and establishes a correspondence between the IP address of each service provider and the private network domain name corresponding to each service provider.
It should be noted that, the private network domain name is a domain name in the K8S system, and is not a public network assigned domain name in the prior art.
After establishing the corresponding relation between each service providing end and the private network domain name corresponding to each service providing end, the access component issues the private network domain name corresponding to each service providing end and the IP address of the Kubernetes system to a DNS server by calling a local function interface, and at the moment, the DNS server records the corresponding relation between the IP address of the Kubernetes system and the private network domain name corresponding to each service providing end deployed in the Kubernetes system.
The working mode of the Ingress component is a load balancing loadbalancing mode.
Each service provider also needs to register on an API gateway, and when the API gateway registers, the IP address of each service provider provides the service identifier of the service provided by the service provider and the private network domain name corresponding to the service provider, and the API gateway establishes a correspondence between the service identifier of the service provided by each service provider and the private network domain name corresponding to each service provider. At this time, the API gateway obtains a correspondence between a service identifier of a service provided by each service provider and a private network domain name corresponding to each service provider.
The specific workflow of the API will be described in detail in the following embodiments, which are not described herein.
The following describes a service processing method provided in an embodiment of the present application:
referring to fig. 3, fig. 3 is a flowchart of a service processing method according to an exemplary embodiment of the present application. As one embodiment, the method comprises the steps of interfacing an API gateway with a Kubernetes system, wherein the Kubernetes system is provided with a plurality of service providing ends and an Ingress component, the Ingress component is a service interface for providing external services of the Kubernetes system, and recording the corresponding relation between the IP address of each service providing end and the private network domain name corresponding to the service providing end; the API gateway associates a DNS server, and the DNS server records the corresponding relation between the IP address of the Kubernetes system and the private network domain name corresponding to each service providing end deployed in the Kubernetes system.
As shown in fig. 3, the process may include the steps of:
s301, a service request for requesting a target service is received.
In this embodiment, the API gateway receives a service request sent by a route for requesting a target service.
S302, acquiring a target private network domain name of a service providing end for providing the target service based on the target service.
In this embodiment, because the corresponding relationship between the service identifier of the service provided by each service provider and the private network domain name corresponding to each service provider is stored in the API gateway, the service request carries the service identifier of the target service, and then the API queries the target private network domain name of the service provider for providing the target service from the corresponding relationship. The purpose of converting the service request into a target private network domain name for a service provider providing the target service is achieved at the API gateway.
S303, acquiring the IP address of the Kubernetes system corresponding to the target private network domain name from the DNS server.
In this embodiment, the API gateway may interface with more than one K8S system, and the API gateway is only associated with one DNS server that provides domain name resolution service for the API gateway, so that after obtaining a target private network domain name, the API gateway needs to determine which service provider of which K8S server provides services for the user, and query the DNS server for the IP address of the K8S system corresponding to the target private network domain name.
For one embodiment, a specific implementation of the association of an API gateway with a DNS server may be to modify the API gateway configuration in advance to achieve association with the DNS.
As a further embodiment, the API gateway is multiplexed by a DNS server, implementing an API gateway association DNS server that provides domain name resolution services for the API gateway.
S304, forwarding the service request and the target private network domain name to the Kubernetes system corresponding to the IP address, so that the Ingress component of the Kubernetes system forwards the service request to a service provider for providing the target service based on the target private network domain name.
As an embodiment, further comprising: acquiring a private network domain name corresponding to each service providing end and a service identifier of a service provided by each service providing end; the private network domain name corresponding to the IP address of each service provider and the service identifier of the provided service are provided when the service provider registers in the API gateway, and a corresponding relation between the service identifier of the service provided by each service provider and the private network domain name corresponding to each service provider is established so as to obtain the target private network domain name of the service provider for providing the target service based on the corresponding relation and the service request when a service request for requesting the target service is received.
In this embodiment, the IP address of each service provider provides the service identifier of the service provided by the service provider and the private network domain name corresponding to the service provider when the API gateway registers, so that the API gateway obtains the private network domain name corresponding to each service provider. The service identifier may be a service ID or a service name, for example, a map, etc., which is not specifically limited in the embodiments of the present application.
As one embodiment, the API gateway establishes a correspondence between the service identifier of the service provided by each service provider and the private domain name corresponding to each service provider after obtaining the service identifier of the service provided by each service provider and the private domain name corresponding to each service provider.
In this embodiment, since the K8S system is a distributed cluster, the Ingress component is installed on any server in the cluster, and the Ingress component is a unified external interface for providing services for the K8S, then the IP address of the K8S system is the IP address of the server in the cluster on which the Ingress component is installed. And the API gateway forwards the service request and the target private network domain name to the IP address of the K8S system, and the Ingress component receives the service request and the target private network domain name.
Recording the corresponding relation between each service providing end and the private network domain name corresponding to each service providing end in the Ingress component, inquiring the service providing end corresponding to the target private network domain name from the corresponding relation, and forwarding the service request to the service providing end corresponding to the target private network domain name so as to enable the service providing end corresponding to the target private network domain name to provide the target service outwards.
As an embodiment, the Ingress component records a correspondence between an IP address of each service provider and a private network domain name corresponding to each service provider, queries an IP address of the service provider corresponding to the target private network domain name from the correspondence, and forwards a service request to the service provider corresponding to the target private network domain name, so that the service provider corresponding to the target private network domain name provides the target service outwards.
The IP address of the service provider here is a class C IP address inside the K8S system, and is not an IP address allocated by the public network.
Thus, the flow shown in fig. 3 is completed.
By means of the flow shown in figure 3,
by installing an Ingress component in a K8S system, using the Ingress component as a service interface of external service of the K8S system, recording a corresponding relation between each service providing end in the K8S system and a private network domain name corresponding to each service providing end in the Ingress component, recording the private network domain name corresponding to each service providing end at an API gateway for butting the K8S system, and recording a corresponding relation between an IP address of the K8S system and the private network domain name corresponding to each service providing end on a DNS server associated with the API gateway, the following purposes are achieved: when receiving a service request for requesting a target service, the API gateway obtains a target private network domain name of a service provider for providing the target service according to private network domain names and target services corresponding to the service providers recorded by the API gateway, obtains an IP address of a K8S system corresponding to the target private network domain name from a DNS server, and forwards the service request and the target private network domain name to the IP address of the K8S system, so that when receiving the service request and the target private network domain name, an access component of the K8S system forwards the service request to the service provider capable of providing the target service according to the corresponding relation between the service providers recorded by the API gateway and the private network domain names corresponding to the service providers, and the service provider capable of providing the target service can provide the service to the outside.
In the method, the domain name is not exhausted like the port number, so that the problem that the port number is exhausted and service cannot be provided is solved, the domain name is dynamically configured through the Ingress component without manual distribution, the working efficiency of the K8S system can be effectively improved, and the working efficiency of an MEP platform to which the K8S system belongs is improved.
For a more detailed understanding of the present method, the following examples will illustrate the method in more detail with the system shown in fig. 2. The method comprises the following flow.
1. A DNS server is created outside the K8S system.
2. The configuration of the API gateway equipment corresponding to the K8S system is modified, the DNS server configuration is increased, and the DNS server is pointed. For example, the API gateway device configuration is expressed as follows: export "kong_dns_response=127.0.0.1:8053".
3. And installing an Ingress component in the K8S system, and modifying the mode of externally exposing the Ingress into a loadbalance mode.
4. The domain name configuration file is placed in a K8S system in a code form, the Ingress component analyzes the code to obtain the IP address of each service providing end and the domain name corresponding to each service providing end, and a corresponding relation between each service providing end and the private network domain name corresponding to each service providing end is established.
5. And the access component transmits the private network domain name corresponding to each service providing end and the IP address of the Kubernetes system to the DNS server by calling the local function interface, domain name configuration is added on the DNS server, and the private network domain name corresponding to each service providing end is mapped to the IP address of the K8S.
6. And adding an Ingress configuration in a configuration file of each service providing end, wherein the Ingress configures a private network domain name corresponding to the service providing end, and the service providing mode of the service providing end is also modified into a loadbalance mode.
7. Each service provider establishes registration information in the API gateway, and establishes a corresponding relationship between the service identifier of the service provided by each service provider and the private domain name corresponding to each service provider according to the service identifier of the service provided by each service provider in the registration information.
In the subsequent operation process, after an external service request reaches the API gateway equipment, the API gateway equipment inquires a domain name corresponding to the service name according to the service name carried in the service request, inquires an IP address of K8S corresponding to the domain name from an associated DNS server, and forwards the service request and a target private network domain name to the IP address of the K8S system. The Ingress component of the K8S forwards the service request to the service provider corresponding to the domain name, so that the service provider can provide the service represented by the service name for the user.
Fig. 4 is a schematic diagram of a service processing device according to an embodiment of the present application, where the device is applied to an API gateway, and the API gateway interfaces with a Kubernetes system, where the Kubernetes system is deployed with a plurality of service providing ends and an Ingress component, and the Ingress component is a service interface for providing external services of the Kubernetes system, and records a correspondence between an IP address of each service providing end and a private network domain name corresponding to the service providing end; and the API gateway is associated with a DNS server, and the DNS server records the corresponding relation between the IP address of the Kubernetes system and the private network domain name corresponding to each service providing end deployed in the Kubernetes system. As shown in fig. 4, the apparatus 400 includes: a first receiving module 401, a first obtaining module 402, a second obtaining module 403 and a forwarding module 404.
A first receiving module 401, configured to receive a service request for requesting a target service;
a first obtaining module 402, configured to obtain, based on the target service, a target private network domain name of a service provider for providing the target service;
a second obtaining module 403, configured to obtain, from the DNS server, an IP address of the Kubernetes system corresponding to the target private network domain name;
and the forwarding module 404 is configured to forward the service request and the target private network domain name to a Kubernetes system corresponding to the IP address, so that an Ingress component of the Kubernetes system forwards the service request to a service provider that provides the target service based on the target private network domain name.
As an embodiment, the apparatus further comprises:
the third acquisition module is used for acquiring the private network domain name corresponding to each service providing end and the service identifier of the service provided by each service providing end; the private network domain name corresponding to the IP address of each service provider and the service identifier for providing the service are provided when the service provider registers in the API gateway;
the system comprises a building module, a service providing module and a service providing module, wherein the building module is used for building a corresponding relation between a service identifier of a service provided by each service providing end and a private network domain name corresponding to each service providing end so as to obtain a target private network domain name of the service providing end for providing the target service based on the corresponding relation and the service request when a service request for requesting the target service is received.
As an embodiment, the apparatus further comprises:
the second receiving module is used for receiving the gateway configuration file; the gateway configuration file comprises an IP address of the DNS server;
and the association module is used for establishing association relation with the DNS server based on the IP address of the DNS server.
Referring to fig. 5, fig. 5 is a schematic hardware structure of an electronic device according to an embodiment of the present application. The electronic device may include a processor 501, a communication interface 502, a memory 503, and a communication bus 504. The processor 501, the communication interface 502, and the memory 503 perform communication with each other via a communication bus 504. Wherein the memory 503 has a computer program stored thereon; the processor 501 may perform the steps of the method described in the above embodiments by executing a program stored on the memory 503. The electronic device may further include other hardware according to the actual function of the electronic device, which will not be described in detail.
Embodiments of the subject matter and the functional operations described in this specification can be implemented in: digital electronic circuitry, tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and structural equivalents thereof, or a combination of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible, non-transitory program carrier for execution by, or to control the operation of, data processing apparatus. Alternatively or additionally, the program instructions may be encoded on a manually-generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode and transmit information to suitable receiver apparatus for execution by data processing apparatus. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them.
The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform corresponding functions by operating on input data and generating output. The processes and logic flows can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit).
Computers suitable for executing computer programs include, for example, general purpose and/or special purpose microprocessors, or any other type of central processing unit. Typically, the central processing unit will receive instructions and data from a read only memory and/or a random access memory. The essential elements of a computer include a central processing unit for carrying out or executing instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto-optical disks, or optical disks, etc. However, a computer does not have to have such a device. Furthermore, the computer may be embedded in another device, such as a mobile phone, a Personal Digital Assistant (PDA), a mobile audio or video player, a game console, a Global Positioning System (GPS) receiver, or a portable storage device such as a Universal Serial Bus (USB) flash drive, to name a few.
Computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices including, for example, semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disk or removable disks), magneto-optical disks, and CD-ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.
While this specification contains many specific implementation details, these should not be construed as limitations on the scope of any invention or of what may be claimed, but rather as descriptions of features of specific embodiments of particular inventions. Certain features that are described in this specification in the context of separate embodiments can also be implemented in combination in a single embodiment. On the other hand, the various features described in the individual embodiments may also be implemented separately in the various embodiments or in any suitable subcombination. Furthermore, although features may be acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination.
Similarly, although operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In some cases, multitasking and parallel processing may be advantageous. Moreover, the separation of various system modules and components in the embodiments described above should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
Thus, particular embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve desirable results. Furthermore, the processes depicted in the accompanying drawings are not necessarily required to be in the particular order shown, or sequential order, to achieve desirable results. In some implementations, multitasking and parallel processing may be advantageous.
The foregoing description of the preferred embodiment of the present invention is not intended to limit the invention to the particular form disclosed, but on the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the invention.

Claims (10)

1. The service processing method is characterized in that the method is applied to an API gateway, the API gateway is in butt joint with a Kubernetes system, the Kubernetes system is provided with a plurality of service providing ends and an Ingress component, the Ingress component is a service interface for providing external services of the Kubernetes system, and the corresponding relation between the IP address of each service providing end and the private network domain name corresponding to the service providing end is recorded; the API gateway associates a DNS server, and the DNS server records the mapping relation between the IP address of the Kubernetes system and the private network domain name corresponding to each service providing end deployed in the Kubernetes system;
the method comprises the following steps:
receiving a service request for requesting a target service; the service request carries the service identifier of the target service;
inquiring a target private network domain name of a service providing end for providing the target service from a stored corresponding relation between the service identifier of the service provided by each service providing end and the private network domain name corresponding to each service providing end based on the service identifier of the target service; the private network domain name is a domain name in the Kubernetes system and is not a public network domain name;
acquiring the IP address of the Kubernetes system corresponding to the target private network domain name from the mapping relation between the IP address of the Kubernetes system recorded on the DNS server and the private network domain name corresponding to each service providing end deployed in the Kubernetes system; the IP address of the Kubernetes system is the IP of a server for deploying the Ingress component in the Kubernetes system;
forwarding the service request and the target private network domain name to a Kubernetes system corresponding to the IP address, so that an entry component of the Kubernetes system queries the IP address of a service provider corresponding to the target private network domain name from the recorded corresponding relationship between the IP address of each service provider and the private network domain name corresponding to each service provider, and forwards the service request to the service provider providing the target service based on the obtained IP address of the service provider; the IP address of any service provider is a C-type IP address in the K8S system and is not an IP address distributed by the public network.
2. The method according to claim 1, wherein the method further comprises:
acquiring a private network domain name corresponding to each service providing end and a service identifier of a service provided by each service providing end; the private network domain name corresponding to the IP address of each service provider and the service identifier for providing the service are provided when the service provider registers in the API gateway;
and establishing a corresponding relation between service identifiers of services provided by the service providing ends and private network domain names corresponding to the service providing ends so as to acquire a target private network domain name of the service providing end for providing the target service based on the corresponding relation and the service request when receiving a service request for requesting the target service.
3. The method according to claim 1, wherein the method further comprises:
receiving a gateway configuration file; the gateway configuration file comprises an IP address of the DNS server;
and establishing an association relation with the DNS server based on the IP address of the DNS server.
4. A service processing system, comprising: the system comprises a Kubernetes system, an API gateway for docking the Kubernetes system and a DNS server associated with the API gateway; the Kubernetes system is provided with a plurality of service providing terminals and an Ingress component;
any service providing end is used for providing service outwards through the Ingress component;
the Ingress component is configured to provide a service interface of the Kubernetes system for external services, record a correspondence between an IP address of each service provider and a private network domain name corresponding to the service provider, determine, when receiving a target private network domain name and a service request forwarded by the API gateway, an IP address of the service provider corresponding to the target private network domain name from the recorded correspondence between each service provider and the private network domain name corresponding to each service provider, and forward the service request to the service provider corresponding to the target private network domain name based on the obtained IP address of the service provider; the private network domain name is a domain name in the Kubernetes system and is not a public network domain name;
the DNS server is used for recording the corresponding relation between the IP address of the Kubernetes system and the private network domain name corresponding to each service providing end deployed in the Kubernetes system, acquiring the IP address of the Kubernetes system corresponding to the target private network domain name from the corresponding relation between the IP address of the Kubernetes system and the private network domain name corresponding to each service providing end when receiving the target private network domain name forwarded by the API gateway, and transmitting the IP address of the Kubernetes system to the API gateway;
the API gateway for performing the steps of the method of any of the preceding claims 1 to 3.
5. The system of claim 4, wherein the Ingress component is further configured to identify, when receiving a domain name configuration file, an IP address of each service provider provided in the domain name configuration file and a private network domain name corresponding to each service provider, so as to establish a correspondence between each service provider and the private network domain name corresponding to each service provider.
6. The system of claim 5, wherein the Ingress component is further configured to, after establishing a correspondence between each service provider and a private domain name corresponding to each service provider, issue the private domain name corresponding to each service provider and an IP address of the Kubernetes system to the DNS server by invoking a local function interface.
7. The system of claim 4, wherein the mode of operation of the Ingress component is a load balancing loadbalancing mode.
8. The service processing device is characterized in that the device is applied to an API gateway, the API gateway is in butt joint with a Kubernetes system, the Kubernetes system is provided with a plurality of service providing ends and an Ingress component, the Ingress component is a service interface for providing external services of the Kubernetes system, and the corresponding relation between the IP address of each service providing end and the private network domain name corresponding to the service providing end is recorded; the API gateway associates a DNS server, and the DNS server records the corresponding relation between the IP address of the Kubernetes system and the private network domain name corresponding to each service providing end deployed in the Kubernetes system;
the device comprises:
a first receiving module for receiving a service request for requesting a target service; the service request carries the service identifier of the target service;
the first acquisition module is used for inquiring the target private network domain name of the service providing end for providing the target service from the stored corresponding relation between the service identifier of the service provided by each service providing end and the private network domain name corresponding to each service providing end based on the service identifier of the target service; the private network domain name is a domain name in the Kubernetes system and is not a public network domain name;
the second obtaining module is used for obtaining the IP address of the Kubernetes system corresponding to the target private network domain name from the mapping relation between the IP address of the Kubernetes system recorded on the DNS server and the private network domain name corresponding to each service providing end deployed in the Kubernetes system; the IP address of the Kubernetes system is the IP of a server for deploying the Ingress component in the Kubernetes system;
the forwarding module is used for forwarding the service request and the target private network domain name to a Kubernetes system corresponding to the IP address, so that an entry component of the Kubernetes system queries the IP address of the service provider corresponding to the target private network domain name from the recorded corresponding relation between the IP address of each service provider and the private network domain name corresponding to each service provider, and forwards the service request to the service provider for providing the target service based on the obtained IP address of the service provider; the IP address of any service provider is a C-type IP address in the K8S system and is not an IP address distributed by the public network.
9. The apparatus as recited in claim 8, further comprising:
the third acquisition module is used for acquiring the private network domain name corresponding to each service providing end and the service identifier of the service provided by each service providing end; the private network domain name corresponding to the IP address of each service provider and the service identifier for providing the service are provided when the service provider registers in the API gateway;
the system comprises a building module, a service providing module and a service providing module, wherein the building module is used for building a corresponding relation between a service identifier of a service provided by each service providing end and a private network domain name corresponding to each service providing end so as to obtain a target private network domain name of the service providing end for providing the target service based on the corresponding relation and the service request when a service request for requesting the target service is received.
10. The apparatus as recited in claim 8, further comprising:
the second receiving module is used for receiving the gateway configuration file; the gateway configuration file comprises an IP address of the DNS server;
and the association module is used for establishing association relation with the DNS server based on the IP address of the DNS server.
CN202311269312.8A 2023-09-27 2023-09-27 Service processing method, system and device Active CN117082152B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311269312.8A CN117082152B (en) 2023-09-27 2023-09-27 Service processing method, system and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311269312.8A CN117082152B (en) 2023-09-27 2023-09-27 Service processing method, system and device

Publications (2)

Publication Number Publication Date
CN117082152A CN117082152A (en) 2023-11-17
CN117082152B true CN117082152B (en) 2024-01-12

Family

ID=88717203

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311269312.8A Active CN117082152B (en) 2023-09-27 2023-09-27 Service processing method, system and device

Country Status (1)

Country Link
CN (1) CN117082152B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102891901A (en) * 2012-09-25 2013-01-23 中国联合网络通信集团有限公司 Dynamic domain name resolution method, server and domain name service system
EP3043535A1 (en) * 2015-01-09 2016-07-13 Verisign, Inc. Systems and methods for registering, managing, and communicating with iot devices using domain name system processes
WO2018233140A1 (en) * 2017-06-24 2018-12-27 平安科技(深圳)有限公司 Domain name resolution apparatus and method and computer readable storage medium
CN109347947A (en) * 2018-10-15 2019-02-15 郑州云海信息技术有限公司 A kind of method of load balancing, name server and cluster nas server
CN111193783A (en) * 2019-12-19 2020-05-22 新浪网技术(中国)有限公司 Service access processing method and device
CN112671860A (en) * 2020-12-15 2021-04-16 杭州溪塔科技有限公司 Service access method, system, electronic device and medium for kubernets cluster
EP4155994A1 (en) * 2021-09-28 2023-03-29 Citrix Systems Inc. Automated generation of objects for kubernetes services
CN116455869A (en) * 2023-05-06 2023-07-18 上海非码网络科技有限公司 Method and system for efficiently configuring public network domain name based on Kubernetes
WO2023134066A1 (en) * 2022-01-14 2023-07-20 平安科技(深圳)有限公司 Virtual private cloud service access method, apparatus and device, and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4078901A4 (en) * 2020-04-01 2023-10-11 VMWare, Inc. Auto deploying network elements for heterogeneous compute elements

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102891901A (en) * 2012-09-25 2013-01-23 中国联合网络通信集团有限公司 Dynamic domain name resolution method, server and domain name service system
EP3043535A1 (en) * 2015-01-09 2016-07-13 Verisign, Inc. Systems and methods for registering, managing, and communicating with iot devices using domain name system processes
WO2018233140A1 (en) * 2017-06-24 2018-12-27 平安科技(深圳)有限公司 Domain name resolution apparatus and method and computer readable storage medium
CN109347947A (en) * 2018-10-15 2019-02-15 郑州云海信息技术有限公司 A kind of method of load balancing, name server and cluster nas server
CN111193783A (en) * 2019-12-19 2020-05-22 新浪网技术(中国)有限公司 Service access processing method and device
CN112671860A (en) * 2020-12-15 2021-04-16 杭州溪塔科技有限公司 Service access method, system, electronic device and medium for kubernets cluster
EP4155994A1 (en) * 2021-09-28 2023-03-29 Citrix Systems Inc. Automated generation of objects for kubernetes services
WO2023134066A1 (en) * 2022-01-14 2023-07-20 平安科技(深圳)有限公司 Virtual private cloud service access method, apparatus and device, and storage medium
CN116455869A (en) * 2023-05-06 2023-07-18 上海非码网络科技有限公司 Method and system for efficiently configuring public network domain name based on Kubernetes

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
K. Chowdhury ; Nortel Networks ; P. Yegani ; Cisco Systems ; L. Madour ; Ericsson ; .DHCPv6 Options for Broadcast and Multicast Control Serversdraft-chowdhury-dhc-bcmcv6-option-01.txt.IETF .2004,全文. *
基于Kubernetes的海量网络数据存储方法研究;闫娟雅;电脑知识与技术;全文 *

Also Published As

Publication number Publication date
CN117082152A (en) 2023-11-17

Similar Documents

Publication Publication Date Title
US11445039B2 (en) Method and apparatus for providing edge computing services
WO2021017689A1 (en) User plane data acquisition method and apparatus, and storage medium
US11812496B2 (en) User group session management method and apparatus
CN113596191B (en) Data processing method, network element equipment and readable storage medium
WO2019042186A1 (en) Network management method and related device
WO2021135663A1 (en) Application instance determination method, device, and system
CN102598727B (en) Methods and apparatus for WAN/WLAN unicast and multicast communication
CN104767679B (en) A kind of method and device for transmitting data in network system
CN114902634A (en) Apparatus and method for providing information of application server in mobile communication system
WO2020248582A1 (en) Methods and apparatuses for logical tsn bridge
CN112243045A (en) Service data processing method and device, node structure and electronic equipment
JP2024511907A (en) Network function registration method, discovery method, equipment, device and medium
WO2021163901A1 (en) Session processing method and apparatus therefor
WO2020187124A1 (en) Data processing method and device
CN117082152B (en) Service processing method, system and device
WO2017045454A1 (en) Method, device and system for realizing terminal access
CN116566897A (en) Addressing routing method, device, equipment and medium
KR101378313B1 (en) Method, appratus, system and computer-readable recording medium for assisting communication between terminal and local host by using openflow
US20230171673A1 (en) Method and system for routing an internet protocol data packet between wireless computer devices connected to a cellular network
CN113709677B (en) Method and device for joining multicast broadcast service MBS session
US8811344B1 (en) Methods and apparatus for assigning same sequence number to multiple GTP messages
KR100876500B1 (en) WiBro channel allocation method for real time broadcasting service
CN113783963B (en) Data transmission method, server node, gateway equipment and network system
CN113169936A (en) Service chaining mechanism for data stream processing
CN115209522B (en) Network function registration method, discovery method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant