CN117640747A - Agent service-based vhost-user reconnection method and system - Google Patents

Agent service-based vhost-user reconnection method and system Download PDF

Info

Publication number
CN117640747A
CN117640747A CN202311702336.8A CN202311702336A CN117640747A CN 117640747 A CN117640747 A CN 117640747A CN 202311702336 A CN202311702336 A CN 202311702336A CN 117640747 A CN117640747 A CN 117640747A
Authority
CN
China
Prior art keywords
vhost
user
proxy service
service module
back end
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311702336.8A
Other languages
Chinese (zh)
Inventor
冯力
张凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SmartX Inc
Original Assignee
SmartX Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SmartX Inc filed Critical SmartX Inc
Priority to CN202311702336.8A priority Critical patent/CN117640747A/en
Publication of CN117640747A publication Critical patent/CN117640747A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a method and a system for reconnection of a vhost-user based on proxy service; the vhost-user reconnection method comprises the following steps: the proxy service module locally creates a Unix Domain Socket file, establishes the connection between the proxy service module and the back end of the vhost-user according to the Unix Domain Socket file, and establishes the connection between the virtual machine monitor and the proxy service module; the proxy service module uses Unix Domain Socket file, receives the virtual machine instruction and returns the response data of the back end of the vhost-user according to the connection between the virtual machine monitor and the proxy service module and the connection between the proxy service module and the back end of the vhost-user; the proxy service module creates a message queue locally, and when the connection between the proxy service module and the back end of the vhost-user is disconnected, the proxy service module automatically repairs the connection between the proxy service module and the back end of the vhost-user according to the vhost-user message recorded by the message queue. The technical scheme of the method and the device can solve the problem that the virtual machine manager in the prior art cannot effectively support disconnection reconnection of the back end of the vhost-user.

Description

