CN113037891A - Access method and device for stateful application in edge computing system and electronic equipment - Google Patents

Access method and device for stateful application in edge computing system and electronic equipment Download PDF

Info

Publication number
CN113037891A
CN113037891A CN202110327112.8A CN202110327112A CN113037891A CN 113037891 A CN113037891 A CN 113037891A CN 202110327112 A CN202110327112 A CN 202110327112A CN 113037891 A CN113037891 A CN 113037891A
Authority
CN
China
Prior art keywords
target
application
unit
stateful
minimum unit
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.)
Granted
Application number
CN202110327112.8A
Other languages
Chinese (zh)
Other versions
CN113037891B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110327112.8A priority Critical patent/CN113037891B/en
Publication of CN113037891A publication Critical patent/CN113037891A/en
Application granted granted Critical
Publication of CN113037891B publication Critical patent/CN113037891B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides an access method, a device, electronic equipment and a storage medium for stateful applications in an edge computing system; the method comprises the following steps: receiving an access request sent by a state application running in a target minimum unit, wherein the access request is used for accessing the target stateful application; analyzing the access request to obtain a target unit identifier for identifying the minimum unit; acquiring a domain name resolution file storing a mapping relation between a unit identifier and an internet protocol address, and searching a target internet protocol address corresponding to a target unit identifier in a target site to which a target minimum unit belongs based on the domain name resolution file; sending the target internet protocol address to the state application to enable the state application to access the target stateful application based on the target internet protocol address; by the method and the device, cross-site access can be avoided when applications access each other.

Description

