Method, device, storage medium and equipment for hot upgrade of user mode protocol stack
Patent Information
- Application Number
- CN202211064045.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-29
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2042-08-29
AI Technical Summary
[0004]然而,目前使用用户态协议栈会面临一个问题,即应用程序在使用用户态协议栈处理业务的业务数据流时,如果要对用户态协议栈进行升级,则需要重启应用程序的进程以及协议加速层,导致业务的中断
[0010] The user-space protocol stack hot upgrade method, apparatus, storage medium, and device provided in this disclosure include: loading a user-space protocol stack based on a protocol stack program file through a first application instance; processing a service data stream through the user-space protocol stack loaded by the first application instance or a kernel-space protocol stack loaded by a third application instance to upgrade the protocol stack program file; loading the upgraded user-space protocol stack based on the upgraded protocol stack program file through a second application instance, migrating the service data stream to the second application instance, and using the upgraded user-space protocol stack to process the service data stream. By using different application instances of an application to load the user-space protocol stack or kernel-space protocol stack respectively, the service data stream can be migrated and restored between these application instances, thus enabling hot upgrades of the user-space protocol stack while maintaining uninterrupted service data streams, improving service efficiency and user experience.
Smart Images

Figure CN115408038B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this disclosure relate to the field of computer software communication technology, and more specifically, the embodiments of this disclosure relate to a method, apparatus, storage medium, and device for hot-upgrading a user-space protocol stack. Background Technology
[0002] This section is intended to provide background or context for the embodiments of this disclosure set forth in the claims, and the description herein is not acknowledged as prior art simply because it is included in this section.
[0003] User-mode protocol stacks are a technique that moves the TCP / IP protocol stack, originally implemented in kernel mode, to user mode (e.g., application mode). This bypasses the kernel protocol stack, reduces context switching between kernel and user modes, and ultimately improves the network performance of applications.
[0004] However, there is a problem with using user-space protocol stacks: when an application is using the user-space protocol stack to process business data streams, if the user-space protocol stack needs to be upgraded, the application process and the protocol acceleration layer need to be restarted, resulting in business interruption. Summary of the Invention
[0005] In this context, embodiments of the present disclosure provide a method, apparatus, storage medium, and device for hot-upgrading a user-space protocol stack.
[0006] According to a first aspect of this disclosure, a method for hot-upgrading a user-mode protocol stack is provided, characterized in that the user-mode protocol stack is used to process service data streams corresponding to services, and the same application has N application instances, N≥2, wherein the N application instances include a first application instance and a second application instance; the method includes: loading a user-mode protocol stack based on a protocol stack program file through the first application instance; processing the service data stream through the user-mode protocol stack loaded by the first application instance or a kernel-mode protocol stack loaded by the third application instance to upgrade the protocol stack program file; and loading the upgraded user-mode protocol stack based on the upgraded protocol stack program file through the second application instance to migrate the service data stream to the second application instance to process the service data stream using the upgraded user-mode protocol stack.
[0007] According to a second aspect of this disclosure, a hot-upgrade apparatus for a user-mode protocol stack is provided, characterized in that the user-mode protocol stack is used to process service data streams corresponding to services, and the same application has N application instances, N≥2, wherein the N application instances include a first application instance and a second application instance; the apparatus includes: a first application module, used to load the user-mode protocol stack based on a protocol stack program file through the first application instance; a hot-upgrade module, used to process the service data stream through the user-mode protocol stack loaded by the first application instance or a kernel-mode protocol stack loaded by the third application instance, so as to upgrade the protocol stack program file; and a second application module, used to load the upgraded user-mode protocol stack based on the upgraded protocol stack program file through the second application instance, and migrate the service data stream to the second application instance, so as to process the service data stream using the upgraded user-mode protocol stack.
[0008] According to a third aspect of this disclosure, a storage medium is provided that stores a computer program thereon, characterized in that, when the computer program is executed by a processor, it implements: the hot upgrade method of the user-space protocol stack as described in any of the first aspects.
[0009] According to a fourth aspect of this disclosure, an electronic device is provided, comprising: a processing unit; and a storage unit for storing executable instructions of the processor; wherein the processing unit is configured to execute, via executing the executable instructions, a hot-upgrade method for a user-mode protocol stack as described in any of the first aspects.
[0010] The user-space protocol stack hot upgrade method, apparatus, storage medium, and device provided in this disclosure include: loading a user-space protocol stack based on a protocol stack program file through a first application instance; processing a service data stream through the user-space protocol stack loaded by the first application instance or a kernel-space protocol stack loaded by a third application instance to upgrade the protocol stack program file; loading the upgraded user-space protocol stack based on the upgraded protocol stack program file through a second application instance, migrating the service data stream to the second application instance, and using the upgraded user-space protocol stack to process the service data stream. By using different application instances of an application to load the user-space protocol stack or kernel-space protocol stack respectively, the service data stream can be migrated and restored between these application instances, thus enabling hot upgrades of the user-space protocol stack while maintaining uninterrupted service data streams, improving service efficiency and user experience. Attached Figure Description
[0011] The above and other objects, features, and advantages of this disclosure will become readily apparent from the following detailed description of exemplary embodiments, taken in conjunction with the accompanying drawings. Several embodiments of this disclosure are illustrated in the drawings by way of example and not limitation, in which:
[0012] Figure 1 A flowchart illustrating the user-space protocol stack hot upgrade method in an embodiment of this disclosure is shown.
[0013] Figure 2 A flowchart illustrating a hot-upgrade method for the user-space protocol stack in a first embodiment of this disclosure is shown.
[0014] Figure 3 A flowchart illustrating the hot-upgrade method for the user-space protocol stack in the second embodiment of this disclosure is shown.
[0015] Figure 4 A schematic diagram of a module using an adapter unit is shown in one embodiment of this disclosure.
[0016] Figure 5 This illustration shows a timing diagram of the interaction between the synchronization units of two application instances of the business data streams to be migrated out and to be migrated in, according to an embodiment of this disclosure.
[0017] Figure 6 This illustration shows a timing diagram of the interaction between the recovery units of two application instances of a business data stream to be migrated out and a business data stream to be migrated in, according to an embodiment of this disclosure.
[0018] Figure 7 This illustration shows a flowchart of a specific embodiment of the present disclosure, illustrating the process by which APP1 and APP3 exchange business metadata by calling the metadata interface of their respective recovery units.
[0019] Figure 8 A schematic diagram of a dual-stack unit in one embodiment of this disclosure is shown.
[0020] Figure 9 A schematic diagram of the control logic flow of the policy manager in one embodiment of this disclosure is shown.
[0021] Figure 10 A schematic diagram of the control logic flow of the policy manager in another embodiment of this disclosure is shown.
[0022] Figure 11 A schematic diagram of the structure of a splitter according to an embodiment of the present disclosure is shown.
[0023] Figure 12 A schematic diagram of a hot-upgrade device for a user-space protocol stack according to an embodiment of this disclosure is shown.
[0024] Figure 13A schematic diagram of a storage medium according to an embodiment of the present disclosure is shown.
[0025] Figure 14 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure is shown.
[0026] In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts. Detailed Implementation
[0027] The principles and spirit of this disclosure will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are given merely to enable those skilled in the art to better understand and implement this disclosure, and are not intended to limit the scope of this disclosure in any way. Rather, these embodiments are provided to make this disclosure more thorough and complete, and to fully convey the scope of this disclosure to those skilled in the art.
[0028] Those skilled in the art will recognize that embodiments of this disclosure can be implemented as a system, apparatus, device, method, or computer program product. Therefore, this disclosure can be specifically implemented in the following forms: entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0029] According to embodiments of this disclosure, methods, apparatus, media, devices, and platforms for calculating and training creative ability information are provided.
[0030] In this document, any number of elements in the accompanying figures is for illustrative purposes and not for limitation, and any naming is for distinction only and has no limiting meaning.
[0031] The principles and spirit of this disclosure are explained in detail below with reference to several representative embodiments.
[0032] The data involved in this disclosure may be data authorized by the user or fully authorized by all parties, and the implementation methods / executives of this disclosure may be combined with each other. Invention Overview
[0034] A protocol stack refers to the sum of all protocols at each layer in a network. It visually reflects the file transfer process within a network: the sending end packages and sends data sequentially from upper-layer protocols to lower-layer protocols. At the receiving end, the received data packets are unpacked from lower-layer protocols to upper-layer protocols to retrieve the data. For the TCP / IP protocol stack, the layers from top to bottom include the application layer, transport layer, network layer, data link layer, and physical layer.
[0035] In related technologies, a network includes network devices. When a network device's network interface card (NIC) receives a new data packet, it notifies the protocol stack of the arrival of the new packet via a hardware interrupt. The NIC driver in the computer's operating system kernel handles this hardware interrupt, copying the data packet from the NIC to a kernel-allocated buffer (DMA). The packet then undergoes protocol processing by the kernel-mode protocol stack and is finally copied to a buffer specified by the user program. This process, involving two memory copies, significantly impacts data packet processing capabilities and network performance. In the hardware interrupt method, an interrupt occurs when a component encounters an event requiring processing during the original program's execution. The program automatically switches to the corresponding service routine (interrupt service routine) to handle the event, and then returns to the original program after processing is complete.
[0036] The user-space protocol stack emerged to solve this problem. Generally, a user-space protocol stack refers to a complete TCP / IP protocol stack running in user space. This stack takes over the operating system's external interfaces, processing network packets received through these interfaces directly without passing through the kernel-space stack. Compared to the kernel-space stack, the user-space stack is more efficient at processing network packets, reducing memory copying and significantly improving network performance.
[0037] Functionally, the user-space protocol stack includes an application adaptation unit and a protocol acceleration unit. The protocol acceleration unit primarily accelerates the TCP / IP protocol. Specifically, it can offload data packet transmission / reception to user space via Address Family eXpress Data Path (AF_XDP) or Data Plane Development Kit (DPDK), and then process the data packets through the user-space TCP / IP protocol stack. The application adaptation unit adapts the application's socket loading and is responsible for communicating with the protocol acceleration unit. Specifically, it hijacks the application's socket loading, allowing the application to accelerate the user-space protocol stack without code modification. Therefore, generally speaking, the application adaptation unit's function is simpler than that of the protocol acceleration unit.
[0038] Here are a few concepts to explain:
[0039] A "program" refers to a set of instructions written in a certain language to accomplish a specific task; it is static code. A program is a file containing a series of information, so programs usually exist in the form of a "file".
[0040] A "process" refers to a single execution of a program, or a program that is currently running. A process can include one or more "threads," which share the process's resources, such as processor and memory resources. A "program" is static; a "process" is dynamic and temporary.
[0041] Currently, the application execution forms a process, which loads the user-space protocol stack and uses the user-space protocol stack to process the business data flow. However, when upgrading the user-space protocol stack, the application process and protocol acceleration layer need to be restarted, which will cause the interruption of business processing, which is detrimental to network operation efficiency and user experience.
[0042] In view of this, the present disclosure provides a method, apparatus, storage medium and device for hot upgrading of user-space protocol stack. By executing multiple application instances of the same application, each application instance can load a user-space protocol stack or a kernel protocol stack to have the ability to process business data streams. This creates a degree of freedom for business data streams to migrate between multiple application instances. Thus, upgrading the user-space protocol stack will not affect the processing of business data streams, achieving the purpose of hot upgrading of the user-space protocol stack.
[0043] It should be noted that the term "application instance" and "application process" are essentially the same concept. However, since "application instance" is more intuitive and easier to understand, the term "application instance" is mainly used in specific embodiments.
[0044] Exemplary method embodiments
[0045] In some examples, the deployment methods of the user-space protocol stack include merged deployment and independent deployment. The merged deployment method involves merging the application adaptation unit and protocol acceleration unit in each user-space protocol stack into a dynamic library, which is then loaded into the process of the application instance. The independent deployment method involves integrating the application adaptation unit in each user-space protocol stack into the process of the application instance as a dynamic library, while the protocol acceleration unit is configured in a process outside the process of the application instance. In a practical example of the independent deployment method, the application adaptation unit and the protocol acceleration unit can be deployed on different network devices in the network. For example, the application adaptation unit can be deployed as a dynamic library on network device A, and the protocol acceleration unit can be a process running in the operating system of network device B. Network device A and network device B are connected via a network communication connection, and the application adaptation unit and the protocol acceleration unit communicate with each other based on this network communication connection. Network device A and network device B can be used in scenarios such as cloud computing and cloud services. For example, network device A is the user terminal, such as a desktop computer, laptop computer, smartphone, or tablet computer, while network device B is the service terminal, such as a server or server group. The service terminal provides services to the user terminal, such as recommending songs or playlists based on user information.
[0046] The hot upgrade method for the user-space protocol stack in this embodiment is applicable to both independent deployment and merged deployment of user-space protocol stacks.
[0047] refer to Figure 1 The diagram illustrates a flowchart of a hot-upgrade method for the user-space protocol stack in an embodiment of this disclosure. The user-space protocol stack is used to process business data streams corresponding to services. A single application has N application instances, where N ≥ 2. These N application instances include a first application instance and a second application instance. In some embodiments, the N applications may be started or run sequentially during the execution of the hot-upgrade method, or they may have been pre-started. Figure 1 The hot upgrade method for the user-space protocol stack includes:
[0048] Step S101: Load the user-space protocol stack based on the protocol stack program file through the first application instance.
[0049] The protocol stack program file contains code implementing the user-space protocol stack. Running the code in the protocol stack program file enables the user-space protocol stack to function. There can be one or more protocol stack program files, which can be located on the same network device or distributed across different network devices. For example, for a user-space protocol stack implemented using a merged deployment method, the protocol stack program file may include dynamic library files; for a user-space protocol stack implemented using an independent deployment method, the protocol stack program file may include: dynamic library files (implementing the application configuration unit) and program files implementing the protocol acceleration unit.
[0050] Step S102: Process the business data stream through the user-mode protocol stack loaded by the first application instance or the kernel-mode protocol stack loaded by the third application instance to upgrade the protocol stack program file.
[0051] The kernel-mode protocol stack is loaded by a third application instance, which is an application instance other than the first and second application instances among N application instances.
[0052] Step S102 includes two hot upgrade methods. The first method requires a third application instance to load the kernel-mode protocol stack to enable it to process the service data stream. This allows the service data stream to be migrated from the first application instance to the third application instance for processing, thus upgrading the user-mode protocol stack without interrupting services. The second method is based on the difference between the static "program" and dynamic "process" of the user-mode protocol stack. The first application instance loads the user-mode protocol stack into the corresponding process without affecting the upgrade of the static program of the user-mode protocol stack. Before the user-mode protocol stack upgrade is completed, the first application instance can continue to use the un-upgraded user-mode protocol stack to process the service data stream, ensuring uninterrupted services.
[0053] Step S103: The upgraded user-space protocol stack is loaded by the second application instance based on the upgraded protocol stack program file, migrating the service data stream to the second application instance to process the service data stream using the upgraded user-space protocol stack. "Migration" refers to switching the service data stream from one application instance to another for processing.
[0054] Once the user-space protocol stack upgrade is complete, the service data stream can be migrated to the second application instance to be processed by the upgraded user-space protocol stack. This switches the service data stream from being processed by the kernel-space protocol stack or the unupgraded protocol stack to being processed by the upgraded protocol stack, ensuring uninterrupted service and achieving the goal of hot upgrade of the user-space protocol stack.
[0055] The specific principles of the two embodiments mentioned in step S102 will be described separately.
[0056] like Figure 2 The diagram shown illustrates a flowchart of the hot-upgrade method for the user-space protocol stack in the first embodiment of this disclosure. The process specifically includes:
[0057] Step S201: Load the user-space protocol stack based on the protocol stack program file through the first application instance.
[0058] The first application instance utilizes the user-space protocol stack to process business data streams.
[0059] Step S201 can be the same as step S101.
[0060] Step S202: Through the interaction between the first application instance and the third application instance, the business data stream is migrated from the first application instance to the third application instance, so as to utilize the kernel-mode protocol stack to process the business data stream.
[0061] In a possible example, the third application instance may be launched when step S201 needs to be executed.
[0062] Step S203: Upgrade the user-space protocol stack.
[0063] Since the business data stream has been migrated to a third application instance and processed by the kernel protocol stack, the user-space protocol stack can be upgraded.
[0064] Step S204: Load the upgraded user-space protocol stack based on the upgraded protocol stack program file through the second application instance.
[0065] In some embodiments, the second application instance may be launched when step S203 needs to be executed.
[0066] Steps S203 to S204 are one implementation of step S102.
[0067] Step S205: Through the interaction between the second application instance and the third application instance, the business data flow is migrated from the third application instance to the second application instance.
[0068] Step S205 is one implementation of step S103.
[0069] For example Figure 2The method flow is explained intuitively. Let the first application instance of a certain application APP be APP1, the second application instance be APP2, and the third application instance be APP3. Let the user-mode protocol stack before the upgrade be A, the user-mode protocol stack after the upgrade be A+, and the kernel-mode protocol stack be B. Then, according to... Figure 2 The execution process is as follows: APP1 loads A and processes the business data stream through A; APP3 starts and loads B; APP1 and APP3 communicate to migrate the business data stream from APP1 to APP3 for processing by B; APPA's program is upgraded to obtain A+, where A's program can be represented by one or more files. For example, the merged deployment of the user-space protocol stack is implemented as a dynamic library, which corresponds to one or more files; or, the independently deployed user-space protocol stack, where the application adaptation unit and protocol acceleration unit can each correspond to one or more files. Correspondingly, upgrading the user-space protocol stack can involve updating or replacing the corresponding files. APP2 starts and loads A+; APP2 and APP3 communicate to switch the business data stream from APP3 to APP2.
[0070] In some embodiments, to save resources, application instances in a no-service state can be shut down in response to the completion of business data flow migration. The no-service application instances include at least one of the following: the first application instance, i.e., APP1; and the third application instance, i.e., APP3. This allows only two application instances to coexist, thereby reducing the resource consumption of application instances and the user-space protocol stack.
[0071] Figure 2 The embodiment implements a hot upgrade scheme for the user-space protocol stack, which, compared with related technologies, can complete the upgrade of the user-space protocol stack without interrupting business operations. Moreover, the scheme is intuitive; after migrating the business data flow from APP1, the business data flow is not processed through the un-upgraded user-space protocol stack, which to some extent optimizes the processing of business data flow.
[0072] Again Figure 3 The diagram shown illustrates a flowchart of the hot-upgrade method for the user-space protocol stack in the second embodiment of this disclosure. The process specifically includes:
[0073] Step S301: Load the user-space protocol stack based on the protocol stack program file through the first application instance. The first application instance uses the user-space protocol stack to process business data streams.
[0074] Step S301 is basically the same as steps S201 and S101.
[0075] Step S302: While the user-space protocol stack loaded by the first application instance is processing the business data stream, upgrade the protocol stack program file.
[0076] Step S302 is another implementation of step S102.
[0077] In some embodiments, if the user-space protocol stack is deployed independently, the main upgrade is to the program of the user-space protocol stack. If the user-space protocol stack is deployed in a merged manner, the main upgrade is to the program of the dynamic library corresponding to the user-space protocol stack.
[0078] Step S303: Load the upgraded user-space protocol stack through the second application.
[0079] In this example, the upgraded user-space protocol stack and the non-upgraded user-space protocol stack will use different processes. Taking the merged deployment of user-space protocol stacks as an example, the non-upgraded user-space protocol stack is loaded into the process of APP1 as a dynamic library, while the upgraded user-space protocol stack is loaded into the process of APP2 as a dynamic library.
[0080] Taking the independently deployed user-space protocol stack as an example, the application configuration unit of the un-upgraded user-space protocol stack is loaded into process 1 of APP1 as a dynamic library, and the protocol acceleration unit of the un-upgraded user-space protocol stack is loaded into process 2; the application configuration unit of the upgraded user-space protocol stack is loaded into process 3 of APP2 as a dynamic library, and the protocol acceleration unit of the un-upgraded user-space protocol stack is loaded into process 4.
[0081] Step S304: Through the interaction between the second application instance and the first application instance, the business data flow is migrated from the first application instance to the second application instance.
[0082] Step S303 is another implementation of step S103.
[0083] For example Figure 3 To illustrate the method flow intuitively, let's assume the first application instance of a certain application (APP) is APP1, the second application instance is APP2, the user-mode protocol stack before the upgrade is denoted as A, and the user-mode protocol stack after the upgrade is denoted as A+. Then, according to... Figure 3 The process is as follows: APP1 loads A and processes the business data stream through A in the process; upgrades the program of A (which can be in file form) to obtain A+; starts APP2, and APP2 loads A+; APP1 and APP2 communicate to switch the business data stream from APP1 to APP2.
[0084] Compared to Figure 2In the implementation example, based on the same hot upgrade of the user-space protocol stack, Figure 3 The solution in this embodiment can reduce the operation of one APP3 and correspondingly reduce the migration of business data flow, reduce the resources occupied and improve efficiency. However, the upgraded user-mode protocol stack and the unupgraded user-mode protocol stack will coexist and exist in different processes.
[0085] exist Figure 3 In the example, to save resources, the application instance in the no-service state can also be shut down in response to the completion of the business data flow migration. The application instance in the no-service state includes the first application instance, such as APP1.
[0086] Figures 1 to 3 The embodiments illustrate the execution process of the hot upgrade method. The specific implementation methods of the hot upgrade method in some embodiments are described below. To achieve the startup of each application instance and the loading of the protocol stack, as well as the migration process of business data streams in the above embodiments, in some embodiments, corresponding functional modules can be configured in the application adaptation unit of the user-space protocol stack to implement these functions.
[0087] like Figure 4 The diagram shows a module schematic of the application of the adapter unit 400 in one embodiment of the present disclosure.
[0088] The application adaptation unit 400 includes a synchronization unit 401, a recovery unit 402, and a dual-stack unit 403. The synchronization unit 401 is used to obtain network connection parameters of the network connection used by the service from other application instances of the service data stream to be migrated out, and establish a corresponding network service interface in the application instance of the service data stream to be migrated in based on the network connection parameters. The network service interface is used for the network connection of the service; for example, processes with a service relationship can establish a network connection through their respective network service interfaces, and then transmit the service data stream through the network connection. The recovery unit 402 is used to receive service metadata required for service recovery from other application instances, and restore the service in the corresponding application instance according to the received service metadata to complete the migration of the service data stream from the other application instances to the corresponding application instance; or, the recovery unit 402 is used to send the service metadata of the corresponding application instance to other application instances based on the network connection. The dual-stack unit 403 is used to select a target protocol stack from two protocol stacks for the corresponding application instance, so that the application instance can process the migrated business data stream through the target protocol stack; wherein, both protocol stacks are user-mode protocol stacks, such as an unupgraded user-mode protocol stack and an upgraded user-mode protocol stack; or, one of the two protocol stacks is a user-mode protocol stack and the other is a kernel-mode protocol stack.
[0089] Specifically, to ensure uninterrupted migration of business data streams from one application instance to another, the other application instance needs to be configured with the same environment as the application instance from which the data streams are being migrated. This configuration includes restoring the network connection layer used by the business, restoring the business itself, selecting the target protocol stack (e.g., kernel-mode or user-mode protocol stack), and loading the selected target protocol stack within the other application instance. Therefore, the synchronization unit 401 is related to the business connection information and is used for restoring the business's network connection; the restoration unit 402 is related to the business information and is used for business restoration; and the dual-stack unit 403 is related to the protocol stack information and is used for loading the target protocol stack and selecting the type of protocol stack to be loaded.
[0090] The principle of the synchronization unit is explained exemplarily. In some embodiments, the network service interface can be established based on a socket. A socket is an abstraction of an endpoint for bidirectional communication between application processes on a host in a network. A socket is one end of process communication on the network, providing a mechanism for application layer processes to exchange data using network protocols. In TCP / IP-based communication, multiple TCP connections or multiple application processes may need to transmit data through the same TCP protocol port. To distinguish between different application processes and connections, the operating system provides an interface called a socket for applications to interact with the TCP / IP protocol. There are three main network connection parameters for distinguishing network communication and connections between different application processes: the IP address used by the network connection, the type of transport layer protocol used (TCP or UDP), and the port number used; these are referred to as network triplet information. Binding the network triplet information to a socket forms the socket interface as the network service interface, which allows for the differentiation of communication from different application processes or network connections. The synchronization unit provides connection-oriented recovery capabilities for application instances, and this connection can correspond to the socket interface. For example, if an application instance provides HTTP services via the IP address 1.2.3.4, the corresponding triple could be (TCP, 1.2.3.4, 80); or if it provides DNS services, the corresponding triple could be (UDP, 1.2.3.4, 53). Each triple is bound to the socket through the socket's bind and listen settings, resulting in a socket interface that serves as the network service interface. Using this network service interface, TCP communication between application instances and the migration of business data streams can be performed.
[0091] You can refer to them together. Figure 5 This diagram illustrates the timing of the interaction between synchronization units of two application instances of the data streams to be migrated out and to be migrated in, according to an embodiment of this disclosure. The two application instances of the data streams to be migrated out and to be migrated in can be, for example... Figure 2 The example shows the first application instance APP1 and the third application instance APP3. To distinguish between the two synchronization units, the synchronization unit of the application instance to be migrated into the business data stream is referred to as the first synchronization unit, and the synchronization unit of the application instance to be migrated out of the business data stream is referred to as the second synchronization unit.
[0092] Step S501: Instruct the second synchronization unit to keep listening for network connection requests.
[0093] In some embodiments, the second synchronization unit may have a synchronization port that listens for whether a network connection request has been received.
[0094] Step S502: Send a network connection request to the second synchronization unit through the first synchronization unit.
[0095] In some embodiments, the first synchronization unit may send the network connection request to the synchronization port so that it can be listened to by the second synchronization unit.
[0096] Step S503: Establish the communication connection through the second synchronization unit and return a connection success message to the first synchronization unit.
[0097] Step S504: In response to the establishment of the communication connection, a request for network connection parameters of the network connection used by the service is sent through the first synchronization unit.
[0098] The network connection parameters include network triplet information.
[0099] Step S505: Send the network connection parameters corresponding to the request to the first synchronization unit through the second synchronization unit.
[0100] Step S506: In response to receiving the network connection parameters, a socket bound to the network connection parameters is generated by the first synchronization unit to form a socket interface as the network service interface.
[0101] It should be noted that communication between application processes (such as individual application instances) is not limited to TCP / UDP communication methods; it can also be achieved through methods such as domain sockets or shared memory. Domain sockets are a method of inter-process data exchange based on shared file paths; shared memory allows processes to use a shared block of memory for reading and writing data exchange.
[0102] The principle of the recovery unit is described exemplarily. Figure 6 The diagram illustrates the timing of the interaction between the recovery units of two application instances of a business data stream to be migrated out and a business data stream to be migrated in, according to an embodiment of this disclosure. The two application instances of the business data streams to be migrated out and to be migrated in can be, for example... Figure 2 The example shows the first application instance APP1 and the third application instance APP3. To distinguish between the two recovery units, the recovery unit of the application instance to be migrated into the business data stream is referred to as the first recovery unit, and the recovery unit of the application instance to be migrated out of the business data stream is referred to as the second recovery unit.
[0103] exist Figure 6 The process specifically includes:
[0104] Step S601: Send a service metadata request to the second recovery unit through the first recovery unit.
[0105] The metadata request may originate from the application instance where the first recovery unit resides, for example... Figure 2 The first application instance in this embodiment. The business metadata refers to data describing business content, which can be used to map to associated business data for recovery.
[0106] Step S602: The metadata request can be passed to the third application instance through the second recovery unit;
[0107] Step S603: Receive the business metadata corresponding to the metadata request from the third application instance through the second recovery unit;
[0108] Step S604: Send the service metadata to the first recovery unit through the second recovery unit.
[0109] Subsequently, in response to obtaining the corresponding service metadata request from the second recovery unit through the first recovery unit, the service is restored in the corresponding application instance (exemplarily represented as the first application instance in the figure) through the first recovery unit, and the service corresponds to the service metadata. Specifically, this is shown as step S605: the service metadata is sent to the first application instance through the first recovery unit; step S606: the first application instance restores the service according to the service metadata.
[0110] The recovery unit provides business-oriented recovery capabilities. In some embodiments, since different application instances need to recover different services, the operation interface for recovering business data needs to be abstracted to adapt to different business information to be recovered, thus making it independent of the application instance. The recovery unit can provide only a Get interface without needing to care about the specific business information to be recovered that needs to be transmitted. For example, the first recovery unit requests the business metadata of the business to be recovered from the second recovery unit, and the second recovery unit provides the first recovery unit with the business metadata of all 10 businesses that need to be recovered. Then, the first recovery unit can recover all 10 businesses in the corresponding application instance based on the 10 metadata, without needing to know the specific content of the 10 businesses.
[0111] In some embodiments, application instances and recovery units can provide bidirectional metadata interfaces. For example, APP1 provides a metadata retrieval (MetaDataGet) interface for its recovery unit to call, and APP1's recovery unit also provides a metadata retrieval interface for APP1 to call. The metadata retrieval interface triggers a corresponding metadata retrieval request upon being called. Similarly, each application instance and its recovery unit can also provide a bidirectional metadata return (MetaDataRsp) interface to receive returned business metadata. The following uses... Figure 2 The business migration process between APP1 and APP3 will be used as an example to illustrate the process. The business migration process between APP3 and APP2 is similar.
[0112] like Figure 7 The example illustrates a flowchart of a specific embodiment of this disclosure, showing how APP1 and APP3 exchange business metadata by calling the metadata interfaces of their respective recovery units. The process includes:
[0113] Step S701: APP1 listens to the recovery port. Similar to the synchronization unit listening to the synchronization port previously, APP1 listens to the signal on the recovery port to detect whether there is a recovery request from APP3 for the business data stream to be migrated, thereby triggering the recovery process through the recovery unit. For example, the recovery request may manifest as receiving a connection request from APP3 on the recovery port. In this example, the recovery unit for APP1 is the second recovery unit, and the recovery unit for APP3 is the first recovery unit.
[0114] Step S702: APP3 calls the metadata acquisition interface of the first recovery unit, triggering the first recovery unit to send a connection request to the second recovery unit, requesting to establish a communication connection between APP3 and APP1.
[0115] Step S703: In response to the call, the first recovery unit of APP3 sends a metadata retrieval request to the second recovery unit.
[0116] Step S704: The second recovery unit of APP1 determines whether a connection request of the second recovery unit is detected on the recovery port; if not detected, return to step S701; if detected, proceed to step S705.
[0117] Step S705: In response to the detection of a connection request, the second recovery unit of APP1 interacts with the first recovery unit to establish a communication connection between APP1 and APP3, and waits for a metadata acquisition request.
[0118] Step S706: The second recovery unit of APP1 determines whether a metadata retrieval request has been received. If yes, proceed to step S707; otherwise, return to step S705 to wait for the metadata retrieval request.
[0119] Step S707: In response to receiving the metadata retrieval request, the second recovery unit of APP1 calls the metadata retrieval interface of APP1 to request the retrieval of business metadata;
[0120] Step S708: The second recovery unit obtains the business metadata returned by APP1. For example, APP1 can call the metadata return interface of the second recovery unit to pass the business metadata to the second recovery unit through the metadata return interface.
[0121] Step S709: The second recovery unit sends service metadata to the first recovery unit using the established communication connection.
[0122] Step S710: The first recovery unit returns the received service metadata to APP3, so that APP3 can restore the service based on the received service metadata. For example, the first recovery unit can call the metadata return interface of APP3 to return the service metadata to APP3.
[0123] It should be noted that, as mentioned earlier, the interaction between application instances, such as APP1 and APP3, is not limited to TCP / UDP communication; it can also be done through domain sockets or shared memory.
[0124] The principle of the dual-stack unit is explained by way of example.
[0125] like Figure 8 The diagram shows a schematic representation of a dual-stack unit in one embodiment of this disclosure.
[0126] The dual-stack unit 800 includes: a policy manager 801, a switcher 802, and a splitter 803.
[0127] The policy manager 801 is used to select the target protocol stack that the application instance needs to load based on the protocol stack selection rules, and output the corresponding service routing instructions. Specifically, with Figure 2 For example, in this embodiment, the target protocol stack can be a kernel-mode protocol stack or a user-mode protocol stack. The policy manager 801 is used to select the type of protocol stack used by the application instance, and can drive the switcher 802 to control the splitter 803 to distribute the data stream to which protocol stack through service splitting instructions. During the user-mode protocol stack upgrade process, it involves switching from the user-mode protocol stack to the kernel-mode protocol stack and then back to the user-mode protocol stack; the entire switching process is controlled by the policy manager 801. Figure 3In this embodiment, since only the user-space protocol stack is available, the protocol stack selection rule can be that each application example loads the user-space protocol stack. The switcher 802 is used to output traffic splitting configuration information based on the service splitting instruction. Specifically, with... Figure 2 In an example implementation, switcher 802 configures the corresponding traffic splitting configuration information according to the traffic splitting instructions of policy manager 801, thereby completing the switching between the user-mode protocol stack and the kernel-mode protocol stack for distributing service data streams. Figure 3 In this embodiment, the user-mode protocol stack can be switched directly. The splitter 803 is used to distribute the service data stream to the corresponding target protocol stack, i.e., the user-mode protocol stack or the kernel-mode protocol stack, based on the splitting configuration information.
[0128] In some embodiments, the principle of the policy manager 801 is explained exemplarily. Exemplarily, the protocol stack selection rule can be used to select an appropriate type of protocol stack for the first application instance, second application instance, and third application instance in the previous embodiments at startup. In some embodiments, the protocol stack selection rule includes at least one of the following: 1) If the previous running application instance loads a user-mode protocol stack, then it is determined that the next running application instance loads either a user-mode protocol stack or a kernel-mode protocol stack. Wherein, the next running application instance loading a user-mode protocol stack or loading a kernel-mode protocol stack corresponds to... Figure 3 and Figure 2 Implementation examples in two scenarios. Figure 2 For example, in the implementation example, when starting a third application instance, if the previous first application instance loads a user-mode protocol stack, then the third application instance will load a kernel-mode protocol stack. This ensures that the existing user-mode protocol stack is not affected, and the business data flow is not interrupted when switching to the kernel-mode protocol stack for processing business data. This corresponds to the process of switching from the user-mode protocol stack to the kernel-mode protocol stack. Alternatively, in... Figure 3 In this embodiment, each application instance loads a user-mode protocol stack upon startup, and the user-mode protocol stack loaded by the subsequent second application instance will be an upgraded version. 2) If the previous running application instance loads a kernel-mode protocol stack, then it is determined that the next running application instance will load a user-mode protocol stack.
[0129] Corresponding to Figure 2In this example, when starting the second application instance, if the previous third application instance loads a kernel-mode protocol stack, then the second application instance will load a user-mode protocol stack, which has already been upgraded. This ensures that the kernel-mode protocol stack is not affected, meaning the current business data flow based on the kernel-mode protocol stack will not be interrupted. This corresponds to the process of switching from the kernel-mode protocol stack to the user-mode protocol stack. Furthermore, the policy manager 801 also needs to automatically distinguish between application instances that require protocol stack upgrades and those that do not. Figure 2 , Figure 3 In the example, the application instance that needs to upgrade its protocol stack is actually the first application instance, APP1. The others are application instances that do not need to upgrade their protocol stacks, such as the second and third application instances. Since the first application instance is the first to start running among the N application instances, it can be identified as the primary instance (i.e., the application instance with the protocol stack that needs to be upgraded) and the other application instances besides the first one as backup instances (i.e., the application instances with the protocol stack that does not need to be upgraded).
[0130] like Figure 9 The diagram shown illustrates the control logic flow of a policy manager in one embodiment of this disclosure.
[0131] exist Figure 9 The process includes:
[0132] Step S901: In response to the current application instance being in a state of waiting to load a protocol stack, select the target protocol stack through the policy manager of the current application.
[0133] Specifically, the selection of the target protocol stack can refer to the protocol stack selection rules, and the target protocol stack is a kernel-mode protocol stack or a user-mode protocol stack.
[0134] Step S902: Determine the type of the current application instance as either a primary instance or a standby instance through the policy manager.
[0135] Wherein, the primary instance is the first application instance of the application, and the backup instances are the other application instances among the N application instances of the application, excluding the first application instance. Figure 2 In the example, the primary instance is APP1, and the backup instances are APP2 and APP3.
[0136] Step S903: In response to the policy manager determining that the current application instance is the primary instance, the policy manager outputs a service routing instruction so that the corresponding service data stream is distributed to the target protocol stack.
[0137] Specifically, the policy manager can distribute the business data stream through an instruction switcher and a stream splitter.
[0138] Step S904: In response to the policy manager determining that the current application instance is a standby instance, after the service is migrated to the current application instance, the policy manager outputs a service diversion instruction so that the corresponding service data stream is distributed to the target protocol stack.
[0139] In some embodiments, in step S903, if the current application instance is a primary instance, the policy manager can directly issue a service diversion instruction to notify the switcher to control the diversion and divert the service data stream to the corresponding target protocol stack; otherwise, in step S904, if the current application instance is a standby instance, the policy manager can wait for the synchronization unit and the recovery unit to restore the service connection and services in the current application instance before sending the service diversion instruction to the switcher to drive the diversion device.
[0140] Figure 10 What is shown is the corresponding Figure 3 This is a schematic diagram of the logic flow of the policy manager in one application instance of the embodiment. The flow can be applied to each application instance, such as a first application instance or a second application instance.
[0141] exist Figure 10 The process includes:
[0142] Step S1001: In response to the current application instance being in a state of waiting to load the protocol stack, the current application instance loads the user-space protocol stack.
[0143] Specifically, the kernel-mode protocol stack is not used in this embodiment, so the user-mode protocol stack is loaded directly.
[0144] Step S1002: Determine the type of the current application instance as either a primary instance or a standby instance through the policy manager.
[0145] Step S1003: In response to the policy manager determining that the current application instance is the primary instance, the policy manager outputs a service distribution instruction so that the corresponding service data stream is distributed to the user-space protocol stack.
[0146] In this case, the current application instance is the primary instance, i.e., the first application instance, which loads the un-upgraded user-space protocol stack.
[0147] Step S1004: In response to the policy manager determining that the current application instance is a standby instance, after the service is migrated to the current application instance, the policy manager outputs a service diversion instruction so that the corresponding service data stream is distributed to the user protocol stack loaded by the current application instance.
[0148] In this case, the current application instance is a standby instance, i.e. Figure 3 The second application instance in this embodiment loads an upgraded user-space protocol stack. Therefore, service migration is performed, and once the service is restored in the current application instance, the service data stream is offloaded to the upgraded user-space protocol stack. After the current application instance restores its network service interface (e.g., socket), the recovery unit can normally restore service connections or establish new service connections. For existing service connections corresponding to the service data stream to be migrated out, the appropriate service migration method can be selected based on the communication protocol type corresponding to the service.
[0149] Specifically, for services to be migrated that communicate using the TCP protocol, the necessary TCP connections will be rebuilt after the migration. Specifically, after the application instance is migrated out of the service data stream, the original connection for that service will be interrupted, requiring the application instance migrating into the service data stream to reconnect. For services to be migrated that communicate using the UDP protocol, the existing UDP connections will be used. Specifically, since UDP is a connectionless protocol, the existing connections for the corresponding services will be directly taken over by the application instance migrating into the service data stream after the migration.
[0150] In some embodiments, the shunt is described exemplarily.
[0151] like Figure 11 The diagram shown illustrates the structure of a splitter 1100 in one embodiment of this disclosure.
[0152] For example, the splitter 1100 may include the XDP program of the Extended Berkeley Packet Filter (eBPF) and the AF_XDP program.
[0153] Among them, eBPF is a virtual machine-like component in the Linux operating system kernel that can safely execute bytecode programs at kernel hook points, thereby enabling flexible customization of kernel system processing. XDP (eXpress Data Path) is an eBPF hook in the network processing process that can process data packets at the network card driver layer, thus bypassing the entire kernel protocol stack. The AF_XDP program is a solution that combines XDP technology to offload service data streams to user space.
[0154] Figure 11 China and Israel Figure 2 This example demonstrates the distribution of service data streams between the kernel-mode and user-mode protocol stacks. The eBPF XDP program takes over the service data stream from the service network interface (i.e., the network card, such as eth0) and publishes traffic distribution configuration information to configure whether the service data stream is distributed to the user-mode or kernel-mode protocol stack. The eBPF XDP program queries the traffic distribution configuration information to distribute the service data stream. If the service data stream needs to be distributed to the user-mode protocol stack, the packet is further sent to the user-mode protocol stack via AF_XDP; otherwise, the packet is sent to the kernel-mode protocol stack. If it corresponds to... Figure 3 In the embodiment, there is no kernel-mode protocol stack. In the first application instance, the splitter of the dual-stack unit sends packets to the un-upgraded user-mode protocol stack via AF_XDP. In the second application instance, the splitter of the dual-stack unit sends packets to the upgraded user-mode protocol stack via AF_XDP.
[0155] In some embodiments, the traffic splitting configuration information may include flag information indicating whether to select a kernel-mode protocol stack or a user-mode protocol stack to process the service data stream. For example, eBPF (Extended Berkeley Packet Filter) is a technology that can run sandboxed programs in the kernel, providing a mechanism for secure code injection when kernel events and user program events occur, allowing non-kernel developers to control the kernel. With the development of the kernel, eBPF has gradually expanded from its initial packet filtering to network, kernel, security, tracing, etc., and its features are still rapidly evolving. Early versions of BPF are called classic BPF, or eBPF for short. It is this functional expansion that has led to the current BPF being called extended BPF, or eBPF for short. The traffic splitting configuration information fwd_action map can be created based on BPF technology. The following shows an example of the code content:
[0156] SEC("maps") / * To store data or communicate with user-space programs, eBPF programs can use a feature called Maps (MAPs). eBPF programs include defining hash maps, performance event maps, and trace point handling functions, and the definition of these data structures and trace functions can be accomplished through the SEC() macro definition. * /
[0157] struct bpf_map_def fwd_action={
[0158] .type = BPF_MAP_TYPE_ARRAY, / *fwd_action is an array (ARRAY)* /
[0159] .key_size = sizeof(int), / * Size used to access each index of an array element * /
[0160] `.value_size = sizeof(int)`, / * Size of each array element; this item is used to select the protocol stack type, `value = 0` indicates a user-mode protocol stack, `value = 1` indicates a kernel-mode protocol stack. * /
[0161] .max_entries = 1, / * Length of the array * /
[0162] };
[0163] / * This entire code snippet demonstrates that in a BPF program, the creation of a mapping can be accomplished by declaring the struct bpf_map_def data structure, specifically the mapping of the object "fwd_action", which represents the flow configuration information fwd_action map. * /
[0164] It should be noted that, in Figure 8 In this embodiment, the policy manager, switcher, and traffic splitter are each an independent functional module, which facilitates more flexible module updates. For example, updating the rules in the policy manager will not affect the operation of the switcher and traffic splitter; similarly, changes to the traffic splitter's configuration information will not affect the operation of the traffic splitter. Of course, this is just one example, and the division of functional modules can be changed according to actual needs in other embodiments, and is not limited to the illustration.
[0165] by Figure 2Based on the embodiments, the implementation of the method flow is described by combining the synchronization unit, recovery unit, and dual-stack unit of each application instance therein. Let the first application instance of the same application be APP1, the second application instance be APP2, and the third application instance be APP3; APP1 has a synchronization unit A1, a recovery unit B1, and a dual-stack unit C1; APP2 has a synchronization unit A2, a recovery unit B2, and a dual-stack unit C2; APP3 has a synchronization unit A3, a recovery unit B3, and a dual-stack unit C3. The process includes:
[0166] APP1's C1 control APP1 loads the user-space protocol stack (not upgraded) to process the business data stream of business X.
[0167] When APP3 starts, it triggers C3 to control APP3 to load the kernel-mode protocol stack. APP3 also starts, triggering interaction between A3 and A1 to migrate the X service connection from APP1 to APP3, such as restoring the socket interface with the IP address and port bound to the service connection in APP3. Upon APP3's startup and socket interface restoration, B3 is triggered to restore X in APP3. Once X is restored, C3 is triggered to migrate the X service data stream from APP1 to APP3, where it is processed by the kernel-mode protocol stack. Afterwards, APP1 can exit and release its resources.
[0168] The user-space protocol stack is upgraded. Once the upgrade is complete, APP2 is launched.
[0169] When APP2 starts, it triggers C2 to control APP2 to load the user-space protocol stack (which has been upgraded). APP2 also starts, triggering interaction between A2 and A3 to migrate the X service connection from APP3 to APP2, such as restoring the socket interface with the IP address and port bound to the service connection in APP2. With APP2 starting and the socket interface restored, it triggers B2 to restore X in APP2. Once X is restored, it triggers C2 to migrate the X service data stream from APP3 to APP2, where it is processed by the upgraded user-space protocol stack. Afterwards, APP3 exits, releasing resources. From the user's perspective, using APP1 (without the upgraded user-space protocol stack) to APP2 (with the upgraded user-space protocol stack) is visually indistinguishable, and the service is not interrupted. Therefore, a hot upgrade of the user-space protocol stack is achieved.
[0170] Combined Figure 3 The principles are explained in the examples.
[0171] by Figure 3Based on the embodiments, the implementation of the method flow is described by combining the synchronization unit, recovery unit, and dual-stack unit of each application instance therein. Let the first application instance of the same application (APP) be APP1, and the second application instance be APP2; APP1 has a synchronization unit A1, a recovery unit B1, and a dual-stack unit C1; APP2 has a synchronization unit A2, a recovery unit B2, and a dual-stack unit C2. The process includes:
[0172] APP1's C1 controller loads the user-space protocol stack (not upgraded) to process the business data stream of business X. The user-space protocol stack is loaded into the process.
[0173] The program that upgrades the user-space protocol stack (such as one or more files) will trigger APP2 to start after the upgrade is complete.
[0174] When APP2 starts, it triggers C2 to control APP2 to load the user-space protocol stack (which has been upgraded). APP2 also starts, triggering interaction between A2 and A1 to migrate the X service connection from APP1 to APP2, such as restoring the socket interface with the IP address and port bound to the service connection in APP2. With APP2 starting and the socket interface restored, it triggers B2 to restore X in APP2. Once X is restored, it triggers C2 to migrate the X service data stream from APP1 to APP2, where it is processed by the upgraded user-space protocol stack. Afterwards, APP1 can exit and release resources.
[0175] The entire process, from the user using APP1 with the unupgraded user-mode protocol stack to the user using APP2 with the upgraded user-mode protocol stack, is visually identical to the user's experience of using APP1 and APP2, and the business is not interrupted. Therefore, a hot upgrade of the user-mode protocol stack is achieved.
[0176] Exemplary device embodiments
[0177] After introducing the exemplary method implementations of this disclosure, the following references are made. Figure 12 A hot-upgrade apparatus for a user-space protocol stack according to an exemplary embodiment of the present disclosure is described.
[0178] Since the functional modules or sub-modules of the user-space protocol stack hot-upgrade device in this embodiment are the same as the corresponding steps or sub-steps of the user-space protocol stack hot-upgrade method in the above exemplary method embodiment, the specific implementation in this embodiment can refer to the previous content, and the same technical content will not be repeated.
[0179] like Figure 12As shown, a user-mode protocol stack hot-upgrade device 1200 in one embodiment of this disclosure includes: a first application module 1201, used to load a user-mode protocol stack based on a protocol stack program file through a first application instance; a hot-upgrade module 1202, used to process service data streams through the user-mode protocol stack loaded by the first application instance or the kernel-mode protocol stack loaded by a third application instance, so as to upgrade the protocol stack program file; and a second application module 1203, used to load the upgraded user-mode protocol stack based on the upgraded protocol stack program file through the second application instance, and migrate the service data streams to the second application instance, so as to process the service data streams using the upgraded user-mode protocol stack.
[0180] In some embodiments, the hot upgrade module 1202 includes: a first service migration module, configured to migrate the service data stream from the first application instance to the third application instance through interaction between the first application instance and the third application instance, so as to process the service data stream using the kernel-mode protocol stack; the hot upgrade module is configured to upgrade the program of the user-mode protocol stack; the second application module 1203 includes: a protocol stack loading module, configured to load the upgraded user-mode protocol stack based on the upgraded protocol stack program file through the second application instance; and a second migration module, configured to migrate the service data stream from the third application instance to the second application instance through interaction between the second application instance and the third application instance.
[0181] In some embodiments, the hot upgrade module 1202 is used to upgrade the protocol stack program file while maintaining the user-space protocol stack loaded by the first application instance to process the business data stream; the second application module 1203 includes: a protocol stack loading module, which loads the upgraded user-space protocol stack through the second application; and a third migration module, which migrates the business data stream from the first application instance to the second application instance through the interaction between the second application instance and the first application instance.
[0182] In some embodiments, the user-space protocol stack includes: an application adaptation unit and a protocol acceleration unit; the application adaptation unit is deployed in each application instance; the application adaptation unit includes: a synchronization unit, a recovery unit, and a dual-stack unit; the synchronization unit is used to obtain network connection parameters of the network connection used by the service from other application instances of the service data stream to be migrated out, and establish a corresponding network service interface in the application instance of the service data stream to be migrated in based on the network connection parameters, the network service interface being used for the network connection of the service; the recovery unit is used to receive service metadata required for service recovery from other application instances, and restore the service in the corresponding application instance according to the received service metadata, so as to complete the migration of the service data stream from the other application instances to the corresponding application instance; or, the recovery unit is used to send the service metadata of the corresponding application instance to other application instances based on the network connection; the dual-stack unit is used to select a target protocol stack from two protocol stacks for the corresponding application instance, so that the application instance processes the migrated service data stream through the target protocol stack; wherein, both protocol stacks are user-space protocol stacks, or one of the two protocol stacks is a user-space protocol stack and the other is a kernel-space protocol stack.
[0183] In some embodiments, the synchronization unit obtains network connection parameters of the service from other application instances of the service data stream to be migrated out, and establishes a corresponding network service interface in the application instance of the service data stream to be migrated in based on the network connection parameters. This includes: sending a network connection request to the application instance of the service data stream to be migrated out through the synchronization unit of the application instance of the service data stream to be migrated in, so as to establish a communication connection between the two application instances; in response to the establishment of the communication connection, sending a request for network connection parameters of the network connection used by the service through the synchronization unit; and in response to receiving the network connection parameters, generating a socket bound to the network connection parameters through the synchronization unit to form a socket interface as the network service interface.
[0184] In some embodiments, the recovery unit receives service metadata required for service recovery from other application instances and restores the service in the corresponding application instance based on the received service metadata, including: sending a service metadata request to a second recovery unit through a first recovery unit; the first recovery unit and the second recovery unit belong to different application instances; obtaining the service metadata corresponding to the service metadata request from the second recovery unit through the first recovery unit; restoring the service in the corresponding application instance through the first recovery unit; the service corresponds to the service metadata.
[0185] In some embodiments, the dual-stack unit includes: a policy manager, a switcher, and a traffic splitter; the policy manager is used to select the target protocol stack to be loaded by the application instance based on the protocol stack selection rules, and output the corresponding service traffic splitting instruction; the switcher is used to output traffic splitting configuration information based on the service traffic splitting instruction; the traffic splitter is used to distribute the service data stream to the corresponding target protocol stack based on the traffic splitting configuration information.
[0186] In some embodiments, the protocol stack selection rule includes at least one of the following: if the previous running application instance has a user-mode protocol stack loaded, then the next running application instance is determined to load either a user-mode protocol stack or a kernel-mode protocol stack; if the previous running application instance has a kernel-mode protocol stack loaded, then the next running application instance is determined to load a user-mode protocol stack.
[0187] In some embodiments, the policy manager selects the target protocol stack used by the application instance based on the protocol stack selection rules and outputs corresponding service diversion instructions, including: in response to the current application instance being in a state of waiting to load a protocol stack, selecting the target protocol stack through the policy manager of the current application; determining the type of the current application instance as a primary instance or a backup instance through the policy manager; wherein the primary instance is the first application instance of the application, and the backup instance is any of the N application instances of the application other than the first application instance; in response to the policy manager determining the current application instance as a primary instance, outputting service diversion instructions through the policy manager so that the corresponding service data stream is distributed to the target protocol stack; in response to the policy manager determining the current application instance as a backup instance, after the service is migrated to the current application instance, outputting service diversion instructions through the policy manager so that the corresponding service data stream is distributed to the target protocol stack.
[0188] In some embodiments, the apparatus further includes: a migration method selection module, configured to select the appropriate migration method for the service based on the communication protocol type corresponding to the service, including: for services to be migrated that communicate based on the TCP communication protocol, rebuilding the TCP connection required by the service after migration; for services to be migrated that communicate based on the UDP communication protocol, using the UDP connection already established by the service to be migrated.
[0189] In some embodiments, the user-space protocol stack includes: an application adaptation unit and a protocol acceleration unit; the application adaptation unit and protocol acceleration unit in each user-space protocol stack are deployed in a merged deployment mode or an independent deployment mode; wherein, the merged deployment mode includes: the application adaptation unit and protocol acceleration unit in each user-space protocol stack are merged into a dynamic library, and the dynamic library is loaded into the process of the application instance; the independent deployment mode includes: the application adaptation unit in each user-space protocol stack is integrated into the process of the application instance in the form of a dynamic library, and the protocol acceleration unit is configured in a process other than the process of the application instance.
[0190] In some embodiments, the apparatus further includes: an instance shutdown module, configured to shut down an application instance in a no-service state in response to the completion of service data flow migration, wherein the application instance in the no-service state includes at least one of the following: the first application instance; the third application instance.
[0191] Exemplary storage media
[0192] Having described the methods and apparatus of exemplary embodiments of this disclosure, the following references are made. Figure 13 The storage medium of the exemplary embodiments of this disclosure will be described.
[0193] refer to Figure 13 As shown, a storage medium 1300 according to an embodiment of the present disclosure is described. This medium may contain program code and can run on a device, such as a server, to implement the various steps and sub-steps in the above-described method embodiments of the present disclosure. In this document, a readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0194] The program code may take the form of any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0195] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0196] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0197] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0198] Exemplary electronic devices
[0199] Having described the storage medium of exemplary embodiments of this disclosure, the following references are made. Figure 14 An electronic device according to an exemplary embodiment of the present disclosure will be described.
[0200] Figure 14 The electronic device 1400 shown is merely an example and should not be construed as limiting the functionality or scope of use of the embodiments disclosed herein. The electronic device 1400 can be implemented in servers, etc.
[0201] like Figure 14 As shown, the electronic device 1400 is manifested in the form of a general-purpose computing device. The components of the electronic device 1400 may include, but are not limited to: at least one processing unit 1410, at least one storage unit 1420, and a bus 1430 connecting different system components (including storage unit 1420 and processing unit 1410).
[0202] The storage unit stores program code, which can be executed by the processing unit 1410 to perform the steps and sub-steps of the method described in the above embodiments of this disclosure. For example, the processing unit 1410 can perform, for instance... Figure 1 The steps in the embodiments.
[0203] In some embodiments, storage unit 1420 may include volatile storage units, such as random access memory (RAM) 14201 and / or cache storage unit 14202, and may further include read-only memory (ROM) 14203.
[0204] In some embodiments, the storage unit 1420 may also include a program / utility 14204 having a set (at least one) program module 14205, such program module 14205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0205] In some embodiments, bus 1430 may include a data bus, an address bus, and a control bus.
[0206] In some embodiments, the electronic device 1400 can also communicate with one or more external devices 1500 (e.g., keyboards, pointing devices, Bluetooth devices, etc.) via the input / output (I / O) interface 1450. Optionally, the electronic device 1400 also includes a display unit 1440 connected to the input / output (I / O) interface 1450 for display purposes. Furthermore, the electronic device 1400 can also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1460. As shown, the network adapter 1460 communicates with other modules of the electronic device 1400 via a bus 1430. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with the electronic device 1400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0207] It should be noted that although several modules or sub-modules, such as the thermal upgrade device, are mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.
[0208] Furthermore, although the operations of the methods disclosed herein are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0209] While the principles of this disclosure have been described with reference to several specific embodiments, it should be understood that this disclosure is not limited to the disclosed specific embodiments, and the division of aspects does not imply that features in these aspects cannot be combined for benefit; such division is merely for convenience of expression. This disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
Claims
1. A method for hot-upgrading a user-space protocol stack, characterized in that, The user-space protocol stack is used to process the business data stream corresponding to the business. A single application has N application instances, where N ≥ 2, and the N application instances include a first application instance and a second application instance. The method includes: The user-space protocol stack is loaded based on the protocol stack program file through the first application instance; The service data stream is processed by the user-mode protocol stack loaded by the first application instance or the kernel-mode protocol stack loaded by the third application instance to upgrade the protocol stack program file; wherein, the service data stream is processed by the user-mode protocol stack loaded by the first application instance in the following way: based on the inherent isolation between the static program file and the dynamic running process of the user-mode protocol stack, during the upgrade operation of the external static protocol stack program file, the first application instance always uses the old version of the un-upgraded user-mode protocol stack to process the service data stream until the user-mode protocol stack upgrade is completed; The service data stream is migrated to the second application instance by loading the upgraded user-space protocol stack based on the upgraded protocol stack program file, so as to process the service data stream using the upgraded user-space protocol stack.
2. The hot upgrade method for the user-space protocol stack according to claim 1, characterized in that, The process of handling business data streams through the kernel-mode protocol stack loaded by the third application instance to upgrade the protocol stack program file includes: Through the interaction between the first application instance and the third application instance, the business data stream is migrated from the first application instance to the third application instance so as to utilize the kernel-mode protocol stack to process the business data stream; Upgrade the program of the user-space protocol stack; The step of loading the upgraded user-space protocol stack based on the upgraded protocol stack program file through the second application instance and migrating the service data stream to the second application instance includes: The upgraded user-space protocol stack is loaded by the second application instance based on the upgraded protocol stack program file; The business data flow is migrated from the third application instance to the second application instance through the interaction between the second application instance and the third application instance.
3. The hot upgrade method for the user-space protocol stack according to claim 1, characterized in that, The process of handling business data streams through the user-space protocol stack loaded by the first application instance to upgrade the protocol stack program file includes: While maintaining the user-space protocol stack loaded by the first application instance to process the business data stream, the protocol stack program file is upgraded; The step of loading the upgraded user-space protocol stack based on the upgraded protocol stack program file through the second application instance and migrating the service data stream to the second application instance includes: The upgraded user-space protocol stack is loaded through the second application instance; The business data flow is migrated from the first application instance to the second application instance through the interaction between the second application instance and the first application instance.
4. The hot upgrade method for the user-space protocol stack according to any one of claims 1 to 3, characterized in that, The user-space protocol stack includes: an application adaptation unit and a protocol acceleration unit; the application adaptation unit is deployed in each application instance; the application adaptation unit includes: a synchronization unit, a recovery unit, and a dual-stack unit; The synchronization unit is used to obtain the network connection parameters of the network connection used by the business from other application instances of the business data stream to be migrated out, and to establish a corresponding network service interface in the application instance of the business data stream to be migrated in based on the network connection parameters. The recovery unit is configured to receive service metadata required for service recovery from other application instances, and restore services in the corresponding application instance according to the received service metadata, so as to complete the migration of service data flow from the other application instances to the corresponding application instance; or, the recovery unit is configured to send the service metadata of the corresponding application instance to other application instances based on the network connection. The dual-stack unit is used to select a target protocol stack from two protocol stacks for the corresponding application instance, so that the application instance can process the migrated business data stream through the target protocol stack; wherein, both protocol stacks are user-mode protocol stacks, or one of the two protocol stacks is a user-mode protocol stack and the other is a kernel-mode protocol stack.
5. The hot upgrade method for the user-space protocol stack according to claim 4, characterized in that, The step of obtaining network connection parameters for the service from other application instances of the service data stream to be migrated out, and establishing a corresponding network service interface in the application instance of the service data stream to be migrated in based on the network connection parameters, includes: The application instance of the business data stream to be migrated in sends a network connection request to the application instance of the business data stream to be migrated out in order to establish a communication connection between the two application instances. In response to the establishment of the communication connection, a request for network connection parameters of the network connection used by the service is sent through the synchronization unit; In response to receiving the network connection parameters, the synchronization unit generates a socket bound to the network connection parameters to form a socket interface as the network service interface.
6. The hot upgrade method for the user-space protocol stack according to claim 4, characterized in that, The step of receiving service metadata required for service recovery from other application instances and restoring services in the corresponding application instances based on the received service metadata includes: The first recovery unit sends a service metadata request to the second recovery unit; the first recovery unit and the second recovery unit belong to different application instances. The first recovery unit obtains the business metadata corresponding to the business metadata request from the second recovery unit. The service is restored in the corresponding application instance through the first recovery unit; the service corresponds to the service metadata.
7. The hot upgrade method for the user-space protocol stack according to claim 4, characterized in that, The dual-stack unit includes: a policy manager, a switcher, and a stream splitter; The policy manager is used to select the target protocol stack that the application instance needs to load based on the protocol stack selection rules, and output the corresponding business diversion instructions. The switcher is used to output traffic splitting configuration information based on the service splitting instruction; The splitter is used to distribute the service data stream to the corresponding target protocol stack based on the splitting configuration information.
8. The hot upgrade method for the user-space protocol stack according to claim 7, characterized in that, The protocol stack selection rules include at least one of the following: If the previous running application instance has a user-mode protocol stack loaded, then it is determined whether the next running application instance loads a user-mode protocol stack or a kernel-mode protocol stack. If the previous running application instance loads the kernel-mode protocol stack, then the next running application instance will load the user-mode protocol stack.
9. The hot upgrade method for the user-space protocol stack according to claim 7, characterized in that, The step of selecting the target protocol stack used by the application instance based on the protocol stack selection rules and outputting the corresponding service diversion instructions includes: In response to the current application instance being in a state of waiting to load a protocol stack, the target protocol stack is selected through the policy manager of the current application; The policy manager determines whether the current application instance is a primary instance or a standby instance; wherein, the primary instance is the first application instance of the application, and the standby instance is any of the N application instances of the application other than the first application instance. In response to the policy manager determining that the current application instance is the primary instance, the policy manager outputs a service routing instruction so that the corresponding service data stream is distributed to the target protocol stack. In response to the policy manager determining that the current application instance is a standby instance, after the service is migrated to the current application instance, the policy manager outputs a service diversion instruction so that the corresponding service data stream is distributed to the target protocol stack.
10. The hot upgrade method for the user-space protocol stack according to claim 2 or 3, characterized in that, Also includes: Choose the appropriate service migration method based on the communication protocol type corresponding to the service, including: For services that are to be migrated and communicate based on the TCP communication protocol, the TCP connections required for the services will be rebuilt after the migration. For services that are to be migrated, which communicate using the UDP communication protocol, the existing UDP connections of the services to be migrated will be used.
11. The hot upgrade method for the user-space protocol stack according to claim 1, characterized in that, The user-space protocol stack includes: an application adaptation unit and a protocol acceleration unit; The application adaptation unit and protocol acceleration unit in each user-space protocol stack can be deployed either in a merged manner or independently; among them, The merged deployment method includes: merging the application adaptation unit and protocol acceleration unit in each user-space protocol stack into a dynamic library, which is then loaded into the process of the application instance; The independent deployment method includes: the application adaptation unit in each user-space protocol stack is integrated into the process of the application instance in the form of a dynamic library, and the protocol acceleration unit is configured in a process outside the process of the application instance.
12. The hot upgrade method for the user-space protocol stack according to claim 2 or 3, characterized in that, Also includes: In response to the completion of the business data flow migration, the application instance in the no-business state is shut down. The application instance in the no-business state includes at least one of the following: the first application instance; the third application instance.
13. A hot-upgrade device for a user-space protocol stack, characterized in that, The user-space protocol stack is used to process the business data stream corresponding to the business. A single application has N application instances, where N ≥ 2, and the N application instances include a first application instance and a second application instance. The device includes: The first application module is used to load the user-space protocol stack based on the protocol stack program file through the first application instance; The hot upgrade module is used to process business data streams through the user-mode protocol stack loaded by the first application instance or the kernel-mode protocol stack loaded by the third application instance, so as to upgrade the protocol stack program file; wherein, the user-mode protocol stack loaded by the first application instance processes business data streams as follows: based on the inherent isolation between the static program file and the dynamic running process of the user-mode protocol stack, during the upgrade operation of the external static protocol stack program file, the first application instance always uses the un-upgraded old version of the user-mode protocol stack to process business data streams until the user-mode protocol stack upgrade is completed; The second application module is used to load the upgraded user-space protocol stack based on the upgraded protocol stack program file through the second application instance, and migrate the service data stream to the second application instance so as to process the service data stream using the upgraded user-space protocol stack.
14. The hot-upgrade device for the user-space protocol stack according to claim 13, characterized in that, The hot-upgrade module includes: The first service migration module is used to migrate the service data stream from the first application instance to the third application instance through the interaction between the first application instance and the third application instance, so as to process the service data stream using the kernel-mode protocol stack. The hot upgrade module is used to upgrade the program of the user-mode protocol stack; The second application module includes: The protocol stack loading module is used to load the upgraded user-space protocol stack based on the upgraded protocol stack program file through the second application instance; The second migration module migrates the business data flow from the third application instance to the second application instance through the interaction between the second application instance and the third application instance.
15. The hot-upgrade device for the user-space protocol stack according to claim 13, characterized in that, The hot upgrade module is used to upgrade the protocol stack program file while maintaining the user-space protocol stack loaded by the first application instance to process the business data stream; The second application module includes: The protocol stack loading module loads the upgraded user-space protocol stack through the second application instance; The third migration module migrates the business data stream from the first application instance to the second application instance through the interaction between the second application instance and the first application instance.
16. The hot-upgrade apparatus for the user-space protocol stack according to any one of claims 13 to 15, characterized in that, The user-space protocol stack includes: an application adaptation unit and a protocol acceleration unit; the application adaptation unit is deployed in each application instance; the application adaptation unit includes: a synchronization unit, a recovery unit, and a dual-stack unit; The synchronization unit is used to obtain the network connection parameters of the network connection used by the business from other application instances of the business data stream to be migrated out, and to establish a corresponding network service interface in the application instance of the business data stream to be migrated in based on the network connection parameters. The recovery unit is configured to receive service metadata required for service recovery from other application instances, and restore services in the corresponding application instance according to the received service metadata, so as to complete the migration of service data flow from the other application instances to the corresponding application instance; or, the recovery unit is configured to send the service metadata of the corresponding application instance to other application instances based on the network connection. The dual-stack unit is used to select a target protocol stack from two protocol stacks for the corresponding application instance, so that the application instance can process the migrated business data stream through the target protocol stack; wherein, both protocol stacks are user-mode protocol stacks, or one of the two protocol stacks is a user-mode protocol stack and the other is a kernel-mode protocol stack.
17. The hot-upgrade device for the user-space protocol stack according to claim 16, characterized in that, The synchronization unit obtains network connection parameters of the service from other application instances of the service data stream to be migrated out, and establishes a corresponding network service interface in the application instance of the service data stream to be migrated in based on the network connection parameters. This includes: sending a network connection request to the application instance of the service data stream to be migrated out through the synchronization unit of the application instance of the service data stream to be migrated in, so as to establish a communication connection between the two application instances; in response to the establishment of the communication connection, sending a request for network connection parameters of the network connection used by the service through the synchronization unit; and in response to receiving the network connection parameters, generating a socket bound to the network connection parameters through the synchronization unit to form a socket interface as the network service interface.
18. The hot-upgrade device for the user-space protocol stack according to claim 16, characterized in that, The recovery unit receives service metadata required for service recovery from other application instances, and restores the service in the corresponding application instance based on the received service metadata, including: sending a service metadata request to a second recovery unit through a first recovery unit; the first recovery unit and the second recovery unit belong to different application instances; obtaining the service metadata corresponding to the service metadata request from the second recovery unit through the first recovery unit; restoring the service in the corresponding application instance through the first recovery unit; the service corresponds to the service metadata.
19. The hot-upgrade device for the user-space protocol stack according to claim 16, characterized in that, The dual-stack unit includes: a policy manager, a switcher, and a stream splitter; The policy manager is used to select the target protocol stack that the application instance needs to load based on the protocol stack selection rules, and output the corresponding business diversion instructions. The switcher is used to output traffic splitting configuration information based on the service splitting instruction; The splitter is used to distribute the service data stream to the corresponding target protocol stack based on the splitting configuration information.
20. The hot-upgrade device for the user-space protocol stack according to claim 19, characterized in that, The protocol stack selection rules include at least one of the following: If the previous running application instance has a user-mode protocol stack loaded, then it is determined whether the next running application instance loads a user-mode protocol stack or a kernel-mode protocol stack. If the previous running application instance loads the kernel-mode protocol stack, then the next running application instance will load the user-mode protocol stack.
21. The hot-upgrade device for the user-space protocol stack according to claim 19, characterized in that, The policy manager selects the target protocol stack for the application instance based on protocol stack selection rules and outputs corresponding service diversion instructions, including: in response to the current application instance being in a state of waiting to load a protocol stack, selecting the target protocol stack through the policy manager of the current application; determining the type of the current application instance as a primary instance or a backup instance through the policy manager; wherein the primary instance is the first application instance of the application, and the backup instance is any of the N application instances of the application other than the first application instance; in response to the policy manager determining the current application instance as a primary instance, outputting service diversion instructions through the policy manager so that the corresponding service data stream is distributed to the target protocol stack; in response to the policy manager determining the current application instance as a backup instance, after the service is migrated to the current application instance, outputting service diversion instructions through the policy manager so that the corresponding service data stream is distributed to the target protocol stack.
22. The hot-upgrade device for the user-space protocol stack according to claim 13 or 14, characterized in that, It also includes a migration method selection module, used to select the appropriate migration method for the business based on the communication protocol type corresponding to the business, including: for the business to be migrated that communicates based on the TCP communication protocol, the TCP connection required by the business will be rebuilt after the migration; for the business to be migrated that communicates based on the UDP communication protocol, the UDP connection already established by the business to be migrated will be used.
23. The hot-upgrade device for the user-space protocol stack according to claim 13, characterized in that, The user-space protocol stack includes: an application adaptation unit and a protocol acceleration unit; The application adaptation unit and protocol acceleration unit in each user-space protocol stack can be deployed either in a merged manner or independently; among them, The merged deployment method includes: merging the application adaptation unit and protocol acceleration unit in each user-space protocol stack into a dynamic library, which is then loaded into the process of the application instance; The independent deployment method includes: the application adaptation unit in each user-space protocol stack is integrated into the process of the application instance in the form of a dynamic library, and the protocol acceleration unit is configured in a process outside the process of the application instance.
24. The hot-upgrade device for the user-space protocol stack according to claim 14 or 15, characterized in that, Also includes: The instance shutdown module is used to shut down application instances in a no-service state in response to the completion of business data flow migration. The application instances in the no-service state include at least one of the following: the first application instance; the third application instance.
25. A storage medium having a computer program stored thereon, characterized in that, The computer program is executed by the processor to achieve the following: The hot upgrade method for the user-space protocol stack according to any one of claims 1 to 12.
26. An electronic device, characterized in that, include: Processing unit; as well as A storage unit for storing the executable instructions of the processing unit; The processing unit is configured to execute the executable instructions: The hot upgrade method for the user-space protocol stack according to any one of claims 1 to 12.
Citation Information
Patent Citations
Parallel user state protocol stack management method and protocol stack system
CN104951357A