Agent service-based vhost-user reconnection method and system
Technical Field
The present disclosure relates to the field of network communications technologies, and in particular, to a method and a system for connecting a vhost-user based on proxy service.
Background
vhost-user is a technique for high performance communication between a virtual machine and a host. By directly connecting the equipment of the virtual machine with the equipment of the host, zero-copy data transmission is realized, thereby improving network and IO performance and reducing delay.
Two kinds of technology expansion are realized on the basis of the vhost-user technology, namely the vhost-user-blk technology and the vhost-user-scsi technology. Wherein the vhost-user-blk technique enables high performance block device communication between the virtual machine and the host. It allows the virtual machine to directly access the block device on the host via the vhost-user interface, directly performing read and write operations, providing higher storage performance and lower latency. The principles of operation of the vhost-user-scsi technique are similar to that of the vhost-user-blk technique. The front end of the SCSI device of the virtual machine communicates with the back end of the SCSI device of the host through a vhost-user interface without intervention of a virtual machine manager. The direct communication mode avoids multiple copies of data and improves the storage performance. Using the vhost-user-SCSI technique, the virtual machine may access SCSI devices on the host as its own disk.
In the vhostat-user architecture, the virtio driver in the virtual machine is called a front end, the vhostat-user target is called a vhostat-user back end, and the front end and the back end communicate through Unix Domain Socket to establish a shared memory. The current vhost-user-blk/scsi belongs to a newer technology, and can provide good performance and lower delay under normal working conditions, however, how to quickly recover the IO after the equipment of the back-end host fails is a difficult problem. The virtual machine needs to reconnect the back end after the back end host fails and resumes the service, a process called reconnection. Reconnection is an essential feature of the enterprise deployment of the vhost-user. Without reconnection, once the back-end fails, the virtual machine does not recover the service even if the back-end subsequently recovers. To implement reconnection, it is common practice to find disconnection in the virtual machine manager, and to actively connect the backend, and reestablish the entire vhost-user link after connection is successful.
Currently, various virtual machine managers cannot perfectly support the problem of reconnection disconnection of a vhost-user back end, such as qemu, a closed virtual machine manager and the like. If the virtual machine manager is to support the vhost-user reconnection, a complete set of connection reestablishing steps are needed, including initializing virtual devices, memory sharing, multi-queues, and the like. The above described cumbersome steps result in the drawbacks of existing virtual machine managers to implement reconnections as follows: (1) a virtual machine manager that needs to be adapted to different versions; (2) different types of virtual machine managers need to be adapted; (3) The function of the virtual machine manager is complex, and as an infrastructure, it is difficult to obtain a stable virtual machine manager supporting reconnections.
Content of the application
The application provides a virtual machine-user reconnection scheme based on proxy service, which can solve the problem that a virtual machine manager in the prior art cannot effectively support disconnection and reconnection of a virtual machine-user back end.
In order to thoroughly and generally solve the problems, the scheme introduces a message replay technology to realize the non-perceived reconnection recovery of the virtual machine manager. The advantage of this scheme is: the various virtual machine manager products and different versions do not need additional processing, and the automatic reconnection of the vhost-user can be obtained without perception, so that the usability of the vhost-user is improved.
In order to solve the above problems, according to a first aspect of the present application, there is provided a proxy service-based vhostat-user reconnection method for a proxy service-based vhostat-user reconnection system including a virtual machine monitor and a vhostat-user backend, and a proxy service module connected between the virtual machine monitor and the vhostat-user backend; the vhost-user reconnection method comprises the following steps:
the proxy service module locally creates a Unix Domain Socket file, establishes the connection between the proxy service module and the back end of the vhost-user according to the Unix Domain Socket file, and establishes the connection between the virtual machine monitor and the proxy service module;
The proxy service module uses Unix Domain Socket file, receives the virtual machine instruction and returns the response data of the back end of the vhost-user according to the connection between the virtual machine monitor and the proxy service module and the connection between the proxy service module and the back end of the vhost-user;
the proxy service module creates a message queue locally, and when the connection between the proxy service module and the back end of the vhost-user is disconnected, the proxy service module automatically repairs the connection between the proxy service module and the back end of the vhost-user according to the vhost-user message recorded by the message queue.
Preferably, in the above-mentioned vhost-user reconnection method, the step of creating Unix Domain Socket files locally by the proxy service module, establishing connection between the proxy service module and the back end of the vhost-user according to Unix Domain Socket files, and establishing connection between the virtual machine monitor and the proxy service module includes:
the proxy service module imitates a Unix Domain Socket file at the back end of the vhost-user, and a Unix Domain Socket file with the same name is created locally;
when the virtual machine is started, triggering a proxy service module to monitor a proxy service process of the Unix Domain Socket file, and establishing connection between the proxy service module and the back end of the vhost-user;
the proxy service module uses Unix Domain Socket file to establish the connection between the proxy service module and the back end of the vhost-user.
Preferably, in the above method for reconnecting a vhost-user, the step of receiving a virtual machine instruction and returning response data of the vhost-user back end by using a Unix Domain Socket file by the proxy service module according to connection between the virtual machine monitor and the proxy service module and connection between the proxy service module and the vhost-user back end includes:
the proxy service module uses Unix Domain Socket file, receives the vhost-user control instruction sent by the virtual machine through the connection between the virtual machine monitor and the proxy service module;
the proxy service module is connected with the back end of the vhost-user through the proxy service module, and sends a vhost-user control instruction to a Unix Domain Socket file at the back end of the vhost-user;
the proxy service module receives response data of the back end of the vhost-user through the connection between the proxy service module and the back end of the vhost-user;
the proxy service module returns response data to the virtual machine through the connection of the virtual machine monitor and the proxy service module.
Preferably, in the above method for reconnecting a vhost-user, the proxy service module creates a message queue locally, and when the connection between the proxy service module and the back end of the vhost-user is disconnected, the proxy service module automatically repairs the connection with the back end of the vhost-user according to the vhost-user message recorded in the message queue, including:
The proxy service module locally creates a message queue, wherein the message queue is used for recording a vhost-user message at the back end of the vhost-user in real time;
the proxy service module monitors the connection state of the back end of the vhost-user by using Unix Domain Socket events;
when the connection state of the back end of the vhost-user is disconnected, the proxy service module detects the service recovery condition of the back end of the vhost-user in real time;
when the service of the back end of the vhost-user is recovered, the proxy service module establishes connection with the back end of the vhost-user;
the proxy service module sends the vhost-user message recorded by the message queue to the back end of the vhost-user according to the message replay technology;
and recovering the IO with the back end of the vhost-user by using the IO state recorded in the index memory in the proxy service module.
Preferably, in the above method for reconnecting a vhost-user, the proxy service module sends a vhost-user message recorded in the message queue to a back end of the vhost-user according to a message replay technique, so as to recover an IO with the back end of the vhost-user, including:
the proxy service module allocates incremental ids for the vhost-user messages cached in the message queue according to the time sequence;
and the proxy service module sends the vhost-user command in the vhost-user message to the vhost-user back end according to the incremental id.
Preferably, in the above method for reconnecting a vhost-user, after the step of automatically repairing the connection with the back end of the vhost-user by the proxy service module according to the vhost-user message recorded in the message queue, the method further includes:
when the proxy service module monitors that the virtual machine is restarted, the proxy service module cleans a vhost-user message cached in the message queue;
when the proxy service module adds the memory under the hot condition, if the virtual machine is detected to send the vhost-user back end reset message, the vhost-user back end reset message sent by the virtual machine is cleared.
According to a second aspect of the present application, the present application further provides a vhost-user reconnection system based on proxy service, including:
a virtual machine monitor and a vhost-user backend; the proxy service module is connected between the virtual machine monitor and the vhost-user back end; wherein,
the proxy service module is used for locally creating Unix Domain Socket files, establishing the connection between the proxy service module and the back end of the vhost-user according to Unix Domain Socket files, and establishing the connection between the virtual machine monitor and the proxy service module;
the proxy service module is also used for receiving a virtual machine instruction and returning response data of the back end of the vhost-user according to the connection between the virtual machine monitor and the proxy service module and the connection between the proxy service module and the back end of the vhost-user by using the Unix Domain Socket file;
The proxy service module is also used for locally creating a message queue;
and the proxy service module is also used for automatically repairing the connection with the back end of the vhost-user according to the vhost-user message recorded by the message queue when the connection between the proxy service module and the back end of the vhost-user is disconnected.
Preferably, in the above-mentioned vhost-user reconnection system, the proxy service module is specifically configured to emulate a Unix Domain Socket file at the back end of the vhost-user, and create a Unix Domain Socket file with the same name locally;
the proxy service module is specifically used for monitoring a proxy service process of the Unix Domain Socket file when the virtual machine is started, and establishing connection between the proxy service module and the back end of the vhost-user;
the proxy service module is specifically further configured to use the Unix Domain Socket file to establish a connection between the proxy service module and the back end of the vhost-user.
Preferably, in the above-mentioned vhost-user reconnection system, the proxy service module is specifically configured to use a Unix Domain Socket file, and receive a vhost-user control instruction sent by the virtual machine through connection between the virtual machine monitor and the proxy service module;
the proxy service module is specifically used for sending a vhost-user control instruction to a Unix Domain Socket file at the back end of the vhost-user through the connection between the proxy service module and the back end of the vhost-user;
The proxy service module is specifically used for receiving response data of the back end of the vhost-user through the connection between the proxy service module and the back end of the vhost-user;
the proxy service module is specifically further used for returning response data to the virtual machine through connection between the virtual machine monitor and the proxy service module.
Preferably, in the above-mentioned vhost-user reconnection system, the proxy service module is specifically configured to locally create a message queue, where the message queue is configured to record a vhost-user message at a back end of the vhost-user in real time;
the proxy service module is specifically configured to monitor a connection state of the vhost-user back end by using a Unix Domain Socket event, and detect a service recovery condition of the vhost-user back end when the connection state of the vhost-user back end is disconnected;
the proxy service module is specifically further configured to establish connection with the back end of the vhost-user when detecting service restoration of the back end of the vhost-user;
the proxy service module is specifically configured to send a vhost-user message recorded in the message queue to a vhost-user back end according to a message replay technology, and recover an IO state recorded in an index memory in the proxy service module and an IO of the vhost-user back end.
In summary, according to the proxy service-based vhost-user reconnection scheme provided by the above technical scheme, a proxy service module is connected between a virtual machine monitor and a vhost-user back end. A Unix Domain Socket file is created locally in the proxy service module, thus enabling the control plane proxy function. Specifically, the connection between the proxy service module and the vhost-user back end is established according to the Unix Domain Socket file, and the virtual machine monitor establishes connection with the proxy service module through the Unix Domain Socket file, so that the virtual machine manager is not required to control the virtual machine to directly connect with the vhost-user back end, even if the vhost-user back end has a problem, the virtual machine manager cannot detect the problem, and the invasiveness of the virtual machine manager is reduced. The proxy service module is only required to be connected with the back end of the vhost-user, so that the proxy service module can take over the state of the control plane to know, and the exception handling can be completed in the middle layer. According to the Unix Domain Socket file, according to the connection between the virtual machine monitor and the proxy service module and the connection between the proxy service module and the back end of the vhost-user, the connection and session between the virtual machine and the back end of the vhost-user can be realized, so that the proxy service module can receive a virtual machine instruction and send the virtual machine instruction to the back end of the vhost-user, and return response data of the back end of the vhost-user to the virtual machine. In addition, even if the vhost-user backend disconnects from the proxy service module, the virtual machine monitor cannot detect the disconnection because the virtual machine monitor is only connected to the proxy service module. In addition, because the proxy service module locally creates the message queue, the message queue records the vhost-user messages between the virtual machine and the vhost-user back end in real time, and the connection between the proxy service module and the vhost-user back end can be automatically repaired by storing the vhost-user messages, the traditional virtual machine manager is not required to be reconnected with the vhost-user back end, codes of virtual machine manager programs are not required to be modified, and virtual machine managers with different versions and different types are not required to be maintained. In addition, as the virtual machine manager does not need to be modified, reconnection operation can be completed through an independent process space, various state management in the virtual machine manager is simplified, only the service logic of the proxy service is required to be concerned, and the proxy service can be updated more conveniently. In summary, the technical scheme provided by the application can solve the problems that version type is not adapted and reconnection is not stably supported due to reconnection of a virtual machine manager link in the prior art.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained from the structures shown in these drawings without inventive effort to a person of ordinary skill in the art.
Fig. 1 is a flow chart of a proxy service-based vhost-user reconnection method according to an embodiment of the present application;
FIG. 2 is a flow chart of a method for establishing connection between a virtual machine and a proxy service module and between the proxy service module and a vhost-user back end according to the embodiment shown in FIG. 1;
FIG. 3 is a flow chart of a method for receiving virtual machine instructions and returning response data according to the embodiment shown in FIG. 1;
FIG. 4 is a flow chart of a method for automatically repairing a connection at the back end of a vhost-user according to the embodiment shown in FIG. 1;
FIG. 5 is a flow diagram of a method for messaging by a message playback technique provided by the embodiment of FIG. 4;
FIG. 6 is a flow chart of a message cleaning method of a proxy service module according to the embodiment shown in FIG. 1;
FIG. 7 is a flow chart of a method for controlling a proxy plane provided by the embodiment of FIG. 1;
FIG. 8 is a flow chart of a method for automatic connection repair provided by the embodiment of FIG. 1;
fig. 9 is a schematic structural diagram of a vhost-user reconnection system based on proxy service according to an embodiment of the present application.
The realization, functional characteristics and advantages of the present application will be further described with reference to the embodiments, referring to the attached drawings.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The technical scheme in the prior art has the following technical problems:
to realize reconnection of the virtual machine and the vhost-user back end, the common practice is to find out disconnection on the virtual machine manager, actively connect the vhost-user back end, and reestablish the whole vhost-user link after connection is successful. The current various virtual machine managers cannot perfectly support the problem of reconnection disconnection of the back end of the vhost-user. If the virtual machine manager needs to support the vhost-user reconnection, a complete set of connection reestablishing steps are needed, including initializing virtual devices, memory sharing, multi-queues, and the like. The above described cumbersome steps result in the drawbacks of existing virtual machine managers to implement reconnections as follows: (1) a virtual machine manager that needs to be adapted to different versions; (2) different types of virtual machine managers need to be adapted; (3) The function of the virtual machine manager is complex, and as an infrastructure, it is difficult to obtain a stable virtual machine manager supporting reconnections.
In order to solve the problems in the prior art, the following embodiments of the present application provide a virtual host-user reconnection scheme based on proxy service, which aims to solve the problems caused by reconnection of the virtual machine manager to the back end of the virtual host-user. The scheme can realize reconnection recovery of the back end of the vhost-user and the virtual machine under the condition that the virtual machine manager does not sense based on the message replay technology. The advantage of this scheme is: the various virtual machine manager products and different versions do not need additional processing, and the automatic reconnection of the vhost-user can be obtained without perception, so that the usability of the vhost-user is improved.
In order to achieve the above objective, referring to fig. 1, fig. 1 is a schematic flow chart of a proxy service-based vhost-user reconnection method according to an embodiment of the present application. As shown in fig. 1, the proxy service-based vhostat-user reconnection method is used in the proxy service-based vhostat-user reconnection system shown in fig. 9, and the proxy service-based vhostat-user reconnection system includes a virtual machine monitor and a vhostat-user back end, and a proxy service module connected between the virtual machine monitor and the vhostat-user back end. As shown in fig. 1, the vhost-user reconnection method includes:
s110: the proxy service module creates Unix Domain Socket files locally, establishes the connection of the proxy service module and the back end of the vhost-user according to Unix Domain Socket files, and establishes the connection of the virtual machine monitor and the proxy service module.
The embodiment of the application takes over the traditional control plane by adding a proxy service, so that the control command is firstly sent to the proxy service and then is cached by the Unix Domain Socket file created by the proxy service, and the management and control of a virtual machine manager are not needed.
Specifically, as a preferred embodiment, as shown in fig. 2, in the above-mentioned vhost-user reconnection method, step S110: the step of creating Unix Domain Socket file locally by the proxy service module, establishing connection between the proxy service module and the vhost-user back end according to Unix Domain Socket file, and establishing connection between the virtual machine monitor and the proxy service module, includes:
s111: the proxy service module imitates a Unix Domain Socket file at the back end of the vhost-user, and a Unix Domain Socket file with the same name is created locally;
s112: when the virtual machine is started, triggering a proxy service module to monitor a proxy service process of the Unix Domain Socket file, and establishing connection between the proxy service module and the back end of the vhost-user;
s113: the proxy service module uses Unix Domain Socket file to establish the connection between the proxy service module and the back end of the vhost-user.
According to the technical scheme provided by the embodiment of the application, the proxy service imitates the Unix Domain Socket file of the back end of the vhost-user to locally create a new Unix Domain Socket file in the proxy service module, so that the virtual machine monitor only needs to connect the Unix Domain Socket file, the proxy service module can connect the Unix Domain Socket file prepared by the back end of the vhost-user by itself, and communication among the virtual machine, the proxy service module and the back end of the vhost-user is completed. The message flow is: the virtual machine sends the message to the Unix Domain Socket file newly created by the proxy service module, the proxy service listens for the message, parses the message, and forwards it to the vhost-user back end ready Unix Domain Socket, and vice versa.
The method for reconnecting a virtual machine monitor to a proxy service module based on a proxy service provided in the embodiment shown in fig. 1 further includes, after establishing a connection between the proxy service module and a back end of the virtual machine monitor,:
s120: and the proxy service module receives a virtual machine instruction and returns response data of the back end of the vhost-user according to the connection of the virtual machine monitor and the proxy service module and the connection of the proxy service module and the back end of the vhost-user by using the Unix Domain Socket file. In general, through connection between the virtual machine and the proxy service module, the virtual machine sends a vhest user control command to a Unix Domain Socket file of the proxy service module, and then the proxy service module receives a data packet and analyzes a virtual machine instruction; and then, according to the connection between the proxy service module and the vhost-user back end, sending the analyzed virtual machine instruction to the vhost-user back end. And in turn, the proxy service receives the response data fed back by the back end of the vhost-user and forwards the response data to the virtual machine.
Specifically, as a preferred embodiment, as shown in fig. 3, in the above-mentioned vhost-user reconnection method, step S120: the proxy service module uses Unix Domain Socket file, and according to the connection between the virtual machine monitor and the proxy service module and the connection between the proxy service module and the back end of the vhost-user, the steps of receiving the virtual machine instruction and returning the response data of the back end of the vhost-user include:
S121: the proxy service module uses Unix Domain Socket file, receives the vhost-user control instruction sent by the virtual machine through the connection between the virtual machine monitor and the proxy service module; because the Unix Domain Socket file is built by emulating the Unix Domain Socket file of the back end of the vhost-user, the name is the same as the content, and therefore, the virtual machine can be "spoofed" instead of the file of the back end of the vhost-user, so that the connection between the virtual machine and the proxy service module is established.
S122: the proxy service module is connected with the back end of the vhost-user through the proxy service module, and sends a vhost-user control instruction to a Unix Domain Socket file at the back end of the vhost-user; after receiving the data packet of the virtual machine command, the proxy service module sends the virtual machine command to the back end of the vhost-user through the connection between the proxy service module and the back end of the vhost-user. Because the Unix Domain Socket file with the same name exists between the proxy service module and the vhost-user back end, it is easy to send messages to the vhost-user back end and receive responses from the vhost-user back end.
S123: the proxy service module receives response data of the back end of the vhost-user through the connection between the proxy service module and the back end of the vhost-user;
S124: the proxy service module returns response data to the virtual machine through the connection of the virtual machine monitor and the proxy service module.
According to the technical scheme provided by the embodiment of the application, after the connection between the virtual machine and the proxy service module is established and the connection between the proxy service module and the back end of the vhost-user is established, the proxy service forwards the communication between the virtual machine and the back end of the vhost-user through the connection, so that the management of a virtual machine manager is not needed. The specific communication flow is as follows: the virtual machine sends a message to a Unix Domain Socket file newly created by the proxy service module, the proxy service module monitors the message, analyzes the message and forwards the message to Unix Domain Socket prepared at the back end of the vhost-user; and vice versa. Because the proxy service module exists as a middle tier proxy, the vhost-user connection can be implemented without modifying the code of the virtual machine manager program. Thus, an extra middle layer is added outside the virtual machine manager, and the state control of the control plane is taken over, so that the exception handling can be completed in the middle layer.
In addition, in general, for reconnection between the back end of the VHOST-USER and the virtual machine, the virtual machine manager needs to send vhost_user_set_index_fd to send the shared memory information recorded by itself to the back end of the VHOST-USER, so that creation and sharing of the message queue are completed. However, the reconnection of the virtual machine manager is realized by the method and the device, which have the problems that different versions and different types of virtual machine managers need to be adapted, and the virtual machine manager is not enough to stably support the reconnection.
To solve the above problem, the proxy service module listens to the connection health status of the vhost-user backend through Unix Domain Socket events. Once a connection anomaly occurs at the back end of the vhost-user, the connection repair process is triggered immediately. The process does not need participation of a virtual machine manager, and only needs the proxy service module to repair the connection. Specifically, the method for connecting a vhost-user according to the embodiment shown in fig. 1 further includes, after establishing a connection and sending a message:
s130: the proxy service module creates a message queue locally, and when the connection between the proxy service module and the back end of the vhost-user is disconnected, the proxy service module automatically repairs the connection between the proxy service module and the back end of the vhost-user according to the vhost-user message recorded by the message queue.
In the embodiment of the application, a message queue is created in the proxy service module and is used for recording various received vhost-user messages, wherein the messages are essential contents for recovering the back-end connection.
Specifically, as a preferred embodiment, as shown in fig. 4, step S130 described above: the proxy service module creates a message queue locally, when the connection between the proxy service module and the back end of the vhost-user is disconnected, the proxy service module automatically repairs the connection between the proxy service module and the back end of the vhost-user according to the vhost-user message recorded in the message queue, and the method comprises the following steps:
S131: the proxy service module locally creates a message queue, and the message queue is used for recording the vhost-user message at the back end of the vhost-user in real time.
S132: the proxy service module monitors the connection state of the vhost-user back end using Unix Domain Socket events. The Unix Domain Socket event, namely the event that the virtual machine described in Unix Domain Socket interacts with the vhostat-user backend, thus using the Unix Domain Socket event can monitor the connection state of the vhostat-user backend. Thus, once the abnormal connection occurs, the connection repair process is triggered immediately.
S133: when the connection state of the back end of the vhost-user is disconnected, the proxy service module detects the service recovery condition of the back end of the vhost-user in real time. After the connection between the vhost-user back end and the proxy service module is disconnected, the proxy service module can periodically detect whether the vhost-user back end resumes service, which can be detected by the Unix Domain Socket event above. When the service of the back end of the vhost-user is restored, the proxy service module can be used for establishing connection with the back end of the vhost-user.
S134: when the service of the vhost-user back end is restored, the proxy service module establishes a connection with the vhost-user back end. When reconnection and connection automatic repair are carried out, the VHOST_USER_GET_INFLIGHT_FD which is required to be sent by the original virtual machine manager does not need to be sent again, because the proxy service module has recorded information of an index memory, including information of an address, a length, a file descriptor and the like, and only needs to send the information in the index memory to the back end of the VHOST-USER to inform the IO state of the information, the sharing of the information in the index memory between the two modules can be established, and therefore IO when the last VHOST-USER back end stops service is recovered.
S135: and the proxy service module sends the vhost-user message recorded in the message queue to the back end of the vhost-user according to the message replay technology, and the IO state recorded in the internal index memory of the proxy service module is used for recovering the IO of the proxy service module and the back end of the vhost-user.
The vhost-user technique relies on a block of memory that opens up in the back-end of the vhost-user to record the state of the ongoing io, which we call the block of memory an index memory. This vhost-user message is very important for the integrity of the IO after connection recovery. The two messages, VHOST_USER_GET_INFLIGHT_FD and VHOST_USER_SET_INFLIGHT_FD, are used for creation and transmission of an index memory. The Inflight memory at the back end of the vhost-user is used to record ongoing IO states that are important for IO integrity after connection recovery. Therefore, the message queue is locally created in the proxy service module, so that the memory of the back end of the vhost-user sent by the virtual machine can be simulated, and the vhost-user message, namely IO state information on the inclusion, is recorded. And recovering the connection of the back end of the vhost-user and the IO integrity of the back end of the vhost-user through the local IO message of the proxy service module.
The automatic restoration of the connection between the proxy service module and the vhost-user back end relies on the message replay technology, and the cached messages are sent to the vhost-user back end to establish connection, so that the sequence of the messages is very important, and the recording of the sequence of the messages can be realized by allocating incremental ids.
Specifically, as a preferred embodiment, as shown in fig. 5, the step of the proxy service module sending the vhost-user message recorded in the message queue to the vhost-user backend according to the message replay technology includes:
s1351: the proxy service module allocates incremental ids for the vhost-user messages cached in the message queue according to the time sequence;
s1352: and the proxy service module sends the vhost-user command in the vhost-user message to the vhost-user back end according to the incremental id.
According to the technical scheme provided by the embodiment of the application, automatic restoration of the connection depends on a message replay technology, and the message replay technology can send the cached message to the back end to establish the connection. Here, the sequence of the messages is very important, so that the recording of the message sequence is achieved by assigning incremental ids. Furthermore, the proxy service module needs to record that there is a request which is not yet sent to the front end, and when the virtual machine performs a hot restart operation, a new vhost-user command is sent to the vhost-user back end, and these messages need to be cleaned up, otherwise, the message amount will be very large, which is unfavorable for the quick recovery of the connection.
In summary, by introducing the intermediate layer between the virtual machine and the vhost-user back end, the technical scheme provided by the embodiment of the application can realize reconnection of the vhost-user without modifying the program code of the virtual machine manager, and exception handling can be completed in the intermediate layer, so that the invasiveness of the virtual machine manager is low, and meanwhile, since reconnection operation is completed in the intermediate layer, the virtual machine manager program is not required to be modified, and the virtual machine manager is transparent for different versions of maintenance and different types of virtual machine managers, and can be seamlessly accessed into the big vhost-user back end, so that the adaptability is strong. And finally, as the virtual machine manager is not required to be modified, the whole operation is completed in an independent process space, the state management of the virtual machine manager is simplified, and the virtual machine manager is more stable and reliable. When reconnection and connection automatic repair are carried out, the VHOST_USER_GET_INFLIGHT_FD does not need to be sent again, because the agent program of the agent service module records the IO information of the index memory, including the address, the length, the file descriptor and the like, and only needs to be sent to the back end of the VHOST-USER to inform the back end of the memory information, so that sharing can be established, and IO when the VHOST-USER stops service last time is restored.
In addition, to avoid caching too many messages, message cleaning is required according to some policies. Specifically, as a preferred embodiment, as shown in fig. 6, in the above-mentioned vhost-user reconnection method, step S135: after the step that the proxy service module automatically repairs the connection with the back end of the vhost-user according to the vhost-user message recorded in the message queue, the method further comprises:
s140: when the proxy service module monitors the restarting of the virtual machine, the proxy service module cleans up the historical vhost-user message cached in the message queue;
s150: when the proxy service module adds the memory under the hot condition, if the virtual machine is detected to send the vhost-user back end reset message, the vhost-user back end reset message sent by the virtual machine is cleared.
According to the technical scheme provided by the embodiment of the application, the message cleaning is performed through two strategies, namely, old messages before cleaning when the virtual machine is restarted and triggering the virtual machine cleaning history messages when the memory is added. Specifically, the old message before the virtual machine is cleaned up when the virtual machine is restarted, because the vhost-user connection is reinitialized after the virtual machine is restarted, and the new message is enough for reconstructing the abnormal link; the hot-add of memory triggers the virtual machine to send a vhostusesetmem TABLE message, which is only useful if the latest vhostusesetmem TABLE message is representative of the past moment, which can be cleared.
In summary, in the method for reconnecting a virtual host-user based on proxy service provided in the embodiments of the present application, a proxy service module is connected between a virtual machine monitor and a back end of the virtual host-user. A Unix Domain Socket file is created locally in the proxy service module, thus enabling the control plane proxy function. Specifically, the connection between the proxy service module and the vhost-user back end is established according to the Unix Domain Socket file, and the virtual machine monitor establishes connection with the proxy service module through the Unix Domain Socket file, so that the virtual machine manager is not required to control the virtual machine to directly connect with the vhost-user back end, even if the vhost-user back end has a problem, the virtual machine manager cannot detect the problem, and the invasiveness of the virtual machine manager is reduced. The proxy service module is only required to be connected with the back end of the vhost-user, so that the proxy service module can take over the state of the control plane to know, and the exception handling can be completed in the middle layer. According to the Unix Domain Socket file, according to the connection between the virtual machine monitor and the proxy service module and the connection between the proxy service module and the back end of the vhost-user, the connection and session between the virtual machine and the back end of the vhost-user can be realized, so that the proxy service module receives a virtual machine instruction and sends the virtual machine instruction to the back end of the vhost-user, and response data of the back end of the vhost-user is returned to the virtual machine. In addition, even if the vhost-user backend disconnects from the proxy service module, the virtual machine monitor cannot detect the disconnection because the virtual machine monitor is only connected to the proxy service module. In addition, because the proxy service module locally creates the message queue, the message queue records the vhost-user messages between the virtual machine and the vhost-user back end in real time, and the connection between the proxy service module and the vhost-user back end can be automatically repaired by storing the vhost-user messages, the traditional virtual machine manager is not required to be reconnected with the vhost-user back end, codes of virtual machine manager programs are not required to be modified, and virtual machine managers with different versions and different types are not required to be maintained. In addition, as the virtual machine manager does not need to be modified, reconnection operation can be completed through an independent process space, various state management in the virtual machine manager is simplified, only the service logic of the proxy service is required to be concerned, and the proxy service can be updated more conveniently. In summary, the technical scheme provided by the application can solve the problems that version type is not adapted and reconnection is not stably supported due to reconnection of a virtual machine manager link in the prior art.
In addition, as a preferred embodiment, the embodiment of the present application further provides a method for a control plane proxy, as shown in fig. 7, where the method for a control plane proxy includes:
s201: the virtual machine is started.
S202: proxy service initiation: when the virtual machine is started, the proxy service is triggered to be started, and each virtual machine instance corresponds to one proxy service process.
S203: monitoring SOCKET, and connecting the rear end of the VHOST USER; the proxy service listens to the local Unix Domain Socket file and then actively connects to the VHOST USER backend process.
S204: the virtual machine connects Unix Domain Socket file of the proxy service module and establishes connection with the proxy program.
S205: the proxy service caches the message sent by the virtual machine and forwards the message to the vhost-user back end. The virtual machine sends a VHOST USER control command to SOCKET (namely Unix Domain Socket files of the proxy service module), the proxy service receives the data packet, analyzes the command, caches the command in the memory of the proxy service module, and forwards the command to Unix Domain Socket files at the rear end of the VHOST USER.
S206: the proxy service receives the response replied by the VHOST USER back end and forwards the response to the virtual machine.
S207: judging whether the establishment of the SESSION is completed: and specifically judging whether the establishment of the SESSION from the virtual machine to the back end of the vhost-user is completed. If yes, go to step S208; if not, the process returns to step S205.
S208: and confirming that the connection is successful.
In addition, as a preferred embodiment, the embodiment of the present application further provides a method for automatically repairing a connection, as shown in fig. 8, where the method for automatically repairing a connection includes:
s301: the proxy service detects that the vhost-user backend disconnects the socks connection.
S302: the agent program regularly detects whether the back end of the vhost-user is restored to service or not and judges whether the back end of the vhost-user is restored or not. If yes, go to step S303; if not, detecting whether the back end of the vhost-user resumes service again at intervals of preset time.
S303: when the vhost-user backend is restored, the proxy service establishes a connection with the vhost-user backend.
S304: the proxy server replays the previously cached message to the vhost-user backend, establishing a connection. The cached message includes a vhost-user control command message.
S305: the front end does not feel in the whole recovery process, the connection between the agent program and the Unix Domain Socket of the virtual machine is kept unchanged, and the control command sent by the virtual machine is continuously received.
S306: connection recovery, IO recovery.
According to the technical scheme provided by the embodiment of the application, after the proxy service program of the proxy service module is provided, even if the back end of the vhost-user is restarted, the virtual machine manager does not sense what faults occur at the back end, so that the connection reconstruction can be completed through the proxy service replay of the cached information under the condition that the virtual machine manager does not sense.
In addition, based on the same concept of the above method embodiment, the present application embodiment further provides a vhost-user reconnection system based on proxy service, which is used for implementing the above method of the present application, and because the principle of solving the problem in the system embodiment is similar to that of the method, the system embodiment has at least all the beneficial effects brought by the technical solution of the above embodiment, which are not described in detail herein.
In addition, as a preferred embodiment, it is known to combine the proxy-based vhost-user reconnection system shown in fig. 9:
fig. 9 is a schematic diagram of a vhost-user reconnection according to an embodiment of the present application, where dark arrows represent a flow of a control plane and light arrows represent a flow of a data plane. The data is mapped from the virtual machine monitor 100 to the VHOST USER backend process by way of shared memory. In the following figures, the virtual machine monitor 100 includes two kinds of virtualized devices, i.e., a vhost-user-blk and a vhost-user-scsi, and is compatible with other devices, i.e., a vhost-user-gpu and a vhost-user-net.
The present embodiment takes over the control plane by adding a proxy service module 200. The control commands depicted in fig. 9 are first sent to the proxy service module 200 and then cached by the proxy service module 200. When the back-end needs to be reconnected after the vhost-user back-end 300 is abnormal, the cached message is replayed to the vhost-user back-end 300 by the agent of the agent service module 200. The shared memory mechanism on the data plane in fig. 9 is a feature of the vhost-user technique itself, and the new agent is the most central point of the present application as the control plane. The problem of reconnection is solved by adding the proxy service layer, so that the virtual machine manager is not required to be responsible for reconnection of the virtual machine and the vhost-user back end 300, and the virtual machine manager is directly bypassed.
Referring specifically to fig. 9, fig. 9 is a schematic structural diagram of a vhost-user reconnection system based on proxy service according to an embodiment of the present application. As shown in fig. 9, the vhost-user reconnection system includes:
a virtual machine monitor 100 and a vhost-user backend 300; and
a proxy service module 200 connected between the virtual machine monitor 100 and the vhost-user backend 300; wherein,
the proxy service module 200 is configured to create a Unix Domain Socket file locally, establish a connection between the proxy service module 200 and the vhost-user backend 300 according to the Unix Domain Socket file, and establish a connection between the virtual machine monitor 100 and the proxy service module 200;
the proxy service module 200 is further configured to receive a virtual machine instruction and return response data of the vhost-user back end 300 according to the connection between the virtual machine monitor 100 and the proxy service module 200 and the connection between the proxy service module 200 and the vhost-user back end 300 by using the Unix Domain Socket file;
the proxy service module 200 is further configured to create a message queue locally;
the proxy service module 200 is further configured to automatically repair the connection with the vhost-user backend 300 according to the vhost-user message recorded in the message queue when the connection between the proxy service module 200 and the vhost-user backend 300 is disconnected.
Preferably, in the above-mentioned vhost-user reconnection system, the proxy service module 200 is specifically configured to emulate the Unix Domain Socket file of the vhost-user backend 300, and create a Unix Domain Socket file with the same name locally;
the proxy service module 200 is specifically further configured to monitor a proxy service process of the Unix Domain Socket file when the virtual machine is started, and establish a connection between the proxy service module 200 and the vhost-user back end 300;
the proxy service module 200 is specifically further configured to use the Unix Domain Socket file to establish a connection between the proxy service module 200 and the vhost-user backend 300.
Preferably, in the above-mentioned vhost-user reconnection system, the proxy service module 200 is specifically configured to receive a vhost-user control instruction sent by a virtual machine by using a Unix Domain Socket file and connecting the virtual machine monitor 100 with the proxy service module 200;
the proxy service module 200 is specifically further configured to send a vhost-user control instruction to a Unix Domain Socket file of the vhost-user backend 300 through connection between the proxy service module 200 and the vhost-user backend 300;
the proxy service module 200 is specifically further configured to receive response data of the vhost-user backend 300 through connection between the proxy service module 200 and the vhost-user backend 300;
The proxy service module 200 is specifically further configured to return response data to the virtual machine through the connection between the virtual machine monitor 100 and the proxy service module 200.
Preferably, in the above-mentioned vhost-user reconnection system, the proxy service module 200 is specifically configured to create a message queue locally, where the message queue is configured to record the vhost-user message of the vhost-user backend 300 in real time;
the proxy service module 200 is specifically further configured to monitor a connection state of the vhost-user backend 300 by using a Unix Domain Socket event, and detect a service recovery condition of the vhost-user backend 300 when the connection state of the vhost-user backend 300 is disconnected;
the proxy service module 200 is specifically further configured to establish a connection with the vhost-user backend 300 when detecting service restoration of the vhost-user backend 300;
the proxy service module 200 is specifically further configured to send the vhost-user message recorded in the message queue to the vhost-user backend 300 according to the message replay technology, and restore the IO with the vhost-user backend 300 through the IO state cached in the info memory.
In summary, compared with the prior art, the technical scheme of the application has the following obvious advantages:
low invasiveness: invasive means that the code of the virtual machine manager program needs to be modified in order to implement the reconnection of the vhost-user, while modifying the infrastructure core code means that new problems may be introduced. According to the technical scheme of the embodiment, the state control of the control plane is managed by adding an extra middle layer (namely the proxy service module) outside the virtual machine manager, so that the exception handling can be completed in the middle layer.
The adaptability is strong: because reconnection operation is completed in the middle layer, front-end reconnection of the vhost-user can be completed without modifying a virtualization manager program, which is transparent to maintenance of different versions of virtual machines and different types of virtual machine manager products, can be seamlessly accessed to the back end of the vhost-user, and immediately has the necessary capability of reconnecting the enterprise deployment.
Stable and reliable: the method is stable and reliable, does not need to modify a virtual machine manager, and completes the whole operation in an independent process space. This process simplifies the steps of handling various state management within the virtual machine manager, requires only the business logic of the proxy service itself to be concerned, and enables more convenient updating of the proxy service. Meanwhile, the error processing of the vhost-user is perfected by introducing the middle layer, so that the vhost-user is more robust, and a strong step is provided for the enterprise deployment of the accelerating scheme of the vhost-user.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, and optical storage, etc.) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second and third, et cetera do not indicate any ordering. These words may be interpreted as names.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (10)