Access method and device for stateful application in edge computing system and electronic equipment
Technical Field
The present application relates to the field of edge computing and computer technologies, and in particular, to a method and an apparatus for accessing a stateful application in an edge computing system, an electronic device, and a storage medium.
Background
In the related art, in a deployed cluster including multiple sites or regions, when an application running in a minimum unit pod located in a node within a site accesses a stateful application running in the pod, the internet protocol addresses of all pods running the stateful application in the cluster are often returned, and sites or regions are not distinguished, so that a cross-region or site access situation occurs, and some service applications do not wish to or allow the cross-site access.
Disclosure of Invention
The embodiment of the application provides an access method and device for stateful applications in an edge computing system, an electronic device and a storage medium, which can avoid cross-site access when the applications are accessed mutually.
The technical scheme of the embodiment of the application is realized as follows:
an embodiment of the present application provides an access method for a stateful application in an edge computing system, where the edge computing system includes at least two sites, each of the sites includes at least one edge node, and each of the edge nodes includes at least one minimum unit, and the method includes:
receiving an access request sent by a state application running in a target minimum unit, wherein the access request is used for accessing the target stateful application;
analyzing the access request to obtain a target unit identifier for identifying the minimum unit;
acquiring a domain name resolution file storing a mapping relation between a unit identifier and an internet protocol address, and searching a target internet protocol address corresponding to the target unit identifier in a target site to which the target minimum unit belongs on the basis of the domain name resolution file;
sending the target internet protocol address to the state application to enable the state application to access the target state application based on the target internet protocol address.
An embodiment of the present application further provides an access apparatus for a stateful application in an edge computing system, where the edge computing system includes at least two sites, each of the sites includes at least one edge node, and each of the edge nodes includes at least one minimum unit, and the apparatus includes:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving an access request sent by a state application running in a target minimum unit, and the access request is used for accessing the target stateful application;
the analysis module is used for analyzing the access request to obtain a target unit identifier for identifying the minimum unit;
an obtaining module, configured to obtain a domain name resolution file storing a mapping relationship between a unit identifier and an internet protocol address, and search, based on the domain name resolution file, for a target internet protocol address corresponding to the target unit identifier in a target site to which the target minimum unit belongs;
a sending module, configured to send the target internet protocol address to the status application, so that the status application accesses the target status application based on the target internet protocol address.
In the above scheme, each site is respectively deployed with at least one stateful application corresponding to a target service, and each stateful application runs in a minimum unit;
the receiving module is further configured to receive an access request sent by the state application running in the target minimum unit and used for accessing a target state application in the state applications deployed in the at least two sites.
In the above scheme, the edge computing system is deployed based on a headless service, and the headless service is bound with a minimum unit included in each of the sites;
the receiving module is further configured to receive an access request, which is sent by a state application running in a target minimum unit and carries a service name of the headless service;
and the service name is used for indicating that the service type corresponding to the access request is headless service.
In the above scheme, the parsing module is further configured to parse the access request to obtain a unit name of a minimum unit included in the access request, where the minimum unit runs the target stateful application;
wherein the unit name comprises: an application name of the target stateful application, a unit sequence number of the minimum unit, and a service name of the headless service;
and taking the unit name of the minimum unit for running the target stateful application as a target unit identifier for identifying the minimum unit.
In the foregoing solution, the target unit identifiers of the minimum unit running the target stateful application in each of the sites are consistent, and the apparatus further includes:
a first access module, configured to receive a first access request sent by a first state application running in a first minimum unit, where the first minimum unit and the target minimum unit belong to different sites, and the first access request is used to access a target state application;
analyzing the first access request to obtain a first unit identifier for identifying a minimum unit, wherein the first unit identifier is the same as the target unit identifier;
acquiring a domain name resolution file storing a mapping relation between a unit identifier and an internet protocol address, and searching a first internet protocol address corresponding to the first unit identifier in a site to which the first minimum unit belongs based on the domain name resolution file;
sending the first internet protocol address to the first state application to cause the first state application to access the target stateful application based on the first internet protocol address.
In the above scheme, the edge node further includes a file maintenance component, where the file maintenance component is configured to maintain a domain name resolution file of a site to which the corresponding edge node belongs;
the obtaining module is further configured to determine a target edge node to which the target minimum unit belongs and a target site to which the target minimum unit belongs;
and acquiring a domain name resolution file corresponding to the target site from a file maintenance component of the target edge node.
In the above solution, the domain name resolution file and the site are in a one-to-one correspondence, and the site further includes: the file maintenance node is used for maintaining the domain name resolution file of the corresponding site;
the obtaining module is further configured to determine a target site to which the target minimum unit belongs;
and acquiring the domain name resolution file corresponding to the target site from the file maintenance node.
In the above scheme, the file maintenance node is a node different from the edge node in the corresponding site;
or, the file maintenance node is a node obtained by election from at least one edge node included in the site through an election mechanism.
In the above scheme, the file maintenance component is configured to update the domain name resolution file based on an update event when the update event for the domain name resolution file is monitored;
the obtaining module is further configured to obtain a domain name resolution file that is updated based on the update event and stores a mapping relationship between the unit identifier and the internet protocol address.
In the above scheme, the apparatus further comprises:
a second access module, configured to receive a second access request sent by a second state application running in a second minimum unit, where the second access request is used to access the target stateful application;
analyzing the second access request to obtain a second unit identifier for identifying the minimum unit;
renaming the second unit identity as the real unit identity of the smallest unit which belongs to the site where the second smallest unit is located and runs the target stateful application;
performing domain name resolution on the real unit identifier based on the headless service to obtain a second internet protocol address corresponding to the real unit identifier;
sending the second internet protocol address to the second state application to cause the second state application to access the target stateful application based on the second internet protocol address.
In the foregoing solution, the edge computing system further includes: a stateful application control node;
the stateful application control node is configured to create at least one edge node in each of the sites when a node creation event is monitored, and deploy at least one minimum unit running a stateful application on each of the edge nodes.
In the above solution, the stateful application control node is further configured to update the edge node in each of the sites when a node update event is monitored, and
and updating the minimum unit which is deployed on each edge node and runs the stateful application.
An embodiment of the present application further provides an electronic device, including:
a memory for storing executable instructions;
and the processor is used for realizing the access method of the stateful application in the edge computing system provided by the embodiment of the application when the executable instructions stored in the memory are executed.
The embodiment of the present application further provides a computer-readable storage medium, which stores executable instructions, and when the executable instructions are executed by a processor, the method for accessing a stateful application in an edge computing system provided by the embodiment of the present application is implemented.
The embodiment of the application has the following beneficial effects:
in an edge computing system comprising at least two sites, at least one minimum unit is deployed on at least one edge node of each site, when an access request which is sent by a state application running in a target minimum unit and used for accessing the target stateful application is received, the access request is analyzed to obtain a target unit identifier, so that a target internet protocol address which belongs to the target site to which the target minimum unit belongs and has a mapping relation with the target unit identifier is found in a domain name resolution file storing the mapping relation between the unit identifier and the internet protocol address based on the target unit identifier, and the target internet protocol address is sent to the state application so that the state application accesses the target stateful application based on the target internet protocol address; therefore, the target internet protocol address of the returned state application is found in the target site to which the target minimum unit belongs, and when the state application accesses the state application, the cross-site access situation can be avoided.
Drawings
FIG. 1 is a block diagram illustrating an architecture of an access system 100 for stateful applications in an edge computing system according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of an electronic device 500 for an access method of a stateful application in an edge computing system according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a method for accessing a stateful application in an edge computing system according to an embodiment of the present application;
FIG. 4 is a schematic structural diagram of an edge computing system provided in an embodiment of the present application;
FIG. 5 is a schematic deployment diagram of a stateful application provided by an embodiment of the present application;
FIG. 6 is a schematic diagram of a file maintenance component maintaining a domain name resolution file provided by an embodiment of the present application;
FIG. 7 is a schematic diagram of accessing a stateful application with corresponding cell identification within a different site according to an embodiment of the present application;
FIG. 8 is a block diagram of an edge computing cluster according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of an access device 555 for a stateful application in an edge computing system according to an embodiment of the present application.
Detailed Description
In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the attached drawings, the described embodiments should not be considered as limiting the present application, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
In the following description, references to the terms "first \ second \ third" are only to distinguish similar objects and do not denote a particular order, but rather the terms "first \ second \ third" are used to interchange specific orders or sequences, where appropriate, so as to enable the embodiments of the application described herein to be practiced in other than the order shown or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the application.
Before further detailed description of the embodiments of the present application, terms and expressions referred to in the embodiments of the present application will be described, and the terms and expressions referred to in the embodiments of the present application will be used for the following explanation.
1) Edge computation is a distributed computing architecture. Under the structure, the operation of application program, data and service is moved from the central node of the network to the edge node of the network logic for processing. Alternatively, edge operations decompose the large services originally handled by the central node completely, cut into smaller and more manageable portions, and distribute them to the edge nodes for processing. The edge node is closer to the user terminal device, so that the processing and transmission speed of the data can be increased, and the delay can be reduced. That is, the server used as the calculation part now calculates directly by the information acquisition device, and then outputs the calculation result directly to the server. The server does not need process data as long as it is the result.
2) Kubernets, K8s for short, is an open-source application for managing containerization on multiple hosts in a cloud platform, and aims to make deploying containerization applications simple and efficient, and provides a mechanism for application deployment, planning, updating and maintenance.
3) Pod, the smallest unit in a Kubernetes cluster.
4) Headless Service (header Service), which is different from general Service in that a virtual IP (culsterIP) is not allocated; the resolution Headless Service returns the addresses of all the Pods and the domain names in the cluster through core-dns.
5) The port server apiserver is a server responsible for monitoring the designated port, and provides monitoring of events such as addition, deletion, modification and the like of various resource objects of k8 s.
6) The Label, is a core concept in the Kubernetes family. Is a set of key/value pairs bound to the K8s resource object. The keys of the labels attributes of the same object must be unique. The labels can be attached to various resource objects, and the multi-dimensional resource grouping management function is realized by binding one or more unused labels to the specified resource objects, so that the management work such as resource allocation, scheduling, configuration, deployment and the like can be flexibly and conveniently carried out.
7) The Label selector, is a grouping mechanism of the Kubernetes core, and a group of resource objects with common characteristics or attributes can be identified through a Label selector client/user.
8) In stateful applications, the server generally stores information related to requests, and each request may use the previous request information by default.
9) In the stateless application, the processes that can be processed by the general server side all come from information carried by the request or common information that is stored by the server side and can be used by all requests.
10) Fully Qualified Domain Name (FQDN): with host and domain names.
11) StatefUlSet, a collection with states, manages all applications with states, and the managed Pod has a fixed Pod name and a start-stop sequence, and in StatefUlSet, the Pod name is called a network identifier. A Headless Service is also corresponding to the StatefUlet, and the StatefUlet creates a DNS domain name for each Pod copy controlled by the StatefUlet on the basis of the Headless Service.
12) Hosts, which is a system file without extension name, can be opened by using tools such as notebooks and the like, and has the functions of establishing a correlation 'database' between some commonly used website domain names and IP addresses corresponding to the commonly used website domain names, when a user inputs a website to be logged in a browser, the system can automatically search the corresponding IP address from the Hosts file at first, once the website is found, the system can immediately open the corresponding webpage, and if the website is not found, the system can submit the website to a DNS domain name resolution server for IP address resolution.
13) yaml, a format for expressing data serialization with high readability.
14) The Operator is a controller for sensing the application state, and automatically creates, manages and configures the application instance by extending Kubernets API. The Operator extends the Resource object based on crd (custom Resource definition) and guarantees the application in an expected state through the controller.
15) User-defined Resource (CRD).
16) The core DNS is a quick and flexible DNS service and can be realized by a plug-in mode.
Based on the above explanations of terms and terms involved in the embodiments of the present application, the following describes an access system for stateful applications in an edge computing system provided by the embodiments of the present application. Referring to fig. 1, fig. 1 is a schematic diagram of an architecture of an access system 100 for a stateful application in an edge computing system provided in an embodiment of the present application, where the edge computing system includes: at least two sites, each site comprising at least one edge node and a domain name resolution service node, each edge node comprising at least one minimum unit. To support an exemplary application, the edge nodes (e.g., edge node 400-1 and edge node 400-2) are connected to domain name resolution service node 200 via network 300, where network 300 may be a wide area network or a local area network, or a combination thereof, and data transmission is accomplished using wireless or wired links.
An edge node (such as the edge node 400-1) is deployed with a target minimum unit running a state application and used for sending an access request of the state application running in the target minimum unit to the target state application;
the domain name resolution service node 200 is used for receiving an access request sent by a state application running in a target minimum unit; analyzing the access request to obtain a target unit identifier for identifying the minimum unit; acquiring a domain name resolution file storing a mapping relation between a unit identifier and an internet protocol address, and searching a target internet protocol address corresponding to a target unit identifier in a target site to which a target minimum unit belongs based on the domain name resolution file; sending the target internet protocol address to the status application;
a stateful application running in a target minimal unit deployed by an edge node (e.g., edge node 400-1) receives a target internet protocol address and accesses the target stateful application based on the target internet protocol address.
The embodiments of the present application may be implemented by means of Cloud Technology (Cloud Technology), which refers to a hosting Technology for unifying series resources such as hardware, software, and network in a wide area network or a local area network to implement data calculation, storage, processing, and sharing.
The cloud technology is a general term of network technology, information technology, integration technology, management platform technology, application technology and the like applied based on a cloud computing business model, can form a resource pool, is used as required, and is flexible and convenient. Cloud computing technology will become an important support. Background services of the technical network system require a large amount of computing and storage resources.
In practical application, the domain name resolution service node 200 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, big data and artificial intelligence platform.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an electronic device 500 for an access method of a stateful application in an edge computing system according to an embodiment of the present application. In practical applications, the electronic device 500 may be a server or a terminal shown in fig. 1, and an electronic device 500 is taken as a domain name resolution node shown in fig. 1 as an example to explain an electronic device implementing an access method for a stateful application in an edge computing system according to an embodiment of the present application, where the electronic device 500 provided in the embodiment of the present application includes: at least one processor 510, memory 550, at least one network interface 520, and a user interface 530. The various components in the electronic device 500 are coupled together by a bus system 540. It is understood that the bus system 540 is used to enable communications among the components. The bus system 540 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 540 in fig. 2.
The Processor 510 may be an integrated circuit chip having Signal processing capabilities, such as a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like, wherein the general purpose Processor may be a microprocessor or any conventional Processor, or the like.
The user interface 530 includes one or more output devices 531 enabling presentation of media content, including one or more speakers and/or one or more visual display screens. The user interface 530 also includes one or more input devices 532, including user interface components to facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
The memory 550 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard disk drives, optical disk drives, and the like. Memory 550 optionally includes one or more storage devices physically located remote from processor 510.
The memory 550 may comprise volatile memory or nonvolatile memory, and may also comprise both volatile and nonvolatile memory. The nonvolatile memory may be a Read Only Memory (ROM), and the volatile memory may be a Random Access Memory (RAM). The memory 550 described in embodiments herein is intended to comprise any suitable type of memory.
In some embodiments, memory 550 can store data to support various operations, examples of which include programs, modules, and data structures, or subsets or supersets thereof, as exemplified below.
An operating system 551 including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
a network communication module 552 for communicating to other computing devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 including: bluetooth, wireless compatibility authentication (WiFi), and Universal Serial Bus (USB), etc.;
a presentation module 553 for enabling presentation of information (e.g., a user interface for operating peripherals and displaying content and information) via one or more output devices 531 (e.g., a display screen, speakers, etc.) associated with the user interface 530;
an input processing module 554 to detect one or more user inputs or interactions from one of the one or more input devices 532 and to translate the detected inputs or interactions.
In some embodiments, the access device for stateful applications in the edge computing system provided by the embodiments of the present application may be implemented in software, and fig. 2 illustrates an access device 555 for stateful applications in the edge computing system, which may be software in the form of programs and plug-ins, and the like, stored in a memory 550, and includes the following software modules: the receiving module 5551, the parsing module 5552, the obtaining module 5553 and the sending module 5554 are logical modules, and therefore, the functions of the respective modules will be described below, which may be arbitrarily combined or further split according to the implemented functions.
In other embodiments, the access Device for the stateful Application in the edge computing system provided in this embodiment of the present Application may be implemented by a combination of hardware and software, and by way of example, the access Device for the stateful Application in the edge computing system provided in this embodiment of the present Application may be a processor in the form of a hardware decoding processor, which is programmed to execute the access method for the stateful Application in the edge computing system provided in this embodiment of the present Application, for example, the processor in the form of the hardware decoding processor may be implemented by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), or other electronic components.
Based on the above description of the access system and the electronic device for the stateful application in the edge computing system provided in the embodiment of the present application, the following description is provided of the access method for the stateful application in the edge computing system provided in the embodiment of the present application. The edge computing system provided in the embodiment of the present application includes at least two sites, each site includes at least one edge node, and each edge node includes at least one minimum unit, see fig. 3, where fig. 3 is a schematic flowchart of an access method for a stateful application in the edge computing system provided in the embodiment of the present application, and the access method for a stateful application in the edge computing system provided in the embodiment of the present application includes:
step 101: the domain name resolution service receives an access request sent by a state application running in the target minimum unit.
Wherein the access request is for accessing a targeted stateful application.
Here, the edge computing system includes at least two sites, each site includes at least one edge node, each edge node includes at least one minimum unit, a pre-deployed stateful application and a non-stateful application are run in the minimum unit, and the deployed stateful application includes the target stateful application. The domain name resolution service may be a domain name resolution service node included in each site in the edge computing system, or a domain name resolution service component integrated in each edge node in each site.
In some embodiments, the edge computing system may be deployed by: the edge computing system also includes a state application control node; the stateful application control node is configured to create at least one edge node in each site when a node creation event is monitored, and deploy at least one minimum unit running a stateful application on each edge node.
In practical application, for a target micro-service (the target micro-service corresponds to a set of stateful applications having business logic association), a stateful application is deployed in each site, specifically, the stateful application is deployed on each edge node included in each site, so that the plurality of edge nodes jointly run a set of stateful applications having business logic association. Here, the names of the stateful applications deployed within each site are consistent. In practical application, a specific process of deploying the stateful application stateful to each edge node is to deploy the stateful application stateful to a minimum unit pod included in each edge node, so that each pod runs the deployed stateful application. In practical implementation, applications run by each pod can call each other through an ip address corresponding to the pod. Referring to fig. 4, fig. 4 is a schematic structural diagram of an edge computing system provided in the embodiment of the present application. Here, the edge computing cluster includes 3 sites, each site includes 3 edge nodes, each edge node included in the site collectively runs a set of stateful applications deployed on a minimum unit pod, and the set of stateful applications has business logic relation for implementing a target micro service.
In some embodiments, the stateful application control node is further configured to update the edge nodes in each site and update the minimum unit running the stateful application deployed on each edge node when a node update event is monitored.
In practical applications, the stateful application control node may also control the update of the edge nodes and the update of the minimum unit deployed on each edge node running the stateful application. The node update events include add, delete, and modify events for edge nodes, and add, delete, and modify events for the deployed minimal unit running a stateful application.
Referring to fig. 5, fig. 5 is a schematic deployment diagram of a stateful application provided in an embodiment of the present application. Here, the stateful application stateful et may be deployed in the following manner: a state application control node (namely, stateful-grid Controller) is deployed at the cloud. When a stateful application grid resource is created, that is, a node creation event is monitored, a stateful application control node stateful set-grid Controller deploys stateful applications on nodes of each site through naming indication information (including zone: zone-1, zone: zone-2, and zone: zone-3) of a node selector in different zones or sites (as shown in fig. 5, including 3 sites), and names of the stateful applications on each node are stateful application-zone-1, stateful application-zone-2, and stateful application-zone-3, respectively.
Continuously, by monitoring add, delete and update events of three types of resources, namely node, stateful application stateful and stateful grid, statef ul sets in each region or site are kept consistent with the state stated by the stateful grid. Specifically, if the status _ full _ template field in the stateful _ grid changes, indicating that an update event is triggered, the stateful _ grid Controller updates the template field of the stateful _ template in each region or site, so that the template field of the stateful _ template in each region or site is consistent with the template field in the stateful _ template.
When the state application running in the target minimum unit needs to access the target stateful application, an access request of a user for accessing the target stateful application can be sent to the domain name resolution service, and the state application can be a stateful application or a stateless application. At this time, the domain name resolution service receives an access request sent by the state application.
In some embodiments, each site is respectively deployed with at least one stateful application corresponding to a target service, and each stateful application runs in a minimum unit; accordingly, the domain name resolution service may receive the access request sent by the state application running in the target minimum unit by: and receiving an access request sent by the state application running in the target minimum unit and used for accessing the target state application in the state applications deployed at the at least two sites.
Here, after the edge computing system is deployed, each site is respectively deployed with at least one stateful application corresponding to the target service, each stateful application runs in one minimum unit, and the domain name resolution service receives an access request sent by the stateful application running in the target minimum unit and used for accessing the target stateful application deployed in the stateful applications of the at least two sites.
In some embodiments, the edge computing system is deployed based on headless services bound with a minimum unit included within each site; accordingly, the domain name resolution service may receive the access request sent by the state application running in the target minimum unit by: receiving an access request which is sent by a state application running in a target minimum unit and carries a service name of headless service; the service name is used for indicating that the service type corresponding to the access request is headless service.
In practical applications, the edge computing system is deployed based on a headless service mode, and the headless service is bound with at least one minimum unit in each site and deployed on a corresponding edge node through a label selector. Based on this, when sending an access request, the access request needs to carry the service name of the headless service, and at this time, the domain name resolution service receives the access request carrying the service name of the headless service, which is sent by the state application running in the target minimum unit. Here, the service name is used to indicate that the service type corresponding to the access request is a headless service.
Step 102: and analyzing the access request to obtain a target unit identifier for identifying the minimum unit.
When the domain name resolution service receives the access request, the domain name resolution service resolves the access request to obtain a target unit identifier for identifying a minimum unit, where the target unit identifier may be a unit name of the minimum unit running the target stateful application, such as a fully qualified domain name FQDN of the minimum unit pod.
In some embodiments, the domain name resolution service may resolve the access request by obtaining a target unit identification for identifying the smallest unit as follows: analyzing the access request to obtain a unit name of a minimum unit for running the target stateful application, wherein the unit name is contained in the access request; and taking the unit name of the minimum unit for running the target stateful application as the target unit identification for identifying the minimum unit. Wherein, the unit name includes: an application name of the target stateful application, a unit number of the smallest unit, and a service name of the headless service.
In practical application, after receiving the access request, the domain name resolution service resolves the access request to obtain the unit name of the minimum unit, included in the access request, for running the target stateful application. Here, the unit name of the minimum unit for running the target stateful application is composed based on the application name of the target stateful application, the unit number of the minimum unit, and the service name of the headless service, and for example, the unit name may be a fully qualified domain name FQDN of the minimum unit pod: < stateful aggregate-name > - < id > < head-server service-name >. default. The unit name of the minimum unit for the running target stateful application is then used as the target unit identification for identifying the minimum unit.
Step 103: and acquiring a domain name resolution file storing the mapping relation between the unit identifier and the Internet protocol address, and searching a target Internet protocol address corresponding to the target unit identifier in a target site to which the target minimum unit belongs on the basis of the domain name resolution file.
In the embodiment of the application, a domain name resolution file storing the mapping relation between the unit identifier and the internet protocol address is preset. When the domain name resolution service resolves the access request to obtain the target unit identifier, based on the domain name resolution file, in the target site to which the target minimum unit belongs (i.e. the site to which the minimum unit of the operation state application belongs), the target internet protocol address corresponding to the target unit identifier is searched. The target internet protocol address is used for the stateful application to access the target stateful application based on the target internet protocol address.
In some embodiments, the edge nodes further comprise a file maintenance component for maintaining a domain name resolution file for a site to which the respective edge node belongs; correspondingly, the domain name resolution service may obtain the domain name resolution file storing the mapping relationship between the unit identifier and the internet protocol address in the following manner: determining a target edge node to which the target minimum unit belongs and a target site to which the target minimum unit belongs; and acquiring a domain name resolution file corresponding to the target site from a file maintenance component of the target edge node.
Here, a file maintenance component is provided in each edge node, and is configured to maintain a domain name resolution file of a site to which the corresponding edge node belongs. When the domain name resolution service needs to acquire a domain name resolution file, a target edge node to which a target minimum unit belongs and a target site to which the target minimum unit belongs may be determined, and then the domain name resolution file corresponding to the target site is acquired from a file maintenance component of the target edge node.
In some embodiments, the file maintenance component is configured to update the domain name resolution file based on an update event when the update event for the domain name resolution file is monitored; correspondingly, the domain name resolution service may obtain the domain name resolution file storing the mapping relationship between the unit identifier and the internet protocol address in the following manner: and acquiring a domain name resolution file which is updated based on the updating event and stores the mapping relation between the unit identification and the Internet protocol address.
Here, the file maintenance component may also monitor for update events for the domain name resolution file, including add events, subtract events, and modify events for the smallest units in the domain name resolution file. When the file maintenance component monitors an update event aiming at the domain name resolution file, the domain name resolution file is updated based on the update event. At this time, the domain name resolution service may obtain the domain name resolution file updated based on the update event, so as to search for the target internet protocol address based on the updated domain name resolution file.
Referring to fig. 6, fig. 6 is a schematic diagram of a file maintenance component maintaining a domain name resolution file according to an embodiment of the present application. Here, each edge node is also deployed with a stateful-grid-daemon component (i.e., the above-mentioned file maintenance component), the stateful-grid-daemon component maintains (including updating, deleting, and adding) a domain name resolution file through an apiserver in the cloud, and the domain name resolution file stores a mapping relationship between a pod FQDN (i.e., a unit identifier of a pod) and a real IP of a pod of the site (where the current edge node is located). The domain name resolution file is loaded by the hosts plug-in of the coreDNS, the domain name resolution service of each edge node. This achieves the effect that different sites visit the same pod FQDN, and the returned pod IPs are different and are all the IPs of the pods belonging to the site or area.
In some embodiments, the domain name resolution file is in a one-to-one correspondence with the site, and the site further includes: the file maintenance node is used for maintaining the domain name resolution file of the corresponding site; correspondingly, the domain name resolution service may obtain the domain name resolution file storing the mapping relationship between the unit identifier and the internet protocol address in the following manner: determining a target site to which the target minimum unit belongs; and acquiring a domain name resolution file corresponding to the target site from the file maintenance node.
Here, in practical applications, a file maintenance node for maintaining the domain name resolution file of the corresponding site may also be provided in each site. When the domain name resolution service needs to acquire a domain name resolution file, a target site to which the target minimum unit belongs may be determined first, and then the domain name resolution file corresponding to the target site is acquired from the file maintenance node.
In some embodiments, a file maintenance node is a node within a corresponding site that is different from an edge node; or the file maintenance node is a node obtained by election from at least one edge node included in the site through an election mechanism.
In practical applications, the file maintenance node may be a node of different edge nodes in the corresponding site, or a node obtained by election from at least one edge node included in the site through an election mechanism.
Here, the file maintenance node may also monitor update events for the domain name resolution file, including add events, subtract events, and modify events for the smallest units in the domain name resolution file. And when the file maintenance node monitors an update event aiming at the domain name resolution file, updating the domain name resolution file based on the update event. At this time, the domain name resolution service may obtain the domain name resolution file updated based on the update event, so as to search for the target internet protocol address based on the updated domain name resolution file.
Step 104: the target internet protocol address is sent to the stateful application such that the stateful application accesses the target stateful application based on the target internet protocol address.
Here, after the domain name resolution service finds the target internet protocol address corresponding to the target unit identifier, the target internet protocol address is sent to the state application; the stateful application receives the target internet protocol address and accesses the target stateful application based on the target internet protocol address.
In some embodiments, the target unit identifiers of the minimum units running the target stateful applications in each site are consistent, and based on this, the domain name resolution service receives a first access request sent by a first stateful application running in a first minimum unit, wherein the first minimum unit and the target minimum unit belong to different sites, and the first access request is used for accessing the target stateful application; analyzing the first access request to obtain a first unit identifier for identifying the minimum unit, wherein the first unit identifier is the same as the target unit identifier; acquiring a domain name resolution file storing a mapping relation between a unit identifier and an internet protocol address, and searching a first internet protocol address corresponding to a first unit identifier in a site to which a first minimum unit belongs based on the domain name resolution file; the first internet protocol address is sent to the first stateful application such that the first stateful application accesses the target stateful application based on the first internet protocol address.
In practical application, the target unit identifiers of the minimum units running the target stateful applications in each site are consistent, and when a first stateful application running in a first minimum unit located in a site different from the target site also needs to access the target stateful application, a first access request for accessing the target stateful application is sent to the domain name resolution service. The domain name resolution service receives a first access request sent by a first stateful application running in a first minimum unit, and resolves the first access request to obtain a first unit identifier for identifying the minimum unit, where the first unit identifier may be a unit name of the minimum unit running the target stateful application, such as a fully qualified domain name FQDN of the minimum unit pod.
Continuously, the domain name resolution service acquires a domain name resolution file storing a mapping relation between the unit identifier and the internet protocol address, and searches a first internet protocol address corresponding to the first unit identifier in a site to which the first minimum unit belongs on the basis of the domain name resolution file; sending a first internet protocol address to a first state application; the first stateful application receives the first internet protocol address and accesses the targeted stateful application based on the first internet protocol address.
Referring to fig. 7, fig. 7 is a schematic diagram of accessing a stateful application with corresponding unit identifiers in different sites according to an embodiment of the present application. Here, two stateful application stateful applications are deployed in two sites (including site 1 (i.e., nodunit 1) and site 2 (i.e., nodunit 2)) by the stateful application Control node stateful-grid controller, respectively, a stateful application 1 (which may be named as stateful grid-demo-nodeit 1) deployed by the edge node 1 and a stateful application 2 (which may be named as stateful grid-demo-nodeit 2) deployed by the edge node 2, the stateful application 1 being specifically deployed in a minimum unit pod1 (which is named as stateful grid-demo-nodeit 1-0) and a minimum unit pod 2 (which is named as stateful grid-demo-nodeit 1-1) on the edge node 1; the stateful application 2 is specifically deployed in a minimum unit pod3 (named stateful _ grid-demo-node unit2-0) and a minimum unit pod4 (named stateful _ grid-demo-node unit2-1) on the edge node 2. And two stateful applications, namely a thread service manager, are created at the same time, and are named as svc-demo. Here, the stateful application 1 and the stateful application 2 are stateful applications for the same microservice.
In different sites, the state application 1 (i.e. client1) and the state application 3 (i.e. client3) access the same unit identifier of the smallest unit (e.g. FQDN of pod), such as unit identifier 1 of the smallest unit (i.e. status flux grid-remove-0. svc-remove. default. svc. cluster. local), and the domain name resolution service core dns returns the internet protocol address IP of the different smallest unit pod, for example, in site 1, returns the internet protocol address 1 of the smallest unit (i.e. IP of pod: status flux grid-remove-node unit 1-0); within site 2, the internet protocol address 2 of the smallest unit (i.e., the IP of pod: statefuletgrid-demo-nodeunit 2-0) is returned.
In some embodiments, the edge computing system is deployed based on headless services bound with a minimum unit included within each site; the unit identifier of the minimum unit is composed of an application name of the target stateful application, a unit serial number of the minimum unit and a service name of the headless service; based on the first access request, the domain name resolution service receives a second access request sent by a second state application running in a second minimum unit, wherein the second access request is used for accessing the target stateful application; analyzing the second access request to obtain a second unit identifier for identifying the minimum unit; renaming the target unit identifier to be a real unit identifier of the minimum unit which belongs to the site where the second minimum unit is located and runs the target stateful application; performing domain name resolution on the real unit identifier based on the headless service to obtain a second internet protocol address corresponding to the real unit identifier; and sending the second internet protocol address to the second state application so that the second state application accesses the target stateful application based on the second internet protocol address.
Here, in addition to finding the IP address of the minimum unit running the target stateful application through the domain name resolution file, the following method can be implemented: the domain name resolution service receives a second access request sent by a second state application running in a second minimum unit, and then resolves the second access request to obtain a second unit identifier for identifying the minimum unit; renaming the second unit identifier to be a real unit identifier of a minimum unit which belongs to a site where the second minimum unit is located and runs the target stateful application through a renaming plug-in (namely, rename plug-in); performing domain name resolution on the real unit identifier based on the headless service to obtain a second internet protocol address corresponding to the real unit identifier; and sending the second internet protocol address to the second state application so that the second state application accesses the target stateful application based on the second internet protocol address.
Specifically, the rename plug-in of the domain name resolution service renames the accessed pod FQDN to the FQDN of the real pod. For example: the pod FQDN is expressed at nodeunit1 site: statfusset-demo-0. svc-demo. default. svc. cluster. local rename true pod FQDN: statfuset-demo-nondeount 1-0. svc-demo.default.svc.cluster.local; and then performing domain name resolution on the real pod FQDN through a coreDNS to obtain the real IP of the pod.
By applying the embodiment of the application, in an edge computing system comprising at least two sites, at least one minimum unit is deployed on at least one edge node included in each site, when an access request for accessing a target stateful application, which is sent by a state application running in the target minimum unit, is received, the access request is analyzed to obtain a target unit identifier, so that a target internet protocol address which belongs to a target site to which the target minimum unit belongs and has a mapping relation with the target unit identifier is found in a domain name resolution file storing the mapping relation between the unit identifier and the internet protocol address based on the target unit identifier, and the target internet protocol address is sent to the state application, so that the state application accesses the target stateful application based on the target internet protocol address; therefore, the target internet protocol address of the returned state application is found in the target site to which the target minimum unit belongs, and when the state application accesses the state application, the cross-site access situation can be avoided.
An exemplary application of the embodiments of the present application in a practical application scenario will be described below.
In the embodiment of the present application, the following scenarios are considered: in a cluster for edge computing, a group of stateful services with business logic relation is operated in each site with a plurality of edge nodes, and the stateful services in each site form a complete set of micro-services to provide services for users; here, multiple edge nodes are included within each site, and there is no desire or ability to cross-site access between stateful services that are contacted by the traffic due to network limitations.
Based on this, the embodiment of the present application first provides a deployment method of an edge computing cluster, where the method distinguishes stateful services and head services according to names of sites by using native kubernets, and the specific scheme is as follows: different names are set for stateful applications and corresponding thread services deployed by nodes in different sites. As shown in fig. 8, fig. 8 is a schematic structural diagram of an edge computing cluster provided in the embodiment of the present application, where the edge computing cluster includes: two header service services and two stateful applications stateful are named as headless service A (header-svc-A), stateful application A (header-underset-A) and headless service B (header-svc-B) and stateful application B (stateful-B) in site 1 (site-1) and site 2 (site-2), respectively.
Thus, when accessing the service and the load, according to the characteristics of the thread service and the stateful application st ateresult, the user can access the service and the load in a < stateful aggregate-name > - < id > < thread-service-name >. default. In order to lock the access between the services in the same site, users at different sites need to access different domain names, for example, a user at site-1 needs to access the domain name, station fuse-a-0. header-svc-a.header.sv.cluster.local, and a user at site-2 needs to access the domain name, station fuse-B-0. header-svc-b.header.sc.cluster.local.
However, in the implementation process, the applicant finds that services and stateful applications are different in names of different sites, so that services cannot be called simply by the same service name, but instead, site fuel-A-id.head-svc-A.failure.svc.cluster is used in site-1, and site fuel-B-0.head-svc-B.failure.svc.cluster is used in site-2. Therefore, the scheme has extremely high complexity for a calling party and is extremely unfriendly to services; meanwhile, for deployment, if the number of sites, stateful applications and head services is very large, in view of the fact that the three need to be associated through a label selector and a node selector, and the like, deployment yaml files with the number multiplied by the number of the three are generated during final deployment, and the difficulty of deployment is very high.
Therefore, in order to solve the above existing problems, embodiments of the present application further provide a deployment method of an edge computing system and an access method of a stateful application in the edge computing system, that is, a management scheme of the stateful application and the thread service in an edge computing scene is proposed and implemented. The method can easily realize the deployment of the stateful applications of a plurality of sites (even hundreds of sites or regions) through two yaml files, does not need the adaptation and the transformation of the applications, and can conveniently deploy a group of stateful applications in different sites or areas which belong to the same cluster respectively; meanwhile, the access request of the thread service matched with the stateful application can be completed in the local site or the local domain, and cross-region and site access of the service is avoided.
In the present application, as shown in fig. 4, fig. 4 describes deploying a microservice within a plurality of sites included in an edge computing cluster, the edge computing cluster including 3 edge sites, each edge site including at least one edge node therein. For a target micro-service (the target micro-service corresponds to a set of stateful applications with business logic association), a stateful application is deployed in each site, specifically, the stateful application is deployed on each edge node included in each site, so that the plurality of edge nodes jointly run a set of stateful applications with business logic association. Here, the names of the stateful application state fuels deployed within each site are consistent. In practical application, a specific process of deploying the stateful application stateful to each edge node is to deploy the stateful application stateful to a minimum unit pod included in each edge node, so that each pod runs the deployed stateful application. In practical implementation, applications run by each pod can call and access each other through the ip address corresponding to the pod.
Specifically, as shown in fig. 5, the stateful application stateful may be deployed as follows: firstly, a stateful application control component stateful-grid Controller is deployed at a cloud, and the stateful-grid Controller component is based on an Operator technology of kubernets. In the embodiment of the application, a CRD resource object named stateful testgrid is created, and the form thereof is as follows:
api version apiVersion super. io/v 1;
the kind is Stateful SetGrid;
metadata:
name, statfulsetgrid-demo;
namespace, default;
group spec of CRD:
site or region gridUniqKey: < NodeLabel Key >
Stateful application criteria field < stateful-template >
The CRD resource object of the above form may include creation indication information of the edge computing system, such as names and numbers of sites, names and numbers of nodes, names of stateful applications, and numbers of minimum units included in the edge computing system, except that the gridunqkey field is used to specify the division of the region or site, and the remaining fields are consistent with the fields of the stateful application standard. Here, first, when a stateful set Grid resource (i.e. the above CRD resource object) is created, that is, when a node creation event is monitored, the stateful application control node stateful Controller creates a stateful application having different node selectors in different regions or sites; then, by monitoring add, delete and update events of three types of resources, namely node, stateful application stateful and stateful grid, the stateful in each region or site is kept consistent with the state stated by the stateful grid. Specifically, if the status _ parameter _ field in the stateful grid changes, indicating that an update event is triggered, the stateful _ grid Controller may update the status _ parameter _ field of the new status _ parameter in each region or site, so that the status _ parameter _ field of the status _ parameter in each region or site may be consistent with the status _ parameter field in the stateful grid.
Meanwhile, a headless service, which manages stateful applications (specifically, each pod running a stateful application) of each site, is also created, and the headless service includes stateful applications of all regions through an la bel selector. The thread service is a virtual concept, and is realized by accessing the thread service when other pods access a target pod running a stateful application. Specifically, other pods access the thread service, and actually access a plurality of pods running the stateful application managed by the hea dless service, that is, by accessing the thread service, the IP of the real pod to be accessed is obtained.
Further, in order to realize that access to a head loss service device corresponding to a stateful application stateful server in a site can also be limited in the site, and access across sites is not possible, that is, in order to achieve the purpose that when an edge node accesses the head loss service, only an IP of a pod of a domain or site where the edge node is located is returned, as shown in fig. 6, a stateful-grid-data component is also deployed on each edge node, and maintains (including updating, deleting, and adding) a local file by monitoring an apiserver, where the local file stores a mapping relationship between a pod FQDN (i.e., the name of the pod) and a real IP of the pod of the site (where the current edge node is located). Loaded by the hosts plugin of the coreDNS of each edge node. This has the effect that different sites access the same POD FQDN, and the returned POD IPs are different and all the IPs belonging to the site or area.
Referring to fig. 7, fig. 7 is a schematic diagram of accessing a stateful application with corresponding unit identifiers in different sites according to an embodiment of the present application. Here, two stateful application stateful applications are deployed in two sites (including site 1 (i.e., nodunit 1) and site 2 (i.e., nodunit 2)) by the stateful application Control node stateful-grid controller, respectively, a stateful application 1 (which may be named as stateful grid-demo-nodeit 1) deployed by the edge node 1 and a stateful application 2 (which may be named as stateful grid-demo-nodeit 2) deployed by the edge node 2, the stateful application 1 being specifically deployed in a minimum unit pod1 (which is named as stateful grid-demo-nodeit 1-0) and a minimum unit pod 2 (which is named as stateful grid-demo-nodeit 1-1) on the edge node 1; the stateful application 2 is specifically deployed in a minimum unit pod3 (named stateful _ grid-demo-node unit2-0) and a minimum unit pod4 (named stateful _ grid-demo-node unit2-1) on the edge node 2. And two stateful applications, namely a thread service manager, are created at the same time, and are named as svc-demo. Here, the stateful application 1 and the stateful application 2 are stateful applications for the same microservice.
In different sites, the state application 1 (i.e. client1) and the state application 3 (i.e. client3) access the same unit identifier of the smallest unit (e.g. FQDN of pod), such as unit identifier 1 of the smallest unit (i.e. status flux grid-remove-0. svc-remove. default. svc. cluster. local), and the domain name resolution service core dns returns the internet protocol address IP of the different smallest unit pod, for example, in site 1, returns the internet protocol address 1 of the smallest unit (i.e. IP of pod: status flux grid-remove-node unit 1-0); within site 2, the internet protocol address 2 of the smallest unit (i.e., the IP of pod: statefuletgrid-demo-nodeunit 2-0) is returned.
In particular implementation, in addition to maintaining the mapping between the pod FQDN and the pod IP, the file maintenance component (i.e., stateful-grid-daemon component) may borrow a renaming plug-in (i.e., rename plug-in) of CoreDns and rename the accessed pod FQDN to the real pod FQDN. For example: the pod FQDN is expressed at nodeunit1 site: statfusset-demo-0. svc-demo. default. svc. cluster. local rename true pod FQDN: statfuset-demo-nondeount 1-0. svc-demo.default.svc.cluster.local; and then performing domain name resolution on the real pod FQDN through a coreDNS to obtain the real IP of the pod. Here, the client may be an application running in a certain pod included in the edge node, and may be a stateful application or a stateless application.
Therefore, the mutual access of the services in the same site or region is guaranteed to be limited within the range of the current site, and the problem of cross-node group or cross-machine room and cross-region access is avoided.
By applying the embodiment of the application, the state application stateful sets can be conveniently and respectively deployed in different regions or sites in the edge computing scene, meanwhile, the access to the thread service corresponding to the state application stateful sets can be conveniently and quickly realized, the access is limited in the region or site where the nodes deployed by the state application stateful sets are located, and the deficiency of the management scheme of the state application and the thread service in the current edge computing scene is made up; in addition, although the native kubernets can support the function, the realization cost is very high, and both the deployment cost and the use cost are very high.
Continuing with the description of the access device 555 for stateful applications in the edge computing system provided in the embodiments of the present application, in some embodiments, the access device for stateful applications in the edge computing system may be implemented by using a software module. Referring to fig. 9, fig. 9 is a schematic structural diagram of an access device 555 for a stateful application in an edge computing system according to an embodiment of the present application, where the access device 555 for a stateful application in an edge computing system according to an embodiment of the present application includes:
a receiving module 5551, configured to receive an access request sent by a state application running in a target minimum unit, where the access request is used to access a target stateful application;
an analyzing module 5552, configured to analyze the access request to obtain a target unit identifier for identifying a minimum unit;
an obtaining module 5553, configured to obtain a domain name resolution file storing a mapping relationship between a unit identifier and an internet protocol address, and based on the domain name resolution file, search for a target internet protocol address corresponding to the target unit identifier in a target site to which the target minimum unit belongs;
a sending module 5554, configured to send the target internet protocol address to the status application, so that the status application accesses the target status application based on the target internet protocol address.
In some embodiments, each of the sites is respectively deployed with at least one stateful application corresponding to a target service, and each stateful application runs in a minimum unit;
the receiving module 5551 is further configured to receive an access request sent by a state application running in a target minimum unit and used for accessing a target state application in the state applications deployed in the at least two sites.
In some embodiments, the edge computing system is deployed based on headless services bound to a minimum unit included within each of the sites;
the receiving module 5551 is further configured to receive an access request, which is sent by a state application running in a target minimum unit and carries a service name of the headless service;
and the service name is used for indicating that the service type corresponding to the access request is headless service.
In some embodiments, the parsing module 5552 is further configured to parse the access request to obtain a unit name of a minimum unit included in the access request and used for running the target stateful application;
wherein the unit name comprises: an application name of the target stateful application, a unit sequence number of the minimum unit, and a service name of the headless service;
and taking the unit name of the minimum unit for running the target stateful application as a target unit identifier for identifying the minimum unit.
In some embodiments, the target unit identifiers of the smallest unit running the target stateful application within each of the sites are consistent, the apparatus further comprising:
a first access module, configured to receive a first access request sent by a first state application running in a first minimum unit, where the first minimum unit and the target minimum unit belong to different sites, and the first access request is used to access a target state application;
analyzing the first access request to obtain a first unit identifier for identifying a minimum unit, wherein the first unit identifier is the same as the target unit identifier;
acquiring a domain name resolution file storing a mapping relation between a unit identifier and an internet protocol address, and searching a first internet protocol address corresponding to the first unit identifier in a site to which the first minimum unit belongs based on the domain name resolution file;
sending the first internet protocol address to the first state application to cause the first state application to access the target stateful application based on the first internet protocol address.
In some embodiments, the edge node further comprises a file maintenance component for maintaining a domain name resolution file of a site to which the corresponding edge node belongs;
the obtaining module 5553 is further configured to determine a target edge node to which the target minimum unit belongs and a target site to which the target minimum unit belongs;
and acquiring a domain name resolution file corresponding to the target site from a file maintenance component of the target edge node.
In some embodiments, the domain name resolution file corresponds to the site in a one-to-one relationship, and the site further includes: the file maintenance node is used for maintaining the domain name resolution file of the corresponding site;
the obtaining module 5553 is further configured to determine a target site to which the target minimum unit belongs;
and acquiring the domain name resolution file corresponding to the target site from the file maintenance node.
In some embodiments, the file maintenance node is a node within the corresponding site that is different from the edge node;
or, the file maintenance node is a node obtained by election from at least one edge node included in the site through an election mechanism.
In some embodiments, the file maintenance component is configured to update the domain name resolution file based on an update event when the update event for the domain name resolution file is monitored;
the obtaining module 5553 is further configured to obtain a domain name resolution file updated based on the update event and storing a mapping relationship between a unit identifier and an internet protocol address.
In some embodiments, the apparatus further comprises:
a second access module, configured to receive a second access request sent by a second state application running in a second minimum unit, where the second access request is used to access the target stateful application;
analyzing the second access request to obtain a second unit identifier for identifying the minimum unit;
renaming the second unit identity as the real unit identity of the smallest unit which belongs to the site where the second smallest unit is located and runs the target stateful application;
performing domain name resolution on the real unit identifier based on the headless service to obtain a second internet protocol address corresponding to the real unit identifier;
sending the second internet protocol address to the second state application to cause the second state application to access the target stateful application based on the second internet protocol address.
In some embodiments, the edge computing system further comprises: a stateful application control node;
the stateful application control node is configured to create at least one edge node in each of the sites when a node creation event is monitored, and deploy at least one minimum unit running a stateful application on each of the edge nodes.
In some embodiments, the stateful application control node is further configured to update edge nodes within each of the sites when a node update event is monitored, and
and updating the minimum unit which is deployed on each edge node and runs the stateful application.
By applying the embodiment of the application, in an edge computing system comprising at least two sites, at least one minimum unit is deployed on at least one edge node included in each site, when an access request for accessing a target stateful application, which is sent by a state application running in the target minimum unit, is received, the access request is analyzed to obtain a target unit identifier, so that a target internet protocol address which belongs to a target site to which the target minimum unit belongs and has a mapping relation with the target unit identifier is found in a domain name resolution file storing the mapping relation between the unit identifier and the internet protocol address based on the target unit identifier, and the target internet protocol address is sent to the state application, so that the state application accesses the target stateful application based on the target internet protocol address; therefore, the target internet protocol address of the returned state application is found in the target site to which the target minimum unit belongs, and when the state application accesses the state application, the cross-site access situation can be avoided.
An embodiment of the present application further provides an electronic device, where the electronic device includes:
a memory for storing executable instructions;
and the processor is used for realizing the access method of the stateful application in the edge computing system provided by the embodiment of the application when the executable instructions stored in the memory are executed.
Embodiments of the present application also provide a computer program product or a computer program comprising computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the access method of the stateful application in the edge computing system provided by the embodiment of the application.
The embodiment of the present application further provides a computer-readable storage medium, which stores executable instructions, and when the executable instructions are executed by a processor, the method for accessing a stateful application in an edge computing system provided by the embodiment of the present application is implemented.
In some embodiments, the computer-readable storage medium may be memory such as FRAM, ROM, PROM, EP ROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
In some embodiments, executable instructions may be written in any form of programming language (including compiled or interpreted languages), in the form of programs, software modules, scripts or code, and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
By way of example, executable instructions may correspond, but do not necessarily have to correspond, to files in a file system, and may be stored in a portion of a file that holds other programs or data, such as in one or more scripts in a hypertext Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code).
By way of example, executable instructions may be deployed to be executed on one computing device or on multiple computing devices at one site or distributed across multiple sites and interconnected by a communication network.
The above description is only an example of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, and improvement made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims (15)