1. The method is characterized by comprising a virtual machine monitor, a virtual host-user back end and a proxy service module connected between the virtual machine monitor and the virtual host-user back end; the vhost-user reconnection method comprises the following steps:
the proxy service module locally creates a Unix Domain Socket file, establishes connection between the proxy service module and the back end of the vhost-user according to the Unix Domain Socket file, and establishes connection between the virtual machine monitor and the proxy service module;
The proxy service module receives a virtual machine instruction and returns response data of the back end of the vhost-user according to the connection of the virtual machine monitor and the proxy service module and the connection of the proxy service module and the back end of the vhost-user by using the Unix Domain Socket file;
and the proxy service module locally creates a message queue, and when the connection between the proxy service module and the back end of the vhost-user is disconnected, the proxy service module automatically repairs the connection between the proxy service module and the back end of the vhost-user according to the vhost-user message recorded by the message queue.
2. The vhost-user reconnection method according to claim 1, wherein the step of the proxy service module creating a Unix Domain Socket file locally, establishing a connection between the proxy service module and a vhost-user backend according to the Unix Domain Socket file, and establishing a connection between the virtual machine monitor and the proxy service module comprises:
the proxy service module imitates a Unix Domain Socket file at the back end of the vhost-user, and a Unix Domain Socket file with the same name is created locally;
when the virtual machine is started, triggering the proxy service module to monitor the proxy service process of the Unix Domain Socket file, and establishing the connection between the proxy service module and the back end of the vhost-user;
And the proxy service module establishes connection between the proxy service module and the back end of the vhost-user by using the Unix Domain Socket file.
3. The method for connecting a vhost-user according to claim 1 or 2, wherein the step of receiving a virtual machine instruction and returning response data of the vhost-user back end by the proxy service module according to the connection of the virtual machine monitor to the proxy service module and the connection of the proxy service module to the vhost-user back end by using the Unix Domain Socket file includes:
the proxy service module uses the Unix Domain Socket file to receive a vhost-user control instruction sent by a virtual machine through the connection between the virtual machine monitor and the proxy service module;
the proxy service module is connected with the back end of the vhost-user through the proxy service module, and sends the vhost-user control instruction to a Unix Domain Socket file at the back end of the vhost-user;
the proxy service module receives response data of the back end of the vhost-user through the connection between the proxy service module and the back end of the vhost-user;
and the proxy service module returns the response data to the virtual machine through the connection between the virtual machine monitor and the proxy service module.
4. The vhost-user reconnection method according to claim 1, wherein the proxy service module creates a message queue locally, and when the proxy service module disconnects from the vhost-user back end, the proxy service module automatically repairs the connection to the vhost-user back end according to the vhost-user message recorded in the message queue, including:
the proxy service module locally creates a message queue, wherein the message queue is used for recording the vhost-user message at the back end of the vhost-user in real time;
the proxy service module monitors the connection state of the back end of the vhost-user by using Unix Domain Socket events;
when the connection state of the back end of the vhost-user is disconnected, the proxy service module detects the service recovery condition of the back end of the vhost-user in real time;
when the service of the back end of the vhost-user is recovered, the proxy service module establishes connection with the back end of the vhost-user;
the proxy service module sends the vhost-user message recorded by the message queue to the back end of the vhost-user according to a message replay technology;
and recovering the IO with the back end of the vhost-user by using the IO state recorded in the index memory in the proxy service module.
5. The method for connecting a vhost-user according to claim 4, wherein the step of the proxy service module sending the vhost-user message recorded in the message queue to the back end of the vhost-user according to a message replay technique includes:
the proxy service module allocates incremental ids for the vhost-user messages cached in the message queue according to the time sequence;
and the proxy service module sends a vhost-user command in the vhost-user message to the back end of the vhost-user according to the incremental id.
6. The method for connecting a vhost-user according to claim 1, wherein after the step of automatically repairing the connection with the vhost-user back end by the proxy service module according to the vhost-user message recorded in the message queue, the method further comprises:
when the proxy service module monitors that the virtual machine is restarted, the proxy service module cleans the vhost-user message cached in the message queue;
and when the proxy service module adds the memory under the hot condition, if the virtual machine is detected to send the back-end reset message of the vhost-user, the back-end reset message of the vhost-user sent by the virtual machine is cleared.
7. A proxy service-based vhost-user reconnection system comprising:
A virtual machine monitor and a vhost-user backend; and
the proxy service module is connected between the virtual machine monitor and the vhost-user back end; wherein,
the proxy service module is used for locally creating a Unix Domain Socket file, establishing the connection between the proxy service module and the back end of the vhost-user according to the Unix Domain Socket file, and establishing the connection between the virtual machine monitor and the proxy service module;
the proxy service module is further configured to receive a virtual machine instruction and return response data of the back end of the vhost-user according to the connection between the virtual machine monitor and the proxy service module and the connection between the proxy service module and the back end of the vhost-user by using the Unix Domain Socket file;
the proxy service module is also used for locally creating a message queue;
the proxy service module is further configured to automatically repair connection with the back end of the vhost-user according to the vhost-user message recorded in the message queue when the connection between the proxy service module and the back end of the vhost-user is disconnected.
8. The vhost-user reconnection system according to claim 7, wherein the proxy service module is specifically configured to locally create a Unix Domain Socket file with the same name by emulating a Unix Domain Socket file at the back end of the vhost-user;
The proxy service module is specifically configured to monitor a proxy service process of the Unix Domain Socket file when the virtual machine is started, and establish connection between the proxy service module and the back end of the vhost-user;
the proxy service module is specifically further configured to establish a connection between the proxy service module and the vhost-user back end by using the Unix Domain Socket file.
9. The vhost-user reconnection system according to claim 7 or 8, wherein the proxy service module is specifically configured to receive a vhost-user control instruction sent by a virtual machine through connection between the virtual machine monitor and the proxy service module by using the Unix Domain Socket file;
the proxy service module is specifically configured to send the vhost-user control instruction to a Unix Domain Socket file at the back end of the vhost-user through connection between the proxy service module and the back end of the vhost-user;
the proxy service module is specifically configured to receive response data of the back end of the vhost-user through connection between the proxy service module and the back end of the vhost-user;
the proxy service module is specifically further configured to return the response data to the virtual machine through connection between the virtual machine monitor and the proxy service module.
10. The vhost-user reconnection system according to claim 7, wherein the proxy service module is specifically configured to create a message queue locally, where the message queue is configured to record a vhost-user message at a back end of the vhost-user in real time;
the proxy service module is specifically configured to monitor a connection state of the vhost-user back end by using a Unix Domain Socket event, and detect a service recovery condition of the vhost-user back end when the connection state of the vhost-user back end is disconnected;
the proxy service module is specifically further configured to establish connection with the vhost-user back end when detecting service restoration of the vhost-user back end;
the proxy service module is specifically configured to send a vhost-user message recorded in the message queue to the vhost-user back end according to a message replay technology, and recover an IO with the vhost-user back end by using an IO state recorded in an infflight memory in the proxy service module.
CN202311702336.8A 2023-12-12 2023-12-12 Agent service-based vhost-user reconnection method and system Pending CN117640747A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311702336.8A CN117640747A (en) 2023-12-12 2023-12-12 Agent service-based vhost-user reconnection method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311702336.8A CN117640747A (en) 2023-12-12 2023-12-12 Agent service-based vhost-user reconnection method and system