1. A method for accessing a stateful application in an edge computing system, the edge computing system comprising at least two sites, each of the sites comprising at least one edge node, each of the edge nodes comprising at least one minimal unit, the method comprising:
receiving an access request sent by a state application running in a target minimum unit, wherein the access request is used for accessing the target stateful application;
analyzing the access request to obtain a target unit identifier for identifying the minimum unit;
acquiring a domain name resolution file storing a mapping relation between a unit identifier and an internet protocol address, and searching a target internet protocol address corresponding to the target unit identifier in a target site to which the target minimum unit belongs on the basis of the domain name resolution file;
sending the target internet protocol address to the state application to enable the state application to access the target state application based on the target internet protocol address.
2. The method according to claim 1, wherein each of said sites has deployed at least one stateful application corresponding to a target service, each of said stateful applications running in a minimal unit;
the receiving of the access request sent by the state application running in the target minimum unit comprises:
and receiving an access request sent by the state application running in the target minimum unit and used for accessing the target state application in the state applications deployed at the at least two sites.
3. The method of claim 1, wherein the edge computing system is deployed based on headless services that bind a minimum unit included within each of the sites;
the receiving of the access request sent by the state application running in the target minimum unit comprises:
receiving an access request which is sent by a state application running in a target minimum unit and carries the service name of the headless service;
and the service name is used for indicating that the service type corresponding to the access request is headless service.
4. The method of claim 3, wherein said parsing said access request to obtain a target unit identification for identifying a minimum unit comprises:
analyzing the access request to obtain a unit name of a minimum unit which runs the target stateful application and is contained in the access request;
wherein the unit name comprises: an application name of the target stateful application, a unit sequence number of the minimum unit, and a service name of the headless service;
and taking the unit name of the minimum unit for running the target stateful application as a target unit identifier for identifying the minimum unit.
5. The method of claim 1, wherein there is a correspondence between target unit identifications of a smallest unit running the target stateful application within each of the sites, the method further comprising:
receiving a first access request sent by a first state application running in a first minimum unit, wherein the first minimum unit and the target minimum unit belong to different sites, and the first access request is used for accessing the target state application;
analyzing the first access request to obtain a first unit identifier for identifying a minimum unit, wherein the first unit identifier is the same as the target unit identifier;
acquiring a domain name resolution file storing a mapping relation between a unit identifier and an internet protocol address, and searching a first internet protocol address corresponding to the first unit identifier in a site to which the first minimum unit belongs based on the domain name resolution file;
sending the first internet protocol address to the first state application to cause the first state application to access the target stateful application based on the first internet protocol address.
6. The method of claim 1, wherein the edge nodes further comprise a file maintenance component for maintaining a domain name resolution file for a site to which the respective edge node belongs;
the acquiring of the domain name resolution file storing the mapping relationship between the unit identifier and the internet protocol address comprises:
determining a target edge node to which the target minimum unit belongs and a target site to which the target minimum unit belongs;
and acquiring a domain name resolution file corresponding to the target site from a file maintenance component of the target edge node.
7. The method of claim 1, wherein the domain name resolution file is in a one-to-one correspondence with the site, and the site further comprises: the file maintenance node is used for maintaining the domain name resolution file of the corresponding site;
the acquiring of the domain name resolution file storing the mapping relationship between the unit identifier and the internet protocol address comprises:
determining a target site to which the target minimum unit belongs;
and acquiring the domain name resolution file corresponding to the target site from the file maintenance node.
8. The method of claim 7, wherein the file maintenance node is a node within the corresponding site other than the edge node;
or, the file maintenance node is a node obtained by election from at least one edge node included in the site through an election mechanism.
9. The method of claim 6, wherein the file maintenance component is configured to, upon monitoring an update event for the domain name resolution file, update the domain name resolution file based on the update event;
the acquiring of the domain name resolution file storing the mapping relationship between the unit identifier and the internet protocol address comprises:
and acquiring a domain name resolution file which is updated based on the updating event and stores the mapping relation between the unit identification and the Internet protocol address.
10. The method of claim 1, wherein the edge computing system is deployed based on headless services that bind a minimum unit included within each of the sites; the unit identifier of the minimum unit is composed of an application name of the target stateful application, a unit serial number of the minimum unit and a service name of the headless service; the method further comprises the following steps:
receiving a second access request sent by a second state application running in a second minimum unit, wherein the second access request is used for accessing the target stateful application;
analyzing the second access request to obtain a second unit identifier for identifying the minimum unit;
renaming the second unit identity as the real unit identity of the smallest unit which belongs to the site where the second smallest unit is located and runs the target stateful application;
performing domain name resolution on the real unit identifier based on the headless service to obtain a second internet protocol address corresponding to the real unit identifier;
sending the second internet protocol address to the second state application to cause the second state application to access the target stateful application based on the second internet protocol address.
11. The method of claim 1, wherein the edge computing system further comprises: a stateful application control node;
the stateful application control node is configured to create at least one edge node in each of the sites when a node creation event is monitored, and deploy at least one minimum unit running a stateful application on each of the edge nodes.
12. The method of claim 11, wherein the stateful application control node is further configured to update edge nodes within each of the sites when a node update event is monitored, and
and updating the minimum unit which is deployed on each edge node and runs the stateful application.
13. An apparatus for accessing stateful applications in an edge computing system, the edge computing system comprising at least two sites, each of the sites comprising at least one edge node, each of the edge nodes comprising at least one minimal unit, the apparatus comprising:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving an access request sent by a state application running in a target minimum unit, and the access request is used for accessing the target stateful application;
the analysis module is used for analyzing the access request to obtain a target unit identifier for identifying the minimum unit;
an obtaining module, configured to obtain a domain name resolution file storing a mapping relationship between a unit identifier and an internet protocol address, and search, based on the domain name resolution file, for a target internet protocol address corresponding to the target unit identifier in a target site to which the target minimum unit belongs;
a sending module, configured to send the target internet protocol address to the status application, so that the status application accesses the target status application based on the target internet protocol address.
14. An electronic device, characterized in that the electronic device comprises:
a memory for storing executable instructions;
a processor for implementing a method of accessing stateful applications in an edge computing system as claimed in any one of claims 1 to 12 when executing executable instructions stored in the memory.
15. A computer-readable storage medium having stored thereon executable instructions for, when executed, implementing a method of accessing a stateful application in an edge computing system according to any one of claims 1 to 12.
CN202110327112.8A 2021-03-26 2021-03-26 Access method and device for stateful application in edge computing system and electronic equipment Active CN113037891B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110327112.8A CN113037891B (en) 2021-03-26 2021-03-26 Access method and device for stateful application in edge computing system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110327112.8A CN113037891B (en) 2021-03-26 2021-03-26 Access method and device for stateful application in edge computing system and electronic equipment

Publications (2)

Publication Number Publication Date
CN113037891A true CN113037891A (en) 2021-06-25
CN113037891B CN113037891B (en) 2022-04-08

Family

ID=76474254

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110327112.8A Active CN113037891B (en) 2021-03-26 2021-03-26 Access method and device for stateful application in edge computing system and electronic equipment

Country Status (1)

Country Link
CN (1) CN113037891B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113312612A (en) * 2021-07-29 2021-08-27 支付宝(杭州)信息技术有限公司 Application access method and device in multi-party security computing
CN113472668A (en) * 2021-07-26 2021-10-01 支付宝(杭州)信息技术有限公司 Routing method and system in multi-party security computing
CN116743845A (en) * 2023-08-15 2023-09-12 中移(苏州)软件技术有限公司 Edge service discovery method, device, node equipment and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105378711A (en) * 2013-05-29 2016-03-02 微软技术许可有限责任公司 Sync framework extensibility
CN109407997A (en) * 2018-11-09 2019-03-01 长沙理工大学 A kind of data processing method, device, equipment and readable storage medium storing program for executing
CN110086895A (en) * 2019-04-11 2019-08-02 天津字节跳动科技有限公司 Domain name analytic method, device, medium and electronic equipment
US20200084202A1 (en) * 2018-11-14 2020-03-12 Ned M. Smith Attestation token sharing in edge computing environments
CN111953811A (en) * 2020-08-07 2020-11-17 腾讯科技(深圳)有限公司 Site access method, site registration method, device, equipment and storage medium
CN112105035A (en) * 2020-08-21 2020-12-18 深圳大学 Deployment method and device of mobile edge computing server

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105378711A (en) * 2013-05-29 2016-03-02 微软技术许可有限责任公司 Sync framework extensibility
CN109407997A (en) * 2018-11-09 2019-03-01 长沙理工大学 A kind of data processing method, device, equipment and readable storage medium storing program for executing
US20200084202A1 (en) * 2018-11-14 2020-03-12 Ned M. Smith Attestation token sharing in edge computing environments
CN110086895A (en) * 2019-04-11 2019-08-02 天津字节跳动科技有限公司 Domain name analytic method, device, medium and electronic equipment
CN111953811A (en) * 2020-08-07 2020-11-17 腾讯科技(深圳)有限公司 Site access method, site registration method, device, equipment and storage medium
CN112105035A (en) * 2020-08-21 2020-12-18 深圳大学 Deployment method and device of mobile edge computing server

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113472668A (en) * 2021-07-26 2021-10-01 支付宝(杭州)信息技术有限公司 Routing method and system in multi-party security computing
CN113312612A (en) * 2021-07-29 2021-08-27 支付宝(杭州)信息技术有限公司 Application access method and device in multi-party security computing
CN116743845A (en) * 2023-08-15 2023-09-12 中移(苏州)软件技术有限公司 Edge service discovery method, device, node equipment and readable storage medium
CN116743845B (en) * 2023-08-15 2023-11-03 中移(苏州)软件技术有限公司 Edge service discovery method, device, node equipment and readable storage medium