Publications (1)

Publication Number Publication Date
CN117640747A true CN117640747A (en) 2024-03-01

Family

ID=90035597

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311702336.8A Pending CN117640747A (en) 2023-12-12 2023-12-12 Agent service-based vhost-user reconnection method and system

Country Status (1)

Country Link
CN (1) CN117640747A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110153716A1 (en) * 2009-12-21 2011-06-23 Microsoft Corporation Enabling virtual desktop connections to remote clients
CN104580531A (en) * 2015-02-05 2015-04-29 湖南合天智汇信息技术有限公司 Web remote desktop access control method based on WebSocket agency
US20150293773A1 (en) * 2012-11-14 2015-10-15 Hangzhou H3C Technologies Co., Ltd. Virtual machines
CN105378659A (en) * 2013-06-14 2016-03-02 托加里奥有限责任公司 Method and system for enabling access of client device to remote desktop
CN108183871A (en) * 2017-11-23 2018-06-19 北京三快在线科技有限公司 A kind of virtual switch, virtual switch start method, electronic equipment
CN114675930A (en) * 2022-03-17 2022-06-28 北京天地和兴科技有限公司 Host computer simulation communication instrument

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110153716A1 (en) * 2009-12-21 2011-06-23 Microsoft Corporation Enabling virtual desktop connections to remote clients
US20150293773A1 (en) * 2012-11-14 2015-10-15 Hangzhou H3C Technologies Co., Ltd. Virtual machines
CN105378659A (en) * 2013-06-14 2016-03-02 托加里奥有限责任公司 Method and system for enabling access of client device to remote desktop
CN104580531A (en) * 2015-02-05 2015-04-29 湖南合天智汇信息技术有限公司 Web remote desktop access control method based on WebSocket agency
CN108183871A (en) * 2017-11-23 2018-06-19 北京三快在线科技有限公司 A kind of virtual switch, virtual switch start method, electronic equipment
CN114675930A (en) * 2022-03-17 2022-06-28 北京天地和兴科技有限公司 Host computer simulation communication instrument

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
任琰杰;张越;张岩;郭小静;孙海英;: "基于Docker容器的桌面即服务(DaaS)管理系统架构设计", 教育教学论坛, no. 38, 16 September 2020 (2020-09-16) *

Similar Documents

Publication Publication Date Title
CN106911524B (en) HA implementation method and device
CN102708018B (en) Method and system for exception handling, proxy equipment and control device
US9189348B2 (en) High availability database management system and database management method using same
CN102171995B (en) Method for processing packet when server fails and router thereof
US20120174112A1 (en) Application resource switchover systems and methods
CN110807064B (en) Data recovery device in RAC distributed database cluster system
JP7116802B2 (en) Master/standby container system switching
US20080005288A1 (en) Storage system and data replication method
JPH0619743B2 (en) Storing method, control method, and storage device for application session in computer network
CN102394914A (en) Cluster brain-split processing method and device
US10229010B2 (en) Methods for preserving state across a failure and devices thereof
CN112380062A (en) Method and system for rapidly recovering system for multiple times based on system backup point
US7228352B1 (en) Data access management system in distributed processing system
CN105426213A (en) Software update method and system
JP2017097408A (en) Information processing device and program update control method
CN104503861A (en) Abnormality handling method and system, agency device and control device
JPH08212095A (en) Client server control system
CN111342986B (en) Distributed node management method and device, distributed system and storage medium
CN111756826B (en) Lock information transmission method of DLM and related device
CN111880947B (en) Data transmission method and device
CN105323271B (en) Cloud computing system and processing method and device thereof
JP2023505879A (en) Distributed database system and data disaster backup training method
CN117640747A (en) Agent service-based vhost-user reconnection method and system
JP5387767B2 (en) Update technology for running programs
FR2728748A1 (en) Management and duplex operation of message exchange system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Country or region after: China

Address after: Building 1B, No.48 Zhichun Road, Haidian District, Beijing, 100080

Applicant after: Beijing Zhiling Haina Technology Co.,Ltd.

Address before: Building 1B, No.48 Zhichun Road, Haidian District, Beijing, 100080

Applicant before: Beijing zhilinghaina Technology Co.,Ltd.

Country or region before: China