Also Published As

Publication number Publication date
CN113037891B (en) 2022-04-08

Similar Documents

Publication Publication Date Title
US11645309B2 (en) Discovery of database and related services
CN113037891B (en) Access method and device for stateful application in edge computing system and electronic equipment
JP6750054B2 (en) A system for building and modeling web pages
CN108804618B (en) Database configuration method, device, computer equipment and storage medium
US20200090172A1 (en) Containerization of network services
US20200204443A1 (en) Discovery of software bus architectures
US10970107B2 (en) Discovery of hyper-converged infrastructure
US20210218711A1 (en) Dynamic discovery of executing applications
US11635752B2 (en) Detection and correction of robotic process automation failures
US11240304B2 (en) Selective server-side execution of client-side scripts
US11635953B2 (en) Proactive notifications for robotic process automation
US20200351382A1 (en) Server-side control over navigation mode in web application
AU2019261768B2 (en) Efficient bundling and delivery of client-side scripts
CN117389830A (en) Cluster log acquisition method and device, computer equipment and storage medium
US11184251B2 (en) Data center cartography bootstrapping from process table data
CN112199200B (en) Resource scheduling method and device, computer equipment and storage medium
US20210168015A1 (en) Providing selective peer-to-peer monitoring using mbeans
CN115357198B (en) Mounting method and device of storage volume, storage medium and electronic equipment
US11222072B1 (en) Graph database management system and method for a distributed computing environment
Ceccarelli et al. A service discovery approach for testing dynamic SOAs
Hao Edge computing on low availability devices with K3S in a smart home IoT system
US20240231919A1 (en) Efficient Cloud-Based Discovery of Computing Resources
Ritari Monitoring a Kubernetes Application
Gianola Exploring the OCSF Framework in AWS: Design, Implementation and Performance Analysis of a Security Lake Platform
US20200236163A1 (en) Scale out network-attached storage device discovery

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40046448

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant