Access method, storage node and data center
By improving the symmetric gateway in the data center network, storage nodes can proactively establish connections with compute nodes, solving the problems of multi-tenant sharing of storage node files and private client deployment, and improving the data access efficiency and security of the data center network.
Patent Information
- Application Number
- PCT/CN2023/139197
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-21
- Filing Date
- 2023-12-15
- Publication Date
- 2024-10-03
AI Technical Summary
In existing technologies, asymmetric gateways cannot support storage nodes actively accessing compute nodes, which prevents multi-tenants from sharing files in storage nodes and from deploying private clients on compute nodes. Consequently, data center networks cannot support multi-tenant shared access to files in storage nodes and the deployment of private clients.
By improving the symmetric gateway in the data center network, storage nodes can proactively establish connections with compute nodes and actively send file lock release information and metadata through virtual network interaction, enabling multi-tenant shared access to storage nodes and deployment of private clients.
It enables multi-tenant shared access to files on storage nodes and the deployment of private clients, improving data access efficiency and security in data center networks.
Smart Images

Figure CN2023139197_03102024_PF_FP_ABST
Abstract
Description
Access methods, storage nodes, and data centers
[0001] This application claims priority to Chinese Patent Application No. 202310313480.6, filed with the State Intellectual Property Office of China on March 27, 2023, entitled “Access Method,” the entire contents of which are hereby incorporated by reference into this application. Furthermore, this application claims priority to Chinese Patent Application No. 202310748431.5, filed with the State Intellectual Property Office of China on June 21, 2023, entitled “Access Method, Storage Node, and Data Center,” the entire contents of which are hereby incorporated by reference into this application. Technical Field
[0002] The embodiments of the present application relate to the field of IT technology, and in particular to an access method, a storage node, and a data center. Background Art
[0003] With the development of internet services and distributed computing technologies, data centers can now include compute nodes and storage nodes. Compute nodes can run applications, while storage nodes can store data. Compute nodes and storage nodes can interact through gateways in the network to enable tenants of compute nodes to access data stored in storage nodes.
[0004] The gateway deployed in the network in the related art is an asymmetric gateway, which can support distributing storage nodes to requests from computing nodes, so as to forward the requests to the storage nodes for data access.
[0005] However, the asymmetric gateway does not support distributing computing nodes to requests from storage nodes, resulting in a problem in which storage nodes cannot actively access computing nodes.
[0006] Summary of the Invention
[0007] The present application provides an access method, a storage node, and a data center. In this method, in order to enable multiple tenants of a computing node to share access to the same file in a storage node and ensure file consistency, the virtual instance of the tenant running in the computing node can only access the file in the storage node when it obtains the target information of the file (such as lock release information). The storage node can actively notify the virtual instance of the target information of the file when the lock of the file is released, so that the virtual instance can access the file in the storage node. Thus, by actively accessing the virtual instance through the storage node, shared access to files in the storage node by multiple tenants is achieved.
[0008] Furthermore, to enable a private client (virtual instance) to be deployed on a compute node and access files on a storage node, the storage node can synchronize the target information (e.g., metadata) of the file to the private client before the private client accesses the file. This allows the private client to access the file on the storage node. Thus, by actively accessing the virtual instance through the storage node, the virtual instance on the compute node is deployed as a private client.
[0009] In one possible implementation, the present application provides an access method. A data center includes multiple computing nodes and storage nodes, wherein a first virtual instance runs in the multiple computing nodes, and the multiple computing nodes interact with the storage nodes through a virtual network. The method includes: the storage node pre-stores the target file, or the storage node receives and stores the target files from the multiple computing nodes; the storage node actively requests to establish a first connection with the first virtual instance; the storage node sends a first message to the first virtual instance through the first connection, and the first message is used to provide target information for accessing the target file; in response to receiving a second message sent by the first virtual instance based on the first message, the storage node accesses the target file.
[0010] Among them, the virtual instance of this application can be a virtual machine or a container. The implementation scheme of the virtual instance can be flexibly adopted according to specific needs and is not limited here.
[0011] A virtual network is different from a physical network. It is a virtual network superimposed on a physical network. There are many types of virtual networks, among which an overlay network is a type of virtual network. In some embodiments, the virtual network for computing nodes and storage nodes in a data center can be implemented as a VPC network, where a VPC network is a type of overlay network.
[0012] The first virtual instance may be a virtual instance running on one computing node, or may be a virtual instance running on at least two computing nodes, respectively. There is no limitation here.
[0013] The storage node can support pre-storage of some files (such as pictures, documents, etc., without specific restrictions). In addition, the storage node can also support receiving files from multiple computing nodes and storing them.
[0014] Then the target file to be accessed by the first virtual instance may be a file pre-stored in the storage node, or a file written to the storage node by one of the multiple computing nodes, or at least two computing nodes.
[0015] Furthermore, the first virtual instance to access the target file may be the same as or different from the virtual instance (herein referred to as the third virtual instance) among the multiple computing nodes that writes the target file to the storage node; and the first virtual instance and the third virtual instance may be virtual instances of the same tenant or virtual instances of different tenants. In other words, the method of the present application can be applied to scenarios where the same tenant has shared access to the same target file, or to scenarios where at least two tenants have shared access to the same target file.
[0016] It should be understood that whether the storage node supports pre-storage of files or not does not affect the method of the present application of providing the target information of the target files from multiple computing nodes stored in the storage node to the first virtual instance in the multiple computing nodes, so that multiple virtual instances can share access to the same target file in the storage node.
[0017] In the embodiment of the present application, application scenarios in which a storage node actively accesses a computing node may include scenario 1 and scenario 2.
[0018] In scenario 1, both the storage node and the computing node use the NFS standard protocol (such as NFS V3 protocol) for data access. When the computing node accesses the target file stored on the storage node, it uses a locking method to access the file.
[0019] In scenario 2, both the storage node and the computing node use private protocols for data access. For example, the first virtual instance is a client of the private protocol (referred to as the private client). Then, when the computing node accesses the target file stored on the storage node, it can use the metadata of the target file to access the file.
[0020] Regarding scenario 1, in the related art, the file directories accessed by multiple tenants of multiple computing nodes in the storage node are independent and different from each other. In order for multiple tenants to share access to the same file directory in the storage node, the storage node needs to actively send information to the computing node indicating the lock release of the target file requested by the computing node to access. However, because the storage node in the related art cannot actively access the computing node, the storage node cannot actively send the lock release information to the virtual instance that needs to access the target file. As a result, the data center of the related art does not support multiple tenants sharing the same file directory in the storage node, and thus does not support multiple tenants to share and lock files in the same file directory in the storage node.
[0021] Applied to scenario 1, in an embodiment of the present application, a storage node can actively establish a first connection with a first virtual instance in a plurality of computing nodes, and the storage node can reuse the first connection to send a message that can provide target information for accessing a target file to the first virtual instance, so that the storage node in the virtual network can actively access the computing node and send a first message to the first virtual instance in the computing node to provide the target information required for the first virtual instance to access the target file to the first virtual instance. The storage node actively provides the target information (such as the lock release information) to the first virtual instance to access the target file, so that the first virtual instance can access the target file from the storage node based on the target information. In this way, the data center can support multiple tenants sharing the same file directory in the storage node. When the access lock of the target file requested to be accessed by the first virtual instance has been released, the storage node can actively send the lock release information to the first virtual instance, enabling multiple tenants to share and lock the target files in the same file directory in the storage node.
[0022] Regarding scenario 2, because storage nodes in related technologies cannot actively access compute nodes, they are unable to synchronize file metadata with compute nodes. Private clients access files on storage nodes through file metadata. Therefore, data centers in related technologies do not support deploying virtual instances of private protocols (also known as private clients) on multiple compute nodes to access files on storage nodes.
[0023] Applied to scenario 2, in an embodiment of the present application, the storage node can actively establish a first connection with the first virtual instance in multiple computing nodes, and the storage node can reuse the first connection to send a message that can provide target information for accessing the target file to the first virtual instance, so that the storage node in the virtual network can actively access the computing node and send a first message to the first virtual instance in the computing node to provide the target information required for the first virtual instance to access the target file to the first virtual instance. The storage node actively provides the target information (such as the metadata of the target file) to the first virtual instance to access the target file, so that the first virtual instance can access the target file from the storage node based on the target information. In this way, the data center can support the deployment of private clients in multiple computing nodes, and the storage node can actively synchronize the metadata of the target files stored by it to the private client, so that the private client can use the metadata synchronized by the storage node to access the target file stored in the storage node. However, in the data center in the related art, the computing node cannot deploy private clients because the storage node cannot synchronize metadata with the computing node.
[0024] In addition, when the above-mentioned first virtual instance sends the second message to the storage node based on the first message, the connection used can be a connection between the first virtual instance and the storage node actively established. The connection is a long connection used to access the target file. This connection is different from the above-mentioned first connection. The above-mentioned first connection can be a short connection.
[0025] In a possible implementation, the target information is used to indicate that the access lock to the target file has been released; or, the target information is used to provide metadata of the target file, wherein different files have different metadata.
[0026] In an embodiment of the present application, application scenarios in which a storage node actively accesses a computing node may include the above-mentioned scenario 1 and the above-mentioned scenario 2.
[0027] In scenario 1, both the storage node and the computing node use the NFS standard protocol (such as NFS V3 protocol) for data access. When the computing node accesses the target file stored on the storage node, it uses a locking method to access the file.
[0028] In scenario 1, in the related art, due to the limitation that the gateway in the data center is an asymmetric gateway, although there is a need for multiple tenants to share locks on the same file (or files in the same directory) in the storage node in a multi-tenant scenario. However, the storage node in the related art cannot actively establish a connection with the computing node, nor can it actively send a message to the virtual instance in the computing node indicating that the file lock has been released. As a result, the related art does not support the scenario where multiple tenants share locks on the same file, making the file directories of each tenant independent of each other, and does not support multiple tenants sharing access to files in the same file directory.
[0029] In scenario 1, in an embodiment of the present application, in a scenario where there are multiple tenants of multiple computing nodes, the storage node and the computing node interact through a virtual network. In this scenario, there may be a need for multiple tenants (which may be different virtual instances of the same enterprise or virtual instances of different enterprises) to share access to the same target file. In order to achieve shared access to the same file by multiple tenants, after the lock of the target file requested to be locked by the first virtual instance is released by other virtual instances, indicating that the target file has been accessed by other virtual instances, the storage node can actively establish a connection with the first virtual instance to notify the first virtual instance of the target information (such as lock release information) indicating that the access lock to the target file has been released through the first connection, thereby enabling multiple tenants to share locked access to the same file in the storage node. The storage node supports a shared file directory, and the target files in the shared file directory can support shared access by multiple tenants.
[0030] In scenario 2, both the storage node and the computing node use private protocols for data access. For example, if the first virtual instance is a private client, the computing node can use the metadata of the target file to access the target file stored on the storage node.
[0031] In scenario 2, the related art is limited by the asymmetric gateway used for data exchange between storage nodes and compute nodes. Therefore, the storage node cannot actively establish a connection with the compute node and cannot push metadata about the files stored on the storage node to the compute node through this connection. Therefore, the related art does not support the deployment of private clients on compute nodes in data centers.
[0032] In scenario 2, in an embodiment of the present application, a private client (e.g., a first virtual instance) can be deployed in a computing node. In order to enable the private client to access files on the storage node, the storage node of the present application can actively establish a first connection with the first virtual instance in the computing node, and synchronize the metadata of the target file stored in the storage node to the first virtual instance (here, the private client) through the first connection. In this way, the private client deployed on the computing node can use the metadata synchronized by the storage node to access the target file stored in the storage node. Then, in the case where the metadata of the target file is updated, the storage node can actively synchronize the updated metadata to the private client, so that the private client can use the timely updated metadata to accurately access the target file in the storage node. Moreover, the target file can also be a file written by other private clients, thereby enabling multiple private clients to achieve shared access to the target file in the shared directory of the storage node.
[0033] In a possible implementation, the method further includes: the storage node receiving a third message from the first virtual instance through the second connection; and the storage node actively requesting to establish a first connection with the first virtual instance based on the third message.
[0034] The second connection is a connection between the storage node and the first virtual instance, and the second connection is different from the first connection.
[0035] In the above scenario 1, the second connection may be a connection actively established by the storage node with the first virtual instance.
[0036] In the above scenario 2, the second connection may be a connection actively established between the first virtual instance and the storage node.
[0037] In an embodiment of the present application, in order for the storage node to actively establish a first connection with the first virtual instance for pushing target information to the first virtual instance, the storage node needs to receive a third message from the first virtual instance. The third message may be a message of a preset type, and use the third message to obtain the address information about the first virtual instance required for establishing the first connection, so as to establish the first connection with the first virtual instance. This ensures that the address of the destination end (such as the first virtual instance) used to establish the first connection can be used to receive the target information.
[0038] For example, the storage node can use the third message to obtain the IP address of the first virtual instance. Optionally, the port number of the first virtual instance used to establish the first connection can be extracted from the message content of the third message, thereby establishing the first connection between the storage node and the first virtual instance.
[0039] For example, in scenario 1, the third message may be a message for providing a port number, which is the port number used to receive information that the access lock of the target file has been released. In this way, the storage node can extract the IP address of the first virtual instance and the port number of the first virtual instance used to establish the first connection from the third message from the first virtual instance, so that the storage node can establish a first connection with the corresponding port of the first virtual instance to send the information that the access lock of the target file has been released to the corresponding port of the first virtual instance.
[0040] In scenario 2, the third message may be a message requesting synchronization of metadata information, so that the storage node can extract the IP address of the first virtual instance from the third message from the first virtual instance to actively establish a first connection with the first virtual instance requesting synchronization of metadata information to synchronize the metadata to the first virtual instance.
[0041] In this embodiment, when the storage node actively establishes the first connection with the first virtual instance, it can use the message received from the previous connection established with the first virtual instance to actively establish the next connection with the first virtual instance (here is the first connection). This ensures that the storage node can obtain the information (such as address information) of the destination end (such as the first virtual instance) required to establish the first connection in advance through the received above-mentioned message before establishing the first connection, and the first connection established using the information obtained in advance can be used to transmit the target information, thereby avoiding the problem that the actively established connection cannot transmit the target information.
[0042] In one possible implementation, the multiple computing nodes run first virtual instances of multiple tenants, and the multiple computing nodes running first virtual instances of different tenants run in different virtual networks, and the target information is used to indicate that the access lock to the target file has been released.
[0043] In the above scenario 1, there are multiple tenants for multiple compute nodes, and the compute nodes of different tenants run in different virtual networks. Taking the virtual network as a VPC network as an example, the compute nodes running the virtual instances of tenant A run in VPC network 1, and the compute nodes running the virtual instances of tenant B run in VPC network 2.
[0044] In an embodiment of the present application, different virtual instances of the same tenant can share access to the target file stored in the storage node, and virtual instances of different tenants can also share access to the target file. Then, after the access lock of the target file being shared has been released, the storage node can use the first connection actively established with the first virtual instance to notify the first virtual instance of the information that the access lock has been released, so as to realize shared access to the same target file by different virtual instances in a multi-tenant scenario.
[0045] In one possible embodiment, the method further includes: the storage node receiving a fourth message from the first virtual instance through a third connection, wherein the fourth message is used to provide information requesting an access lock for the target file; the storage node determining, in response to the fourth message, that the access lock for the target file is occupied by the second virtual instance running in the multiple computing nodes; wherein the first connection is a connection between the storage node and the first virtual instance that is actively requested to be established when the storage node determines that the access lock for the target file is released.
[0046] This embodiment can be applied to the above scenario 1:
[0047] In a multi-tenant scenario, the third connection may be a connection actively established between the first virtual instance and the storage node.
[0048] To access the target file, the first virtual instance may first send a lock request (an example of the fourth message) for the target file to the storage node via the third connection. Upon detecting that the target file requested to be locked by the first virtual instance is being accessed by the second virtual instance, the storage node will wait for the lock on the target file to be released before allowing the first virtual instance to access the target file. The second virtual instance and the first virtual instance may be different virtual instances of the same tenant (e.g., tenant A) or separate virtual instances of different tenants (e.g., tenant A and tenant B).
[0049] Then, when the storage node detects that the lock of the target file requested to be locked by the first virtual instance has been released, it can actively establish a first connection with the first virtual instance, and notify the first virtual instance of the information indicating that the access lock to the target file has been released through the first connection. However, in the related art, due to the limitation that the gateway between the multiple computing nodes and the storage node is an asymmetric gateway, the storage node cannot actively establish a connection with the first virtual instance when it detects that the lock of the target file requested to be locked by the first virtual instance has been released, and it cannot notify the first virtual instance of the information indicating that the access lock to the target file has been released through the gateway. However, the technical solution of the embodiment of the present application can be used in a scenario where multiple tenants share access to files in the storage node. The storage node can use the first connection actively established with the first virtual instance to promptly notify the corresponding first virtual instance of the information that the access lock to the target file requested to be accessed by the first virtual instance, so as to speed up the access efficiency of multiple tenants to shared files.
[0050] In a possible implementation, the method further includes: when the storage node determines that the access lock of the target file is released, the storage node actively requests to establish the second connection with the first virtual instance based on the fourth message; the storage node sends a fifth message to the first virtual instance through the second connection, wherein the fifth message is used to query the port number for notifying the target information; and the third message is used to provide the port number of the first virtual instance.
[0051] This embodiment can be applied to the above scenario 1:
[0052] In a multi-tenant scenario, when the storage node detects that the access lock of the target file requested to be locked by the first virtual instance has been released, before notifying the first virtual instance that the access lock of the target file has been released, the storage node can obtain the port number of the port of the first virtual instance for receiving the information that the access lock has been released from the first virtual instance, so that the storage node can use the port number to establish a first connection with the first virtual instance, which can be used to send such control information as indicating that the access lock of the target file has been released, thereby avoiding the situation where the established first connection cannot be used to send the target information.
[0053] In order to obtain the above-mentioned port number from the first virtual instance, the storage node can use the fourth message (a message of a preset type, such as a lock request for the target file) received from the first virtual instance during the previous connection (here, the third connection) established with the first virtual instance to actively establish the next connection (here, the second connection) with the first virtual instance. This ensures that the information (such as address information) of the destination end (such as the first virtual instance) required to establish the second connection can be obtained in advance, and the second connection established using the information obtained in advance can be used to transmit the port number of the first virtual instance for notifying the target information, ensuring that the port number can be reliably obtained by the storage node.
[0054] In one possible implementation, the multiple computing nodes interact with the storage node through a gateway in the virtual network, and the method further includes: the storage node sending first session information to the gateway; the storage node sending a request to establish the first connection to the gateway; and the gateway forwarding the request to establish the first connection to the first virtual instance based on the first session information.
[0055] In combination with any of the above embodiments, multiple computing nodes and storage nodes may interact with each other through a gateway within a virtual network.
[0056] For example, the virtual network is a VPC network, and the gateway is a VPC gateway.
[0057] Since the VPC gateway in the related art is an asymmetric gateway, it does not have a strategy for distributing the storage node's request to a specific computing node. Therefore, in the related art, after the storage node sends a connection establishment request to the computing node through the VPC gateway, the VPC gateway does not have a computing node allocation strategy, and thus cannot forward the establishment request to the computing node, making it unable to support the storage node to establish a reverse connection with the computing node and actively send messages to the computing node.
[0058] Then in the embodiment of the present application, in order to enable the storage node to actively establish a connection (here, the first connection) with the first virtual instance in the computing node in the scenario where the storage node and the computing node interact through the gateway in the virtual network, and send a message on the connection. When the storage node actively establishes the first connection with the first virtual instance, the storage node can not only send the first connection establishment request to the VPC gateway, but also send the first session information to the VPC gateway. The VPC gateway can determine the virtual address of the virtual instance to which the first connection establishment request from the storage node needs to be distributed based on the first session information, and thus forward the first connection establishment request to the first virtual instance according to the virtual address to achieve the establishment of the reverse connection from the storage node to the computing node. In this way, although the VPC gateway itself does not have a reverse connection computing node allocation strategy, when establishing the reverse first connection, the storage node can synchronize the session information related to the first connection to be established to the VPC gateway. In this way, the VPC gateway can use the session information as the address mapping between the two ends of the first connection to achieve the forwarding of the first connection establishment request (and the above-mentioned first message) of the storage node, so that the corresponding message can be forwarded to the destination end of the first connection.
[0059] Exemplarily, the first session information may include a mapping relationship between a physical address (or virtual address) of the source end of the first connection (here, the storage node) and a virtual address of the destination end of the first connection (here, the first virtual instance).
[0060] Exemplarily, as described in the above embodiment, when actively establishing the first connection, the storage node may actively establish the first connection based on the message received from the previously established connection with the first virtual instance (here is the third message, such as the message notifying the port number). Then the above-mentioned first session information may be the session information generated using the message received from the previous connection.
[0061] In addition, this embodiment takes the storage node actively establishing a first connection with the first virtual instance as an example to illustrate the specific implementation process of the storage node actively establishing a connection. In other embodiments, when the storage node actively establishes the above-mentioned second connection with the first virtual instance, the implementation principle is similar and will not be repeated here.
[0062] In one possible implementation, the plurality of computing nodes interact with the storage node in the virtual network via a Remote Direct Memory Access (RDMA) protocol.
[0063] For example, the virtual network is a VPC network, and the gateway in the above virtual network is a VPC gateway.
[0064] Since the VPC gateway in the related art is an asymmetric gateway, it does not have a strategy for distributing the storage node's request to a specific computing node. Therefore, in the related art, after the storage node sends a connection establishment request to the computing node through the VPC gateway, the VPC gateway does not have a computing node allocation strategy and is unable to forward the establishment request to the computing node, making it unable to support the storage node to establish a reverse connection with the computing node.
[0065] In an embodiment of the present application, in order to enable the storage node to actively establish a connection with the computing node and send messages in a virtual network deployed with an asymmetric gateway, in this embodiment, the storage node can interact with the computing node through the RDMA protocol when interacting with the computing node through the virtual network. In this way, the storage node and the computing node can interact in a direct manner without going through the asymmetric gateway (such as the VPC gateway).
[0066] In the direct-through mode, the storage node and multiple computing nodes all support the RDMA protocol, making the address information of both parties transparent to each other. In other words, the storage node and the first virtual instance can each determine the destination address of their message without the need for a gateway to distribute the message to the destination. In this solution, the interaction between the storage node and the computing node does not need to go through the VPC gateway. Instead, the interaction is carried out through the RDMA protocol, bypassing the VPC gateway. This enables the storage node in the virtual network to actively establish a connection with the computing node and actively send messages, supporting multiple tenants to share and lock the same file directory in the storage node, as well as deploying private clients in the computing node.
[0067] In one possible implementation, the multiple computing nodes run first virtual instances of multiple tenants, and the multiple computing nodes running first virtual instances of different tenants run in different virtual networks. The method also includes: the storage node determines the original IP address of the first virtual instance based on the third message; the storage node determines a global IP address corresponding to the original IP address, wherein the global IP address is used to identify the first virtual instance running in the virtual network; the storage node actively requests to establish a first connection with the first virtual instance based on the mapping relationship between the original IP address and the global IP address.
[0068] Taking a VPC network as an example, multiple compute nodes belong to multiple tenants. To ensure data security and isolation between different tenants, the compute nodes of multiple tenants are connected to different VPC networks. For example, the compute nodes of tenant A are connected to VPC network 1, and the compute nodes of tenant B are connected to VPC network 2.
[0069] Although the IP addresses of virtual instances in multiple computing nodes in the same VPC network are unique, the IP addresses of virtual instances in each VPC network are customized. When the IP address of the virtual instance is IPv4, the IP addresses of virtual instances in different VPC networks may be the same, resulting in the virtual instance's IP address being unable to be identified.
[0070] The application scenarios of this embodiment may include the above-mentioned scenario 1 and scenario 2. In other words, whether it is a multi-tenant scenario or a private protocol scenario, there may be a problem that the IP address of the virtual instance connected to the virtual network cannot identify the virtual instance.
[0071] For example, the first virtual instance is a virtual instance 2 in VPC network 1, and its original IP address is cip1, but the original IP address of a virtual instance 2 in VPC network 2 is also cip1.
[0072] To solve this problem, the storage node can extract the original IP address of the first virtual instance, such as cip1, from the third message (the third message is the message received by the storage node using the previous connection with the first virtual instance), and then the storage node can determine the global IP address corresponding to cip1, such as cip100. The global IP address can identify which virtual instance of which VPC network the first virtual instance comes from, thereby uniquely identifying the first virtual instance. For example, the global IP address corresponding to the original IP address of the above-mentioned virtual instance 2 is cip101, which is different from the above-mentioned cip100.
[0073] Exemplarily, when the storage node first receives a message from the first virtual instance, it can assign a corresponding global IP address to its original IP address. Then, when the storage node subsequently receives a message from the first virtual instance, it can directly obtain the global IP address corresponding to the original IP address.
[0074] In this way, when the storage node processes a message from the first virtual instance (such as the third message mentioned above), in order to determine which virtual instance in which VPC network the message belongs to, the IP address in the message can be converted into the corresponding global IP address to process the message.
[0075] In this way, the storage node uses a global IP address (such as cip100) to identify the first virtual instance internally. However, the first virtual instance cannot recognize the global IP address. Then, when the storage node actively establishes a first connection with the first virtual instance, the storage node can convert the global IP address of the first virtual instance in the first connection establishment request into the original IP address, and then issue the establishment request. Thus, in the case where the physical IP address of the virtual instance cannot identify the virtual instance, the storage node can also establish a first connection with the accurate address of the first virtual instance by means of address conversion. This embodiment can solve the problem that the original IP address of the virtual instance cannot identify the virtual instance in a scenario where multiple computing nodes connected to the virtual network run virtual instances of multiple tenants.
[0076] In some embodiments, in an implementation where the storage node interacts with the computing node through an asymmetric gateway, the virtual address of the destination in the first session information may include not only the virtual address of the virtual network (e.g., VPC1) where the first virtual instance is located, but also the original IP address of the first virtual instance.
[0077] In a possible implementation, the method further includes: the storage node sending a first message to the first virtual instance through the first connection based on the mapping relationship.
[0078] In an embodiment of the present application, when the storage node actively establishes a first connection with the first virtual instance, the first virtual instance side does not know the global IP address used internally in the storage node to identify the first virtual instance in the VPC network 1. The global IP address is used to identify the virtual instance within the storage node.
[0079] Then, when the storage node sends the first message through the first connection, it can convert the global IP address in the address of the destination end (here is the first virtual instance) in the first message into the corresponding original IP address, for example, from cip100 to cip1, and then send the first message to ensure that the first message can be reliably and accurately sent to the specific port of the first virtual instance in VPC network 1, and will not be sent to other virtual instances outside the first connection, nor will it be sent to ports on connections other than the first connection to the first virtual instance.
[0080] In one possible embodiment, the present application provides a storage node. The storage node is used to communicate with multiple computing nodes through a virtual network, and a first virtual instance is running in the multiple computing nodes. The storage node includes: a storage module for pre-storing target files, or receiving and storing target files from the multiple computing nodes; a first connection establishment module for actively requesting to establish a first connection with the first virtual instance; a first sending module for sending a first message to the first virtual instance through the first connection, the first message being used to provide target information for accessing the target file; an access module for accessing the target file in response to receiving a second message sent by the first virtual instance based on the first message.
[0081] In a possible implementation, the target information is used to indicate that the access lock to the target file has been released; or, the target information is used to provide metadata of the target file, wherein different files have different metadata.
[0082] In a possible implementation, the storage node further includes: a first receiving module, configured to receive a third message from the first virtual instance through a second connection; and a first connection establishing module, specifically configured to actively request establishment of a first connection with the first virtual instance based on the third message.
[0083] In one possible implementation, the multiple computing nodes run first virtual instances of multiple tenants, and the multiple computing nodes running first virtual instances of different tenants run in different virtual networks, and the target information is used to indicate that the access lock to the target file has been released.
[0084] In one possible embodiment, the storage node also includes: a second receiving module, used to receive a fourth message from the first virtual instance through a third connection, wherein the fourth message is used to provide information requesting an access lock for the target file; a first determination module, used to determine, in response to the fourth message, that the access lock of the target file is occupied by the second virtual instance running in the multiple computing nodes; and the first connection establishment module, specifically used to actively request to establish the first connection between the first virtual instance when it is determined that the access lock of the target file is released.
[0085] In one possible embodiment, the storage node also includes: a second connection establishment module, which is used to actively request to establish the second connection between the first virtual instance based on the fourth message when it is determined that the access lock of the target file is released; a second sending module, which is used to send a fifth message to the first virtual instance through the second connection, wherein the fifth message is used to query the port number of the target information; and the third message is used to provide the port number of the first virtual instance.
[0086] In one possible implementation, the multiple computing nodes run the first virtual instances of multiple tenants, and the multiple computing nodes running the first virtual instances of different tenants run in different virtual networks. The storage node also includes: a second determination module, used to determine the original IP address of the first virtual instance based on the third message; a third determination module, used to determine the global IP address corresponding to the original IP address, wherein the global IP address is used to identify the first virtual instance running in the virtual network; the first connection establishment module, specifically used to actively request to establish a first connection with the first virtual instance based on the mapping relationship between the original IP address and the global IP address.
[0087] In a possible implementation manner, the first sending module is specifically configured to send the first message to the first virtual instance through the first connection based on the mapping relationship.
[0088] In a possible implementation, the storage node is configured to interact with the multiple computing nodes in the virtual network via an RDMA protocol.
[0089] In one possible embodiment, the present application provides a data center, which may include the storage nodes and computing nodes described in any one of the above embodiments, and the data center also includes a gateway deployed in the virtual network, and the multiple computing nodes interact with the storage nodes through the gateway; the storage node also includes: a third sending module, used to send first session information to the gateway; the first connection establishment module, specifically used to send the first connection establishment request to the gateway; the gateway includes: a forwarding module, used to forward the first connection establishment request to the first virtual instance based on the first session information.
[0090] The effects of the storage nodes and data centers in the above-mentioned embodiments are similar to the effects of the access methods in the above-mentioned embodiments, and will not be described in detail here.
[0091] In one possible implementation, the present application provides a storage node, which includes a processor and a memory, wherein the processor is configured to execute instructions stored in the memory, so that the storage node executes the method in any one of the above implementations.
[0092] The effect of the storage node in this embodiment is similar to the effect of the access method in the above embodiments, and will not be repeated here.
[0093] In one possible implementation, the present application provides a data center. The data center includes multiple computing nodes and storage nodes, wherein a first virtual instance runs in the multiple computing nodes, the multiple computing nodes interact with the storage nodes via a virtual network, and the storage nodes include a processor and a memory, wherein the processor is configured to execute instructions stored in the memory, so that the storage nodes perform the method in any of the above implementations.
[0094] In a possible implementation, the virtual network includes a gateway, which may include a processor and a memory. The processor may be configured to execute instructions in the memory so that the gateway forwards the first connection establishment request to the first virtual instance based on the first session information.
[0095] The effect of the data center in this embodiment is similar to the effect of the access method in the above embodiments, and will not be repeated here.
[0096] In one possible implementation, the present application provides a computer-readable storage medium comprising computer program instructions, which, when executed by a storage node, causes the storage node to execute the method in any one of the above implementations.
[0097] The effect of the computer-readable storage medium of this embodiment is similar to the effect of the access method executed by the storage node in the above embodiments, and will not be repeated here.
[0098] In one possible implementation, the present application provides a computer-readable storage medium including computer program instructions, which, when executed by a gateway in a virtual network, enable the gateway to forward the first connection establishment request to the first virtual instance based on the first session information.
[0099] The effect of the computer-readable storage medium of this embodiment is similar to the effect of the access method executed by the gateway in the above embodiments, and will not be repeated here.
[0100] In one possible implementation, the present application provides a computer program product comprising instructions, which, when executed by a storage node, causes the storage node to execute the method in any one of the above implementations.
[0101] The effects of the computer program product of this embodiment are similar to the effects of the access method executed by the storage node in the above embodiments, and will not be described in detail here.
[0102] In one possible implementation, the present application provides a computer program product comprising instructions, which, when executed by a gateway in a virtual network, enable the gateway to forward the first connection establishment request to the first virtual instance based on the first session information.
[0103] The effects of the computer program product of this embodiment are similar to the effects of the access method executed by the gateway in the above embodiments, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0104] FIG1 is a schematic diagram of an exemplary system architecture;
[0105] FIG2 is a schematic diagram illustrating a system processing process in a related art;
[0106] FIG3a is a schematic diagram illustrating an exemplary system architecture;
[0107] FIG3 b is a schematic diagram illustrating another system architecture;
[0108] FIG4a is a schematic diagram illustrating an exemplary system interaction process;
[0109] FIG4 b is a schematic diagram illustrating another system interaction process;
[0110] FIG5a is a flow chart showing an exemplary data access process;
[0111] FIG5 b is a flowchart illustrating an exemplary data access process;
[0112] FIG5c is a flowchart illustrating an exemplary data access process;
[0113] FIG6 a is a schematic diagram illustrating a message in a data access process;
[0114] FIG6 b is a schematic diagram illustrating a message in a data access process;
[0115] FIG6c is a schematic diagram illustrating an exemplary message in a data access process;
[0116] FIG7 is a schematic diagram showing an exemplary system architecture;
[0117] FIG8a is a schematic structural diagram of a storage node shown as an example;
[0118] FIG8b is a schematic structural diagram of an exemplary data center;
[0119] FIG9 is a schematic structural diagram of an exemplary storage device;
[0120] FIG10 is a schematic structural diagram of an exemplary storage device;
[0121] FIG. 11 is a schematic diagram showing the structure of an exemplary storage device cluster. DETAILED DESCRIPTION
[0122] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0123] The term "and / or" in this article is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0124] In the description and claims of the embodiments of this application, the terms "first" and "second" are used to distinguish different objects, rather than to describe a specific order of objects. For example, the terms "first target object" and "second target object" are used to distinguish different objects, rather than to describe a specific order of objects.
[0125] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0126] In the description of the embodiments of this application, unless otherwise specified, "multiple" means two or more. For example, "multiple processing units" means two or more processing units; "multiple systems" means two or more systems.
[0127] At present, with the development of Internet services, distributed computing and other technologies, Data Center Networking (DCN) technology has been widely used.
[0128] The following describes the architecture of the data center network of this application.
[0129] The data center network of the present application may include computing nodes, storage nodes, and a business network.
[0130] Among them, a gateway can be deployed in the business network. Before the improvement of this application, the gateway was an asymmetric gateway (it can also be named a load balancer in some scenarios). After the improvement of the data center network in this application, the gateway deployed in the business network can be a symmetric gateway.
[0131] Definition of the asymmetric gateway: The asymmetric gateway can distribute storage nodes in response to requests from computing nodes and forward the requests to the distributed storage nodes. However, after receiving the request from the storage node, the asymmetric gateway cannot distribute the request to the computing node, and thus cannot forward the active request of the storage node to the computing node.
[0132] The gateway of the present application is a symmetric gateway. Compared with an asymmetric gateway, the symmetric gateway can not only distribute storage nodes in response to requests from computing nodes, but also forward the requests to the distributed storage nodes; in addition, the symmetric gateway can also distribute computing nodes to the requests after receiving the requests from the storage nodes, thereby forwarding the active requests of the storage nodes to the computing nodes.
[0133] The computing nodes of the present application may run tenant services, and the storage nodes may store data, wherein the storage nodes may pre-store data. In addition, the computing nodes may also write data to the storage nodes.
[0134] Compute nodes and storage nodes can exchange data through the business network.
[0135] Among them, computing nodes can access data in storage nodes through gateways in the business network.
[0136] When the number of tenants of computing nodes is small, the business network can be a physical network.
[0137] Then the gateway of the present application may be deployed in the above-mentioned physical network to distribute the requests of the computing nodes to the storage nodes, and to distribute the requests of the storage nodes to the computing nodes.
[0138] If there are a large number of compute node tenants, a virtual network can be deployed on top of the physical network of the compute and storage nodes. The business network can then be a virtual network to support access to data on the storage nodes by a large number of compute node tenants. In this way, both the compute and storage nodes are connected to the virtual network and interact with each other through the virtual network.
[0139] In some embodiments, compared with a gateway deployed in a physical network, a gateway deployed in a virtual network not only has the function of message distribution, but also has the function of converting between virtual addresses in the virtual network and physical addresses in the physical network.
[0140] There are many types of virtual networks, among which an overlay network is a type of virtual network. The data center network of the present application can be applied to various types of virtual networks.
[0141] Among them, the overlay network is an asymmetric network, that is, it supports the distribution function of requests from computing nodes to storage nodes, but does not support the distribution function of requests from storage nodes to computing nodes.
[0142] When the service network between the computing nodes and the storage nodes of the present application is an overlay network, optionally, the asymmetric gateway in the overlay network can be improved to a symmetric gateway so that the data center network supports the storage nodes to actively access the computing nodes.
[0143] A Virtual Private Cloud (VPC) network is an overlay network. Data exchange between the compute nodes and storage nodes of this application can be performed via the VPC network. A VPC gateway can be deployed within the VPC network. Previously, this VPC gateway was an asymmetric gateway. With the improvements of this application, the VPC gateway within the VPC network is now a symmetric gateway.
[0144] 1 , the architecture and functions of the data center network of the present application will be described by taking the business network in the data center network as a VPC network and the gateway in the VPC network as a VPC gateway as an example.
[0145] As shown in FIG1 , a data center network may include a computing cluster 101 , a storage cluster 102 , and a VPC network.
[0146] The VPC network may include the VPC gateway 103 shown in FIG1 , the VPC network 1 to which tenant A in the computing cluster 101 is connected, the VPC network 2 to which tenant B is connected, and the VPC network 0 to which the storage cluster 102 is connected.
[0147] The computing cluster 101 and the storage cluster 102 can interact with each other through the VPC gateway 103 .
[0148] As shown in FIG1 , a computing cluster 101 may include multiple computing nodes, each of which may be a computing server. Computing nodes 11 to 14 and computing nodes 21 to 24 are exemplarily shown here. This application does not limit the number of computing nodes.
[0149] Among them, computing nodes 11 to 14 are connected to VPC network 1, and computing nodes 11 to 14 run the services of tenant A; computing nodes 21 to 24 are connected to VPC network 2, and computing nodes 21 to 24 run the services of tenant B.
[0150] In addition, the computing nodes running different tenant businesses are connected to different VPC networks to isolate the businesses of different tenants and ensure the isolation of different tenant data.
[0151] Taking tenant A's computing node 11 as an example, computing node 11 may include multiple virtual instances, here virtual instances 1 to 3, where virtual instances can be virtual machines or containers (not limited here), for executing tenant A's services. Similarly, virtual instances 1 to 3 in tenant B's computing node 21 can all be used to execute tenant B's services.
[0152] The IP addresses (also known as raw IP addresses or physical IP addresses) of each virtual instance connected to the same VPC network are different. For example, the IP addresses of virtual instances 1 through 3 within compute node 11 are different, and the IP addresses of the virtual instances between compute nodes 11 and 14 are also different. Similarly, the IP addresses of the virtual instances in tenant B's compute nodes 21 through 24 are also different.
[0153] However, considering that the IP addresses of virtual instances of different tenants are customized, the IP addresses of virtual instances of different tenants may be the same.
[0154] The storage cluster 102 may include multiple storage nodes, each of which may be a storage server. Storage nodes 31 to 3n are exemplarily shown here, where n is a positive integer. This application does not limit the number of storage nodes.
[0155] The storage nodes in storage cluster 102 can be used to store data. In a cloud scenario, each storage node in storage cluster 102 is also connected to a VPC network (here, VPC network 0) to support data access for a large number of tenants within the VPC network. Storage nodes 31 through 3n connected to the same VPC network have different IP addresses (also referred to as raw IP addresses or physical IP addresses).
[0156] As shown in Figure 1, VPC gateway 103 is located between VPC networks 1 and 2 connected to compute cluster 101 and VPC network 0 connected to storage cluster 102. VPC gateway 103 was originally an asymmetric gateway, but this application improves it to become a symmetric gateway.
[0157] The following uses a VPC network as the business network and a VPC gateway as the asymmetric gateway in the business network as an example. In conjunction with Figure 2, this article describes the data interaction process between computing nodes and storage nodes in a data center network in the related art. It also introduces the problem faced by the data center network in the related art, which does not support storage nodes actively sending messages to computing nodes.
[0158] The system architecture shown in FIG2 is the same as the module schematics in the system architecture shown in FIG1 . The specific functions and meanings can be referred to the introduction of FIG1 , which will not be repeated here.
[0159] The VPC gateway 103a shown in FIG2 is an asymmetric gateway before improvement in the present application, and different reference numerals are used to distinguish the asymmetric gateway in the related art from the symmetric gateway in the present application.
[0160] Referring to Figure 2, tenant A's virtual instance 1 initiates an IO request. The physical IP address of the virtual instance 1 is represented by cip1. Since the computing node 11 is deployed in the VPC network 1, the source IP address of the IO request is superimposed on cip with the ID of the VPC network 1 to which the virtual instance 1 belongs (represented by vpc1), and the source IP address of the IO request is represented by the virtual address vpc1:cip1.
[0161] This IO request can flow into VPC gateway 103a through VPC network 1. VPC gateway 103a can allocate a storage node in storage cluster 102 for this IO request based on pre-set rules, for example, to storage node 31. The IP address of storage node 31 is represented by sip1. Furthermore, VPC gateway 103a can generate corresponding session information 1: vpc1:cip1->sip1, indicating that a connection has been established between virtual instance 1 in VPC network 1 and storage node 1. vpc1:cip1 represents the virtual IP address of virtual instance 1 in compute node 11, and the physical IP address of virtual instance 1 is represented by cip1.
[0162] The VPC gateway then forwards the IO request to storage node 31 in VPC network 0. Storage node 31 receives the IO request and sends an IO response to the IO request to VPC gateway 103a. VPC gateway 103a forwards the IO response to virtual instance 1 of compute node 11 in VPC network 1 according to the IP address mapping in session information 1.
[0163] In the above introduction, sip1 is the physical IP address of the storage node 31, and the virtual IP address of the storage node 31 is vpc0:sip1. Among them, vpc0 represents the ID of the VPC network 0 to which the storage node 31 is connected. In other words, the virtual IP address of the storage node 31 is also the ID of the VPC network appended to its physical IP address. Considering that the storage cluster 102 is only connected to one VPC network 0, and the physical IP addresses of the storage nodes deployed in the same VPC network are different, sip1 can be used to identify the IP address of the storage node 31. Therefore, in Figure 2, sip1 is used to represent the destination IP address in the session information 1. In other embodiments, the destination IP address in the above session information 1 can also be represented by vpc0:sip1.
[0164] However, in some scenarios (such as Scenario 1 and Scenario 2 below), the storage node also needs to actively access the computing node to send messages to the computing node.
[0165] In scenario 1, both the storage node and the computing node use the NFS standard protocol (such as NFS V3 protocol) for data access. When the computing node accesses files stored on the storage node, it can use a locking method to access the files.
[0166] In scenario 1, as shown in Figure 2, the virtual instance 1 within the computing node 11 of tenant A can reuse the connection established with the storage node 31, and initiate a lock request for the file in the storage node to the VPC gateway 103a through the VPC network 1. The VPC gateway 103a can forward the lock request to the storage node 31 according to the session information 1.
[0167] Storage node 31 detects that the lock of the file requested by virtual instance 1 is currently occupied by another virtual instance of tenant A, or by a virtual instance of another tenant (e.g., tenant B). After the lock on the file is released by the other virtual instance, storage node 31 needs to send a response to the lock request to virtual instance 1 of tenant A. For example, storage node 31 needs to notify virtual instance 1 of the release of the file lock.
[0168] However, in the related art, the VPC gateway 103a shown in FIG2 is an asymmetric gateway. Only when the computing node actively initiates an IO request to the VPC gateway 103a will the VPC gateway 103a allocate a storage node to the IO request according to the preset rules and establish a mapping of vpc:cip to sip (such as the above-mentioned session information 1) to establish a connection between the computing node and the storage node. As for the response message of the lock request that the storage node 31 actively sends to the VPC gateway 103a through the VPC network 0, the VPC gateway 103a does not have the allocation strategy or allocation rules for the computing node or virtual instance, and is unable to distribute the response message of the lock request to the computing node, nor can it determine which virtual instance to assign the response message to. Therefore, as shown by the "X" in the circle in FIG2, the storage node 31 cannot forward the response message of the lock request to the virtual instance 1 of the computing node 11 through the VPC gateway 103a.
[0169] Therefore, data center networks in related technologies do not support shared locking of the same file within a storage node by multiple virtual instances (which can be different virtual instances of the same tenant or virtual instances of different tenants). The file directories of different tenants on the storage cluster 102 are independent of each other, and multiple tenants cannot share and lock the same file directory.
[0170] In FIG. 2 , the case where both computing nodes and storage nodes use the NFS standard protocol for data access is used as an example to illustrate the problem that the data center network in the related art does not support the storage node actively accessing the computing node.
[0171] In Scenario 2, when both storage and compute nodes use proprietary protocols for data access, the virtual instance running the tenant's business in the compute node can be called a private client. To access files stored on the storage node, the compute node can use the file's metadata. In Scenario 2, the storage node must actively establish a connection with the virtual instance within the compute node, synchronizing the file's metadata with the virtual instance over this connection.
[0172] However, because the gateways within the data center's service network in related art are asymmetric gateways (for example, VPC gateway 103a in Figure 2 is an asymmetric gateway), storage nodes cannot proactively synchronize file metadata with compute nodes. Consequently, data center networks in related art also do not support deploying private clients within compute nodes to access files using metadata stored on storage nodes.
[0173] Of course, the scenarios where storage nodes need to actively access computing nodes are not limited to the above scenarios 1 and 2.
[0174] In summary, the data center networks in related art, because compute nodes access files on storage nodes through asymmetric gateways, suffer from the problem that storage nodes cannot actively establish connections with compute nodes and actively send messages to them through these connections. Consequently, data center networks in related art cannot actively access compute nodes through storage nodes to support scenarios where compute nodes access files stored on storage nodes. For example, scenario 1 involves multi-tenant shared file access, or scenario 2 involves deploying private clients within compute nodes.
[0175] Furthermore, the VPC gateway 103a shown in Figure 2 only supports the TCP protocol and not the Remote Direct Memory Access (RDMA) protocol. In other words, in the process described in Figure 2, the virtual instance actively connects to the storage node on the VPC network using the TCP protocol and accesses data from the storage node over the TCP connection. However, the RDMA protocol is a high-performance network protocol. In cloud scenarios, when a compute node accesses data from a storage node through the VPC gateway, it does so only via the TCP protocol, resulting in lower data access performance.
[0176] In addition, since the computing nodes of different tenants need to be connected to different virtual networks (such as VPC networks), for example, Tenant A is connected to VPC network 1, and Tenant 2 is connected to VPC network 2. The physical IP addresses of the virtual instances (hereinafter also referred to as clients) of different tenants can be customized by each tenant, so that the physical IP addresses of the virtual instances of different tenants may be the same. For example, the physical IP address of virtual instance 1 in Tenant A's computing node 11 in Figure 2 is cip1, and the physical IP address of virtual instance 2 in Tenant B's computing node 21 in Figure 2 is also cip1.
[0177] To this end, the present application provides an access method that can enable a storage node to actively establish a connection with a computing node in a data center network, and actively send a message to the computing node over the connection, so that the computing node can use the message to access a file stored in the storage node through the storage node. As described above, the file can be a file pre-stored in the storage node, or a file received and stored by the storage node from a computing node, without limitation.
[0178] In this way, in a scenario where multiple tenant instances share access to files in the same file directory on a storage node, the storage node of the present application can proactively send a message to the virtual instance in the computing node indicating that the lock of the file it requested to lock has been released, so that the data center network supports the shared locked access of multiple tenant virtual instances (which can be multiple virtual instances of the same tenant, or multiple virtual instances of different tenants) to the files in the same file directory stored in the storage node, so that multiple tenants can share locked access to the same file directory in the storage node. The files in the sharable file directory in the storage node may include files pre-existing on the storage node, and / or files written to the storage node by at least one virtual instance in at least one computing node.
[0179] In addition, private clients can also be deployed on computing nodes. The storage nodes of this application proactively send messages to private clients, which can provide metadata information about files stored on the storage nodes. In this way, the data center network of this application can support the deployment of private clients on computing nodes, so that private clients can use metadata synchronized by storage nodes through private protocols to access corresponding files on the storage nodes. The files can be files pre-stored on the storage nodes or files written to the storage nodes by other private clients, without limitation.
[0180] As described above, the application scenario of the storage node actively accessing the computing node can be the above-mentioned scenario 1 corresponding to multiple tenants sharing access to the same file directory in the storage node, or the above-mentioned scenario 2 corresponding to accessing files stored in the storage node through a private client deployed on the computing node.
[0181] The following describes the technical solutions of the access method of the present application applied to the above scenario 1 and the above scenario 2 respectively, with reference to different examples.
[0182] In addition, as described above, the business network for interaction between the computing nodes and storage nodes of the present application can be a physical network or a virtual network. When the business network is a virtual network, the following Examples 1 to 5 are taken as an example to illustrate that the virtual network is a VPC network (for example, the architecture applied to Figure 1). When the virtual network is another type of virtual network, the implementation principle is similar and will not be repeated here.
[0183] Example 1
[0184] In this Example 1, a virtual network for interaction between computing nodes and storage nodes is taken as an example, and the method of the present application is described in combination with the architecture shown in FIG1 above.
[0185] This example 1 can be applied to the scenario 1 described above.
[0186] In order to enable the data center network to support multiple tenants sharing the same file directory in the storage node, so that multiple tenants can share locked access to the same file directory. In this example 1, it mainly describes when a virtual instance requests locked access to a file stored in the storage node, but the file is being locked and accessed by other virtual instances. Then, after the lock of the file is released, how can the storage node actively establish a connection with the virtual instance that previously requested the lock, and actively notify the virtual instance through the connection that the lock of the file it requested to lock has been released, so that the virtual instance can access the target file in the shared file directory in the storage node in a timely manner. This allows a file directory shared and accessed by multiple tenants to exist in the storage node, and supports shared access to the file directory by multiple tenants.
[0187] In combination with the above-mentioned FIG1 , please refer to FIG3a , FIG4a , FIG5a to FIG5c , and FIG6a to FIG6c to understand the technical solution of this Example 1.
[0188] Referring to Figure 3a, in this embodiment, a scenario in which computing nodes and storage nodes interact through VPC gateway 103 is used as an example. The VPC gateway 103 supports the TCP protocol, so that the storage nodes connected to VPC network 0 and the virtual instances of each tenant in the computing cluster 101 connected to VPC network 1 and VPC network 2 interact through the VPC gateway 103 using the TCP protocol.
[0189] As shown in Figure 3a, the virtual instance 1 running in the computing node 11 connected to the VPC network 1 can send a lock request for the target file stored in the storage cluster 102 to the VPC gateway 103. The VPC gateway 103 can distribute the lock request to the storage node 31 to forward the lock request to the storage node 31. When the storage node 31 determines that the access lock of the stored target file is occupied, it indicates that other virtual instances in the computing cluster 101 are performing locked access to the target file. Then, when the storage node 31 determines that the access lock of the target file has been released, the storage node 31 can send a response message to the lock request (for example, information for providing notification that the access lock of the target file has been released) to the VPC gateway 103 and synchronize the session information used to forward the response message (for example, session information 2 or session information 3).
[0190] In this way, VPC gateway 103 can forward the lock request response message to virtual instance 1 in the corresponding compute node 11 according to the synchronized session information, so that storage node 31 can proactively send a message (here, a lock request response message) to virtual instance 1 in compute node 11. Virtual instance 1 can then use the lock request response message to access the target file from storage node 31. This allows the data center network to support shared, locked access by multiple virtual instances to target files in the same file directory in shared storage cluster 102.
[0191] In this Example 1, virtual instance 1 running on computing node 11 shown in FIG3a represents the first virtual instance requesting locked access to a target file stored in storage cluster 102. In other embodiments, any virtual instance running in computing cluster 101 can be the first virtual instance. Furthermore, in this Example 1, the target file is stored on storage node 31 in storage cluster 102 as an example. In other embodiments, the target file in a file directory for multi-tenant shared access can be stored in one or more storage nodes in storage cluster 102, without limitation.
[0192] In combination with FIG3 a , as shown in FIG4 a , the virtual instance 1 in the computing node 11 connected to the VPC network 1 can also be represented as the client 1 .
[0193] As shown in FIG4a , in a scenario where the storage node 31 proactively notifies the client 1 that the access lock of the target file requested for access has been released (referred to as a lock notification message), the operation process 1 as shown in FIG4a (1), the operation process 2 as shown in FIG4a (2), and the operation process 3 as shown in FIG4a (3) may be included.
[0194] In the technical solution of the related technology shown in Figure 2, it only includes operation process 1 shown in Figure 4a(1). Since the storage node cannot actively establish a connection with the virtual instance through the VPC gateway 103a, the related technology cannot implement operation process 2 shown in Figure 4a(2) and operation process 3 shown in Figure 4a(3), making it impossible for the storage node to send the lock notification message to the client.
[0195] Among them, operation process 1 is the process in which the client 1 actively establishes a connection to the storage node 31 (represented here as the first connection) as shown in Figure 4a (1), and sends a lock request to the storage node 31 through the VPC gateway 103 on the first connection.
[0196] In the scenario where the storage node 31 actively sends a lock notification message to the client 1, in order to send the lock notification message to the client 1, the storage node 31 needs to obtain the lock notification port number of the client 1 from the client 1 through the operation process 2 shown in FIG4a(2).
[0197] As shown in FIG4a(2), storage node 31 can use the lock request received in the first connection previously established with client 1 to actively establish a second connection with client 1. Furthermore, storage node 31 can send a message indicating a lock notification port query to client 1 via VPC gateway 103 on the established second connection, and receive a message indicating a lock notification port reply from client 1 on the second connection, thereby obtaining the port number (here represented by cport3) used by client 1 for lock notification.
[0198] After operation process 2 shown in FIG4a(2), storage node 31 can use the lock notification port message received during the second connection previously established with client 1 to obtain the lock notification port number of client 1, thereby actively establishing a third connection with client 1 through VPC gateway 103. Furthermore, the storage node can send a lock notification message (here, a message notifying that the requested lock has been released) to client 1 through VPC gateway 103 over the established third connection.
[0199] Both operation processes in FIG4a(2) and FIG4a(3) are scenarios where the storage node needs to actively send messages to the client.
[0200] It should be understood that in the scenario where the storage node actively sends a message to the client, based on factors such as the different message encapsulation information of the control plane and the data plane, the storage node 31 cannot reuse the first connection actively established by the client 1 as shown in Figure 4a (1) to encapsulate and send the message indicating the query lock notification port as shown in Figure 4a (2), nor can it reuse the first connection to encapsulate and send the message indicating that the lock requested has been unlocked as shown in Figure 4a (3). Instead, the storage node 31 can only actively re-establish a new connection with the client (for example, a second connection or a third connection), and encapsulate and send the message indicating the query lock notification port to the client 1 on the second connection, and encapsulate and send the message indicating that the lock requested has been unlocked to the client 1 on the third connection.
[0201] In this embodiment, when the storage node 31 actively establishes a connection with the client 1 (for example, the second connection or the third connection shown in Figure 4a), it can use the message received from the previous connection established between the storage node 31 and the client 1 to actively establish the next connection with the client 1 (for example, the second connection or the third connection shown in Figure 4a). This ensures that the storage node 31 can obtain the information (for example, address information) of the destination end (here, the client 1) required for the active connection establishment in advance through the above-mentioned message before actively establishing the connection, and the first connection established using the information obtained in advance can be used to transmit the target information, thereby avoiding the problem that the actively established connection cannot transmit the target information.
[0202] The following describes the three operation processes shown in Figure 4a, respectively, in conjunction with Figures 5a to 5c and Figures 6a to 6c. The following specifically describes how, each time the storage node 31 actively establishes a connection with the client 1, it utilizes the message received from the previous connection established with the client 1 to generate the session information required for this connection establishment (e.g., session information 2 and session information 3 shown in Figures 3a and 4a). Furthermore, when the storage node 31 requests to actively establish a connection with the client 1, the pre-generated session information is synchronized to the VPC gateway 103. This allows the VPC gateway 103, even if the VPC gateway 103 itself is not configured with a virtual instance or computing node distribution policy, to utilize the session information synchronized from the storage node 31 to establish an active connection between the storage node 31 and the client 1, and to forward messages from the storage node 31 to the client 1 according to the session information. This enables the VPC gateway 103 in Figures 1, 3a, and 4a of this application to support the distribution function of messages from the storage node, thereby achieving the effect of the storage node 31 actively accessing the computing node through the VPC gateway 103.
[0203] FIG5a exemplarily shows the detailed implementation process of the operation process 1 shown in FIG4a(1) and the operation steps of the method of the present application related to the operation process 1.
[0204] FIG6a exemplarily shows a message header of the message in the process shown in FIG5a , schematic contents of forward key1 and reverse key1 related to the first connection, and schematic contents of forward key2 and reverse key2 related to the second connection to be established.
[0205] Among them, the "forward" described in each embodiment of this document refers to the direction of sending messages from the client to the storage node, for example, the source end is the client and the destination end is the storage node; "reverse" refers to the direction of sending messages from the storage node to the client, for example, the source end is the storage node and the destination end is the client.
[0206] First, referring to FIG. 5a and FIG. 6a in conjunction with FIG. 3a and FIG. 4a , as shown in FIG. 5a , the process may include the following steps:
[0207] S301 , client 1 sends a first connection establishment request to VPC gateway 103 .
[0208] For example, if client 1 needs to write to a target file stored in storage cluster 102 as shown in Figure 3a, to ensure that the file is written correctly, before performing the write operation, client 1 needs to send a lock request for the file to storage cluster 102 to lock the file and prevent other clients from reading or writing the file. Before client 1 sends the lock request, client 1 first needs to establish a connection with a storage node in storage cluster 102. Client 1 can then send a request to establish a connection with the storage node (here, the first connection establishment request) to VPC gateway 103.
[0209] The target file may be a file pre-stored in the storage cluster 102 , or may be a target file written to the storage cluster 102 by multiple computing nodes in the computing cluster 101 .
[0210] In some embodiments, the target file may be located in a multi-tenant shared file directory of the storage cluster 102, so that virtual instances of multiple enterprises, or multiple virtual instances of the same enterprise, can perform shared locked access to files in the file directory.
[0211] In some embodiments, the target file may also be located in a file directory of a single tenant of the storage cluster 102, so that multiple virtual instances of the tenant (corresponding to an enterprise) can perform shared locked access to the files in the file directory.
[0212] The request to establish the first connection may include the IP address and port number of client 1. As shown in Figure 3a, client 1 is connected to VPC network 1, so the source address of the request to establish the first connection is a virtual address, for example, represented by vpcID:cipID:cportID, wherein vpcID represents the ID of the VPC network to which client 1 belongs, here vpc1; cipID represents the physical IP address of client 1, here cip1; cportID represents the port number of client 1 for establishing the current connection, here cport1. vpcID:cipID:cportID indicates that the physical address of the client also encapsulates the virtual address of the VPC network to which it belongs (for example, vpcID). When client 1 connected to VPC network 1 requests to establish the first connection, the source address of the request to establish the first connection (here the address of client 1) is represented by vpc1:cip1:cport1.
[0213] S302 , the VPC gateway 103 allocates a storage node 31 .
[0214] 2 , the VPC gateway 103 may allocate a storage node, here port 1 of the storage node 31 , in the storage cluster 102 in response to the first connection establishment request according to a preset rule.
[0215] For example, the physical IP address of the storage node 31 is represented by sip1, and the port number of port 1 of the storage node 31 is represented by sport1. The physical IP address and port number of the storage node 31 establishing the first connection are represented by sip1:sport1.
[0216] As described above, referring to Figure 3a, since the storage cluster 102 is only connected to one VPC network, which is VPC network 0 here, the IP addresses (expressed as sip) between different storage nodes in the storage cluster 102 must be different. Therefore, the sip1 of the above-mentioned storage node 31 can identify the storage node 31, and sip1:sport1 can identify the physical address of port 1 of the storage node 31.
[0217] Of course, in other embodiments, the physical address of the storage node 31 can also be represented by vpc0:sip1:sport1, where the meaning of vpc0:sip1:sport1 is the same as the meaning of the virtual address vpc1:cip1:cport1 of the client 1. The physical address of the storage node 31 is also encapsulated with the ID of the VPC network to which the storage node 31 belongs to identify the physical address of the storage node 31.
[0218] 3a and 4a(1), when the VPC gateway 103 responds to the request to establish the first connection and allocates port 1 of the storage node 1 in the storage cluster 102 to establish a connection with port 1 of the client 1, it can generate session information (session) 1 related to the first connection to be established, wherein session 1 may include a mapping between the address information of the two ends of the connection to be established, here the mapping between port number 1 of the client 1 and port number 1 of the storage node 31, and the mapping relationship between them is represented by vpc1:cip1:cport1--sip1:sport1.
[0219] S303 , the VPC gateway 103 forwards the first connection establishment request to the storage node 31 .
[0220] The message header may include a 5-tuple, which includes the source IP, source port number, destination IP, destination port number, and protocol number.
[0221] As shown in Figure 6a, in this step, the header of the first connection establishment request forwarded by the VPC gateway 103 to the storage node 31 (the protocol number is not shown here) is represented by vpc1:cip1:cport1->sip1:sport1, where the left side of "->" in the schematic expression of the header in each embodiment of the present application represents the source IP and source port number, and the right side of "->" represents the destination IP and destination port number.
[0222] Table 1 is a schematic diagram showing the structure of the message header of the establishment request of the first connection.
[0223] The packet header is expressed as vpc1:cip1:cport1->sip1:sport1.
[0224] Table 1
[0225] For explanation of the contents of each item in Table 1, please refer to the above introduction of Example 1, which will not be repeated here.
[0226] S304: The first connection between the client 1 and the storage node 31 is established successfully.
[0227] Among them, the client 1 and the storage node 31 establish a first connection of the TCP protocol through the VPC gateway 103. The process of establishing the first connection may include a three-way handshake. The specific details are not repeated here. Through the three-way handshake, in S304, the port 1 of the client 1 and the port 1 of the storage node 1 establish a first connection.
[0228] S305 , client 1 sends a lock request to gateway 301 , and gateway 301 forwards the lock request to storage node 31 .
[0229] For example, referring to Figure 6a, similar to S303, the header of the lock request sent by client 1 to VPC gateway 103 is represented by vpc1:cip1:cport1->sip1:sport1. The structure of the header can be seen in Table 1 (for detailed explanation, refer to the introduction of S303 and will not be repeated here).
[0230] Furthermore, the VPC gateway 103 may forward the lock request to the port 1 of the storage node 31 according to the mapping relationship in the session information 1 generated when the first connection is established.
[0231] S306: After receiving the lock request, the storage node 31 checks and determines that the lock is occupied by another client.
[0232] For example, the target file requested to be locked by client 1 is currently being written by other clients of tenant A or by clients of tenant B. In this case, storage node 31 can determine that the lock of the target file is occupied by other clients and can only wait for the lock of the file to be released before responding to the lock request of client 1 to lock the target file.
[0233] After S305 , the storage node may execute S307 .
[0234] S307 , the storage node 31 may determine that the lock request received in S305 is a message of a preset type.
[0235] Among them, the preset type of message can be a message indicating a lock request (such as the lock request shown in Figure 4a (1)), a message indicating an unlock request, a message indicating a lock notification port (such as the message querying the lock notification port shown in Figure 4a (2)), etc.
[0236] Each storage node in the storage cluster 102 of the present application may be pre-configured with keywords and values for messages of a preset type through a configuration file or configuration management program. After receiving a message, the storage node may use the keywords and values to identify whether the message belongs to the preset type.
[0237] For example, if the keyword is an address offset and the value is 1010, then after the storage node parses the received message and determines that the value of the parsed message after the address offset is 1010, it means that the message is a message of the preset type.
[0238] After S307 , while the storage node 31 waits for the lock of the target file requested by the client 1 to be released, the storage node 31 may execute S308 b , and optionally may execute S308 a .
[0239] S308a, the storage node 31 may generate a forward key1 and a reverse key1 associated with the first connection.
[0240] After the storage node 31 identifies that the received message (here, the lock request in S305 ) is a message of a preset type, the storage node may generate a forward key1 and a reverse key1 related to the first connection based on the lock request.
[0241] S308b: The storage node 31 generates a forward key2 and a reverse key2 related to the second connection to be established.
[0242] After the storage node 31 recognizes that the received message (here, the lock request in S305 ) is a message of a preset type, the storage node may generate a forward key2 and a reverse key2 related to the second connection to be established based on the lock request.
[0243] This application does not limit the execution order between S308a and S308b.
[0244] The implementation principles of S308a and S308b are similar. Here, the implementation process of S308b is taken as an example to illustrate the generation process of forward key2 and reverse key2.
[0245] Please refer to Figure 1 and Figure 3a. Since the computing nodes of different tenants are deployed in different VPC networks, the messages received by the storage cluster 102 from the computing cluster 101 may come from multiple VPC networks (for example, VPC network 1 and VPC network 2), and the physical IP addresses of the virtual instances in different VPC networks may be the same (for example, the physical IP addresses of virtual instance 1 of tenant A and virtual instance 2 of tenant B are both cip1). For example, if the physical IP addresses of the virtual instances in the computing nodes are encoded in IPv4, there may be a problem that the physical IP addresses of virtual instances of different tenants are the same.
[0246] Please refer to Figure 6a. The storage node 31 parses the lock request in S305, thereby removing the vpcID (here vpc1) of the source address in the message header to determine the physical address of client 1, which is cip1:cport1, where the physical IP address of client 1 is cip1.
[0247] Because messages from tenants in different VPC networks may have duplicate physical IP addresses for clients of different tenants (for example, all are cip1), making it impossible to uniquely identify the physical address of a client. Storage node 31 can then convert the physical IP address of client 1 (cip1) corresponding to the lock request into a global physical IP address (cip100 in this case).
[0248] For example, when the storage cluster 102 first receives the message from the client 1, it can assign a corresponding global physical IP address to its physical IP address. Then, when the storage cluster 102 subsequently receives the message from the client 1, it can directly obtain the global physical IP address corresponding to the physical IP address of the client 1 in the message.
[0249] The global physical IP address can uniquely identify the physical IP address of the client 1, so that the storage node 31 can distinguish the physical IP address of each virtual instance in the computing node in the multi-VPC network through the global physical IP address.
[0250] For example, the physical IP addresses of the virtual instance 1 of tenant A and the virtual instance 2 of tenant B shown in Figure 3a are both cip1, but the storage node 31 can convert the cip1 of the virtual instance 1 of tenant A into a global physical IP address: cip100, and convert the cip1 of the virtual instance 1 of tenant B into a global physical IP address: cip101.
[0251] In this way, on the storage cluster 102 side, each virtual instance in the computing cluster 101 connected to multiple VPC networks can be identified by the global physical IP address, and the global physical IP address can be used to distinguish messages from different virtual instances.
[0252] In this way, the storage node 31 can extract the physical IP address of client 1 in the VPC network 1 for the lock request of client 1, and determine the global physical IP address (used to represent the global IP address inside the storage node 31) corresponding to the physical IP address of client 1 (used to represent the original IP address) to obtain the mapping relationship between cip100 and vpc1:cip1, where cip100 can identify vpc1:cip1.
[0253] Storage node 31 can internally use a physical address to identify the client, as well as the IP address and port number of storage node 31. When storage node 31 receives a message from computing cluster 101 through the VPC network, or sends a message to computing cluster 101 through VPC network 0, because computing cluster 101 is connected to the VPC network (a virtual network), storage node 31 can use a virtual address in the message to identify the address of client 1 and storage node 31.
[0254] As mentioned above, "forward" refers to the direction of sending messages from the client to the storage node, for example, the source end is the client and the destination end is the storage node; "reverse" refers to the direction of sending messages from the storage node to the client, for example, the source end is the storage node and the destination end is the client.
[0255] Referring to Figure 6a, the storage node 31 obtains the mapping relationship between cip100 and vpc1:cip1 based on the lock request, and obtains the port number of client 1 corresponding to the first connection (here is cport1) and the port number of the storage node 31 (here is sport), so that the forward key1 can be generated. The forward key1 is illustrated by expression 1.
[0256] vpc1:cip1:cport1+sip1:sport1-》cip100:cport1+sip1:sport1, expression 1a
[0257] As mentioned above, since the storage cluster 102 is only connected to one VPC network 0, the physical addresses of different storage nodes can identify the storage node. In the forward key1, reverse key1, forward key2, reverse key2, forward key3, and reverse key3 generated in each embodiment of this article, the physical IP address of the storage node 31 (for example, sip1) can be used to represent the virtual IP address of the storage node 31 (for example, vpc0:sip1), and represented by sip1:sport1.
[0258] Alternatively, in other embodiments, forward key1, reverse key1, forward key2, reverse key2, forward key3, and reverse key3 reflect the mapping relationship between the virtual IP address and the physical IP address of the storage node, such as the mapping between vpc0:sip1 and sip1. For example, forward key1 can also be represented by expression 1b.
[0259] vpc1:cip1:cport1+vpc0:sip1:sport1-》cip100:cport1+sip1:sport1, expression 1b
[0260] In Expression 1b, the virtual address of the storage node 31 is represented by vpc0:sip1:sport1.
[0261] The physical meaning of the forward key1 indicated by the above Expression 1a or Expression 1b is shown in Table 2a.
[0262] As shown in Table 2a, the forward key 1 is divided into a Key part and a Value part that map to each other. Since it is a "forward" key, the Key part is composed of the virtual addresses of the client 1 and the storage node 31, and the Value part is composed of the physical addresses of the client 1 and the storage node 31, forming a mapping from the virtual address to the physical address.
[0263] As shown in Table 2a, the forward key1 is divided into four entries: source IP, source port number, destination IP, and destination port number.
[0264] As shown in Table 2a, the key of the source IP is vpc1:cip1, the key of the source port number is cport1, the key of the destination IP is sip1 or vpc0:sip1, and the key of the destination port number is port1.
[0265] The value of the source IP is cip100, the value of the source port number is cport1, the value of the destination IP is sip1, and the value of the destination port number is port1.
[0266] Table 2a
[0267] Similarly, referring to FIG. 6 a , the storage node 31 may also generate a reverse key 1 associated with the first connection based on the lock request. The reverse key 1 is illustrated in Expression 2.
[0268] sip1:sport1+cip100:cport1-》sip1:sport1+vpc1:cip1:cport1, expression 2
[0269] The physical meaning of the reverse key1 shown in the above expression 2 is shown in Table 2b.
[0270] Table 2b
[0271] As shown in Table 2b, the reverse key 1 is divided into a Key part and a Value part that map to each other. Since it is a "reverse" key, the Key part is composed of the physical addresses of the client 1 and the storage node 31, and the Value part is composed of the virtual addresses of the client 1 and the storage node 31, forming a mapping from the physical address to the virtual address.
[0272] As shown in Table 2b, reverse key1 is divided into four entries: source IP, source port number, destination IP, and destination port number.
[0273] As shown in Table 2b, the key of the source IP is sip1 or vpc0:sip1, the key of the source port number is port1, the key of the destination IP is cip100, and the key of the destination port number is cport1.
[0274] The value of the source IP is sip1, the value of the source port number is port1, the value of the destination IP is vpc1:cip1, and the value of the destination port number is cport1.
[0275] The above-mentioned forward key1 and reverse key1 are the forward key and reverse key related to the first connection. Then the physical IP address and virtual IP address of the client 1 involved in the first connection, and the port number of the client 1 used by the first connection, the virtual IP address, physical IP address of the storage node 31 and the port number of the storage node 31 used by the first connection can all be determined through the lock request message of the preset type in S305, and the storage node 31 also generates a mapping relationship between vpc1:cip1 and cip100, so that the above-mentioned forward key1 and reverse key1 can be generated.
[0276] In one possible embodiment, after S305 shown in Figure 5a, the storage node 31 determines that the lock of the file requested by the client 1 is not occupied by other clients, then the storage node 31 can send a response message to the client 1 on the first connection, and the client 1 can send a request message to the storage node 31 on the first connection.
[0277] Then in this scenario, when the storage node 31 reuses the first connection to send a response message, as described above, the storage node 31 uses physical addresses to represent the source address and destination address of the message. For example, the source IP of the response message to be sent by the storage node on the first connection is sip, the source port number is sport1, the destination IP is cip100, and the destination port number is cport1. The above-mentioned forward key1 and reverse key2 can both be the contents of the flow table information inside the storage node 31. Then the storage node 31 can use the source IP, source port number, destination IP, and destination port number in the message header of the response message to query the flow table information and determine whether the values of the above four types of information in the message header hit the Key part in the flow table information. As shown in Table 2b above, the values of the four items in the Key part of the reverse key1 shown in Table 2b are the same as the values of the four information in the above-mentioned response message. The storage node 31 may determine that the response message hits the reverse key1, and may modify the values of the four types of information in the response message that match the Key portion in the reverse key1 to the values of the four corresponding items in the Value portion in the reverse key1.
[0278] In this way, the source IP in the header of the modified response message is sip, the source port number is sport1, the destination IP is vpc:cip1, and the destination port number is cport1. Referring to Figure 3a, storage node 31 can send the modified response message to VPC gateway 103 via VPC network 0. VPC gateway 103 can send the modified response message to client 1 on the first connection according to session information 1 shown in Figure 4a(1).
[0279] In this embodiment, when the storage node 31 needs to send a response message to the client 1 through the first connection that has been established, the storage node 31 can use the above-mentioned reverse key1 to find the original client 1 (address is vni:cip1:cport1) that established the first connection, so as to facilitate sending the message to the client 1.
[0280] Similarly, when the above-mentioned client 1 needs to continue to send a request message to the storage node 31 on the first connection, the storage node 31 can query the flow table information of the received request message, and can determine that the message header of the request message can hit the Key part of the forward key1 in the flow table information, thereby modifying the content of the message header of the request message that hits the above-mentioned Key part to the Value part corresponding to the Key part in the forward key1, and then, the storage node 31 can distribute or process the modified message.
[0281] In this way, when the storage node receives a message sent by the client on the first connection, the storage node can perform address conversion on the message according to the forward key1 associated with the first connection, so that the address of the message can be converted from a virtual address to a corresponding physical address, so that the storage node can distribute or process the message after address conversion.
[0282] In this embodiment, multiple computing nodes in the computing cluster 101 are connected to multiple VPC networks, resulting in different VPC networks for different tenants. Then, when the IP addresses of the tenants' virtual instances are encoded in IPv4, the IP addresses of the virtual instances of different tenants may be the same, resulting in the problem that the physical IP address of the virtual instance cannot identify the virtual instance.
[0283] In this embodiment, after client 1 actively establishes a first connection with storage node 31 through VPC gateway 103, storage node 31 can determine a global physical IP address (e.g., cip100) corresponding to the physical IP address (e.g., cip1) of client 1 connected to VPC network 1, where the global physical IP address can identify client 1 as client 1 in VPC network 1. In other words, cip100 can be used to identify vpc1:cip1. Furthermore, when the storage node 31 determines that the message received from the client 1 through the first connection (here, the lock request in S305) is a message of a preset type, the storage node 31 can use the mapping relationship between the physical IP address of the client 1 and the global physical IP address (here, the mapping between cip1 and cip100) to determine the mapping relationship between the virtual address of the client 1 and the global physical IP address (here, the mapping between vpc1:cip1 and cip100), thereby generating the forward key1 and reverse key1 associated with the first connection (refer to Table 2a, Table 2b above, or the schematic diagram of the forward key1 and reverse key1 in Figure 6a). The forward key1 and reverse key1 can express the address conversion relationship between the source end and the destination end of the first connection.
[0284] Then, after the storage node 31 generates the forward key1 and the reverse key1, when it receives a message from the client 1 through the first connection, it can convert the source address in the message from the virtual address to the global physical address according to the forward key1, and then process the message after the address is converted; in addition, after the storage node 31 generates the forward key1 and the reverse key1, when it sends a message to the client 1 through the first connection, it can convert the destination address in the message from the global physical address to the virtual address according to the reverse key1, and then send the message after the address is converted. In this way, when the client's physical IP address cannot identify the client, the storage node 31 can use the forward key1 and reverse key1 related to the first connection to directly convert the virtual address of client 1 and the global physical address of the message related to the first connection to determine whether the message is from or to be sent to client 1, without having to redetermine the global physical address of the source end (here is the client) of the message each time the message is received through the first connection, nor is there a need to redetermine the virtual address of the destination end (here is the client) of the message each time the message is sent through the first connection. This can eliminate the need to redetermine which virtual instance the message is from or sent to each time the message is sent and received through the first connection, thereby improving the sending and receiving efficiency and processing efficiency of messages between the storage node and client 1.
[0285] In this way, the storage node 31 of the present application can identify the received preset type of message (here is a lock request), and generate the flow table information (such as forward key1, reverse key1) required for the current connection (here is the first connection) and the next connection to be established with client 1 (here is the second connection) based on the message, so that the reverse key (such as reverse key1) in the flow table information can be used to convert the destination address of the message to be sent through the first connection (from the global physical address to the virtual address) to send the message to the specified client, and the forward key (such as forward key1) in the flow table information can be used to convert the source address of the message received through the first connection (from the virtual address to the global physical address), so that the storage node 31 can perform process distribution and other processing on the message after the address conversion.
[0286] Continuing with FIG. 5 a , in S308b above, the storage node 31 can utilize the message (here, a lock request) received during the previous connection (here, the first connection) established with the client 1 to generate a conversion relationship between the virtual address of the client 1 and the global physical address, such as forward key 2 and reverse key 2, required for the storage node 31 to actively establish the next connection (here, the second connection) with the client 1. This facilitates the storage node 31 to actively establish the second connection with the client 1. Furthermore, the storage node 31 can utilize the forward key 2 and reverse key 2 generated before establishing the second connection to directly convert the virtual address of the client 1 and the global physical address for messages related to the second connection, thereby quickly determining which client (here, client 1) and which port the message is from or to be sent to, and thereby quickly processing the message. There is no need to redetermine the global physical address of the source end (here is the client) of the message each time a message is received through the second connection, nor is there any need to redetermine the virtual address of the destination end (here is the client) of the message each time a message is sent through the second connection. This can improve the efficiency of sending and receiving and processing messages on the second connection between the storage node and the client 1.
[0287] In this embodiment, when the storage node 31 generates the forward key2 and reverse key2 associated with the second connection to be established, as shown in FIG4a(2), the purpose of the storage node 31 establishing the second connection is to send a message indicating the query lock notification port. This message is a control message. The TCP protocol stipulates the port information used by the client and the storage node for transmitting control messages. For example, the port information is respectively the client's port 2 (represented by cport2) and the storage node's port 2 (represented by sport2). The above-mentioned port1 and cport1 are both port numbers agreed upon by the TCP protocol for transmitting data messages.
[0288] In S308b, the storage node 31 can generate forward key2 and reverse key2 related to the second connection based on the port number of the storage node (here is sport2) and the port number of the client (here is cport2) agreed in the protocol for transmitting control messages, and the virtual IP address of client 1 (here is vpc1:cip1) determined based on the above lock request, the global physical IP address of client 1 (here is cip100), the physical IP address of storage node 1 (here is sip1), the virtual IP address of storage node 1 (here is also sip1, or it can also be vpc0:sip1), and the mapping relationship between vpc1:cip1 and cip100.
[0289] As shown in FIG6a , the forward key2 is represented by expression 3a.
[0290] vpc1:cip1:cport2+sip1:sport2-》cip100:cport2+sip1:sport2, expression 3a
[0291] The physical meaning of the forward key2 represented by the above expression 3a is shown in Table 3a.
[0292] The principle of the forward key 2 shown in Table 3a is similar to the principle of the forward key 1 shown in Table 2a above, and will not be repeated here.
[0293] Table 3a
[0294] As shown in FIG6a , the reverse key2 is represented by Expression 3b.
[0295] sip1:sport2+cip100:cport2->sip1:sport2+vpc1:cip1:cport2, expression 3b
[0296] The physical meaning of the reverse key2 shown in the above expression 3b is shown in Table 3b.
[0297] Table 3b
[0298] The principle of reverse key2 shown in Table 3b is similar to the principle of reverse key1 shown in Table 2b above, and will not be repeated here.
[0299] In a possible implementation, the forward key1, reverse key1, forward key2, reverse key2 described in this application, and the forward key3 and reverse key3 described later may all be contents in the flow table information of the storage node 31 of this application.
[0300] After Figures 4a(1), 5a, and 6a, the following describes the process in which the storage node 31 actively establishes a second connection with the client 1 using the reverse key 2 generated by the lock request received from the client 1 in the previous connection with reference to Figures 4a(2), 5b, and 6b. When the storage node 31 actively establishes the second connection with the client 1, the session information 2 related to the reverse key 2 can be synchronized to the VPC gateway 103, so that the VPC gateway 103 can distribute the storage node 31's connection establishment request to the client 1 according to the session information 2, thereby achieving the distribution of messages from the storage node to the client, thereby achieving the storage node 31 actively establishing a second connection with the client 1. When the storage node 31 actively establishes the second connection with the client 1, the reverse key 2 can be used to determine which client's port the connection request should be sent to. In the related art, when the storage node 31 establishes a connection with the client, it is not able to generate the reverse key 2, and thus cannot determine to which virtual instance the connection establishment request is to be sent.
[0301] In addition, this embodiment also describes how the storage node 31 converts the client's virtual address and the global physical address for the message related to the second connection according to the forward key2 and reverse key2 generated before establishing the second connection, thereby improving the sending and receiving efficiency and processing efficiency of the message related to the second connection.
[0302] In addition, this embodiment also describes how the VPC gateway 103 uses the session information 2 synchronized from the storage node 31 when establishing the second connection to distribute the message related to the second connection to which client or which storage node, so that the VPC gateway 103 can send the message related to the second connection to the port of the client or the port of the storage node corresponding to the second connection, and avoid sending the message to the corresponding port of other connections between the client 1 and the storage node 31.
[0303] FIG5b exemplarily shows the detailed implementation process of the operation process 2 shown in FIG4a(2) and the operation steps of the method of the present application related to the operation process 2.
[0304] FIG6 b exemplarily shows a message header of a message in the process shown in FIG5 b , and schematic contents of a forward key 3 and a reverse key 3 related to a third connection to be established.
[0305] First, referring to FIG. 5b and FIG. 6b in conjunction with FIG. 3a and FIG. 4a , as shown in FIG. 5b , S400 to S411 of FIG. 5b may be operations subsequent to the process of FIG. 5a . As shown in FIG. 5b , after the steps shown in FIG. 5a , the method of the present application may further include the following steps:
[0306] S400: Modify the initial establishment request of the second connection according to the reverse key2.
[0307] As described above, the storage node 31 internally uses physical addresses to represent the source and destination addresses of the message. Therefore, as shown in FIG6b , the message header of the initial establishment request for the second connection to be established (the protocol number is not shown here) is represented by sip1:sport2->cip100:cport2. In the schematic representation of the message header in each embodiment of the present application, the left side of “->” represents the source IP and source port number, and the right side of “->” represents the destination IP and destination port number.
[0308] Table 4a is a schematic diagram showing the structure of the message header of the initial establishment request of the second connection.
[0309] The message header is represented by sip1:sport2->cip100:cport2.
[0310] Table 4a
[0311] Then, the storage node 31 can use the source IP, source port number, destination IP, and destination port number in the message header of the initial establishment request to query the flow table information and determine whether the values of the above four types of information in the message header hit the Key part in the flow table information. As shown in Table 3b above, the values of the four table items in the Key part of the reverse key2 shown in Table 3b are the same as the values of the four information in the message header of the initial establishment request. The storage node 31 can determine that the initial establishment request hits the reverse key2 and can modify the values of the four types of information in the initial establishment request that match the Key part of the reverse key2 to the values of the four table items in the corresponding Value part of the reverse key2. In this way, as shown in Figure 6b, the message header in the modified initial establishment request in S401a (which can be called the second connection establishment request) is indicated by sip1:sport2->vpc1:cip1:cport2, where the source IP in the message header is sip, the source port number is sport2, the destination IP is vpc:cip1, and the destination port number is cport2.
[0312] S401a , the storage node 31 sends a second connection establishment request to the VPC gateway 103 .
[0313] 5 b , the storage node 31 may send the modified initial establishment request (also referred to as the second connection establishment request) to the VPC gateway 103 through the VPC network 0 .
[0314] Before establishing a second connection with a client, the storage node 31 of the present application generates a reverse key 2 for reverse connection establishment in advance through S308b shown in FIG5a. In operation process 2 shown in FIG4a(2), when the storage node 31 actively establishes a connection with the client 1, the reverse key 2 can be used to determine to which client and which port the connection request should be sent. In the related art, however, the storage node 31 is unable to generate a reverse key 2 when establishing a connection with a client, and thus cannot determine to which virtual instance the connection establishment request should be sent.
[0315] S401b , the storage node 31 sends session information 2 related to the reverse key 2 to the VPC gateway 103 .
[0316] Among them, as shown in 4a(2), the session information 2 can be represented by sip1:sport2—vpc1:cip1:cport2. The session information 2 can express the mapping relationship of the virtual address between the second connected storage node and the virtual instance, here is the mapping relationship between the storage node 31 with a physical IP of sip1 and a port number of port2 and the client 1 with a virtual IP of vpc1:cip1 and a port number of cport2.
[0317] Of course, in some embodiments, the session message 2 related to the second connection synchronized by the storage node 31 to the VPC gateway 103 may also be the aforementioned reverse key 2 and / or forward key 2.
[0318] S401a and S401b may be executed separately or combined in a message, which is not limited here.
[0319] S402 : The VPC gateway 103 allocates client 1 to the second connection establishment request according to session information 2 .
[0320] In related technologies, when a storage node initiates a connection establishment request to a virtual instance, the VPC gateway is not configured with an allocation policy for allocating computing nodes or virtual instances to requests from the storage node, so that the corresponding virtual instance cannot be allocated to the storage node's connection establishment request, and thus the reverse connection from the storage node to the virtual instance in the computing node cannot be achieved.
[0321] In the embodiment of the present application, before the storage node 31 establishes a connection with the client, a reverse key 2 is generated in advance, and the reverse key 2 can be used to perform address conversion on the connection request of the storage node 31, specifically, converting the physical address into a virtual address. Then, the storage node 31 can send the second connection establishment request after the address conversion to the VPC gateway 103, and synchronize the session information 2 related to the reverse key 2 to the VPC gateway 103. Then, when the VPC gateway 103 distributes the second connection establishment request received from the storage node 31 to the client, it can determine the source IP (here is sip1) and the source port number (here is sport2) in the second connection establishment request, match them with the session information 2, and thus, according to the synchronized session information 2, use the client 1 with the corresponding virtual address vpc1:cip1:cport2 as the object to establish a connection with the storage node 31 with the physical address sip1:sport2.
[0322] Optionally, the VPC gateway 103 may store the session information 2 synchronized by the storage node 31 .
[0323] In this way, after storage node 31 actively establishes a second connection with client 1, VPC gateway 103 can reuse the stored session information 2 related to the second connection to forward packets sent from client 1 via the second connection to the corresponding port of storage node 31, and forward packets sent from storage node 31 via the second connection to the response port of client 1. This ensures that packets of the same connection can be distributed by VPC gateway 103 to the accurate ports at both ends of the connection.
[0324] S403 , the VPC gateway 103 forwards the second connection establishment request to the client 1 .
[0325] Among them, VPC gateway 103 can distribute the second connection establishment request matching session information 2 to port 1 (port number cport1) of client 1 with virtual IP vpc1:cip1 according to session information 2. In this way, after VPC gateway 103 receives the request from the storage node, it can also use the session information synchronized by the storage node to determine which client the request should be distributed to, thereby realizing the reverse connection from the storage node to the client.
[0326] S404: The second connection between the client 1 and the storage node 31 is established successfully.
[0327] The second connection is the connection between cport2 of client 1 with a physical IP address of cip1 in VPC network 1 and port2 of storage node 31 with a physical IP address of sip1 in VPC network 0.
[0328] S405 : The storage node 31 modifies the first message for querying the lock notification port on the second connection according to the reverse key 2 to obtain a second message.
[0329] After the second connection is successfully established, the storage node 31 may generate a first message to be sent to the client 1 (whose global physical address is represented as cip100:cport2) for querying the lock notification port.
[0330] As shown in Figure 6b, the header of the first message is represented by sip1:sport2->cip100:cport2 (the protocol number is not shown here). In the schematic expression of the header in each embodiment of the present application, the left side of "->" represents the source IP and source port number, and the right side of "->" represents the destination IP and destination port number.
[0331] The structural diagram of the message header of the first message can be referred to the above Table 4a, which will not be repeated here.
[0332] In S405, the storage node 31 can use the source IP, source port number, destination IP, and destination port number in the message header of the first message to query the flow table information and determine whether the values of the above four types of information in the message header hit the Key part in the flow table information. As shown in Table 3b above, the values of the four table items in the Key part of the reverse key2 shown in Table 3b are the same as the values of the four information in the message header of the first message. The storage node 31 can determine that the first message hits the reverse key2 and can modify the values of the four types of information in the first message that match the Key part of the reverse key2 to the values of the four table items in the corresponding Value part of the reverse key2. In this way, as shown in Figure 6b, the message header in the first message (which can be called the second message) modified in S406 is indicated by sip1:sport2->vpc1:cip1:cport2, where the source IP in the message header is sip, the source port number is sport2, the destination IP is vpc:cip1, and the destination port number is cport2.
[0333] S406 , the storage node 31 sends a second message for querying the lock notification port to the VPC gateway 103 , and the VPC gateway 103 forwards the second message to the client 1 according to the session information 2 .
[0334] The storage node 31 may send the second message after performing address conversion (from a physical address to a virtual address) using the reverse key2 to the VPC gateway 103 over the established second connection.
[0335] VPC gateway 103 can match the message header of the second message with the local session information. VPC gateway 103 can determine the source IP (here is sip1), source port number (here is sport2), destination IP (here is vpc1:cip1) and destination port number (cport2) of the second message, and match them with session information 2. Therefore, according to the synchronized session information 2, client 1 with the virtual address vpc1:cip1:cport2 in session information 2 is used as the distribution object of the second message, so as to forward the second message to port 2 of client 1 according to the session information 2.
[0336] S407 , client 1 sends a third message indicating the lock notification port ( cport3 ) to VPC gateway 103 , and VPC gateway 103 forwards the third message to storage node 31 according to session information 2 .
[0337] Among them, client 1 can respond to the above-mentioned second message, carry the port information used for lock notification (here, port 3 of client 1, represented by cport3) in the third message, and send the third message to VPC gateway 103 on the above-mentioned second connection.
[0338] As shown in Figure 6b, the message header of the third message is represented by vpc1:cip1:cport2->sip1:sport2 (the protocol number is not shown here). Among them, in the schematic expression of the message header in each embodiment of the present application, the left side of "->" represents the source IP and source port number, and the right side of "->" represents the destination IP and destination port number. The message content of the third message may include information indicating cport3. That is, client 1 can reply to storage node 31, notifying it that cport3 of client 1 is the lock notification port.
[0339] Since the VPC gateway 103 synchronizes the session information 2 shown in Figure 4a (2) from the storage node 31, the VPC gateway 103 can determine that the third message received from the client 1 matches the session information 2, and thus distribute the third message to the port 2 (represented by sport2) of the storage node 31 according to the session information 2.
[0340] In this way, the VPC gateway 103 side stores the session information 2 synchronized to the VPC gateway 103 by the storage node 31 when actively establishing the second connection. The session information 2 may include a mapping relationship between sip1:sport2 and vpc1:cip1:cport2. Then, when the client 1 replies to the storage node 31 on the second connection (for example, the third message mentioned above), the VPC gateway 103 can forward the third message to the destination address indicated by the third message according to the session information 2, which is sip1:sport2 here, and will not forward the third message to any other port other than port 2 of the storage node 31. This ensures that after the storage node 31 reversely establishes the second connection, the messages sent from the client 1 on the second connection to the storage node 31 can be correctly forwarded to port 2 of the storage node 31 corresponding to the second connection, so that messages on the same connection can be distributed by the VPC gateway 103 to the same port of the same storage node.
[0341] S408: The storage node 31 determines that the third message belongs to a preset type of message.
[0342] The execution principle and implementation details of this step are similar to those of S307 in FIG5 a , and are not described again here.
[0343] After S408 , in S409 , the storage node 31 modifies the third message on the second connection according to the forward key 2 to obtain a fourth message.
[0344] After receiving the third message, the storage node 31 queries the forward keys in the flow table information and determines that the message header of the third message hits the key portion of the forward key2 in the flow table information, thereby modifying the content of the message header of the third message that hits the above key portion to the value portion corresponding to the key portion in the forward key2. In this way, as shown in Figure 6b, the message header of the modified third message in S408 (which can be called the fourth message) is represented by cip100:cport2->sip1:sport2, where the source IP in the message header is cip100, the source port number is cport2, the destination IP is sip1, and the destination port number is sport2.
[0345] S410 , the storage node 31 processes the fourth message and obtains the lock notification port cport3 .
[0346] The storage node 31 may process the fourth message to obtain message content in the fourth message, which is the lock notification port cport3.
[0347] S411: The storage node 31 generates a forward key3 and a reverse key3 related to the third connection based on cport3.
[0348] When the storage node 31 determines that the third message is a message of a preset type, the lock notification port cport3 can be obtained based on the third message (for example, the fourth message obtained after modifying the message header), and thus based on cport3 and the source address and destination address in the third message or the fourth message (refer to the message header of the third message and the message header of the fourth message shown in Figure 6b), the forward key3 and reverse key3 related to the third connection to be established are generated.
[0349] As shown in FIG6b , the forward key3 is represented by expression 4a.
[0350] vpc1:cip1:cport3+sip1:sport2-》cip100:cport3+sip1:sport2, expression 4a
[0351] The physical meaning of the forward key3 represented by the above expression 4a is shown in Table 5a.
[0352] The principle of the forward key 3 shown in Table 5a is similar to that of the forward key 2 shown in Table 3a, and will not be repeated here.
[0353] Table 5a
[0354] As shown in FIG6b , the reverse key3 is represented by expression 4b.
[0355] sip1:sport2+cip100:cport3->sip1:sport2+vpc1:cip1:cport3, expression 4b
[0356] The physical meaning of the reverse key3 shown in the above expression 4b is shown in Table 5b.
[0357] Table 5b
[0358] The reverse key 3 shown in Table 5b has a similar principle to the reverse key 2 shown in Table 3b, and will not be described in detail here.
[0359] In this embodiment, multiple computing nodes in the computing cluster 101 are connected to multiple VPC networks, resulting in different VPC networks for different tenants. Then, when the IP addresses of the tenants' virtual instances are encoded in IPv4, the IP addresses of the virtual instances of different tenants may be the same, resulting in the problem that the physical IP address of the virtual instance cannot identify the virtual instance.
[0360] In this embodiment, the storage node 31 generates the forward key2 and reverse key2 associated with the second connection before establishing the second connection. Then, when the storage node 31 receives a message from the client 1 through the second connection, it can convert the source address in the message from a virtual address to a global physical address according to the forward key2, and then process the message after the address conversion. In addition, after generating the forward key2 and reverse key2, the storage node 31 can convert the destination address in the message from a global physical address to a virtual address according to the reverse key2 when sending a message to the client 1 through the second connection, and then send the message after the address conversion. In this way, when the client's physical IP address cannot identify the client, the storage node 31 can use the forward key2 and reverse key2 related to the second connection to directly convert the virtual address of client 1 and the global physical address of the message related to the second connection to determine whether the message is from or to be sent to client 1, without having to redetermine the global physical address of the source end (here is the client) of the message each time the message is received through the second connection, nor is there any need to redetermine the virtual address of the destination end (here is the client) of the message each time the message is sent through the second connection. This can eliminate the need to redetermine which virtual instance the message is from or sent to each time the message is sent and received through the second connection, thereby improving the sending and receiving efficiency and processing efficiency of messages between the storage node and client 1.
[0361] In this embodiment, when the storage node 31 determines that the message received from the client 1 through the second connection (here, the third message in S407) is a message of a preset type, the storage node 31 can use the mapping relationship between the physical IP address of the client 1 and the global physical IP address (here, the mapping between cip1 and cip100) to determine the mapping relationship between the virtual address of the client 1 and the global physical IP address (here, the mapping between vpc1:cip1 and cip100), thereby generating the forward key3 and reverse key3 related to the third connection to be established next time. The forward key3 and reverse key3 can express the address conversion relationship between the source and destination ends of the third connection. Before actively establishing the third connection with the client 1, the storage node 31 generates the flow table information required for the third connection in advance, here the forward key3 and reverse key3, so as to facilitate the use of the flow table information to enable the storage node 31 to actively establish a connection with the client 1.
[0362] Following FIG. 4a (2), FIG. 5b, and FIG. 6b, the process of this embodiment is described below with reference to FIG. 4a (3), FIG. 5c, and FIG. 6c.
[0363] The principles and effects of the implementation process of this embodiment are the same as those of the process from S400 to S406 shown in FIG. 5 b in the previous embodiment. The only difference is the messages processed by the storage node. The following briefly describes the processing process of this embodiment. For specific implementation details, please refer to the detailed description of the previous embodiment and will not be repeated here.
[0364] Figure 5c exemplarily shows the detailed implementation process of operation process 3 shown in Figure 4a (3) and the operation steps of the method of the present application related to operation process 3. Figure 6c exemplarily shows the schematic content of the message header in the process shown in Figure 5c.
[0365] In conjunction with FIG. 3a and FIG. 4b , please refer to FIG. 5c and FIG. 6c . As shown in FIG. 5c , S500 to S506 shown in FIG. 5c are operations subsequent to S301 to S308b shown in FIG. 5a and S400 to S411 shown in FIG. 5b . As shown in FIG. 5c , after the steps shown in FIG. 5b , the method of the present application may further include the following steps:
[0366] S500: Modify the initial establishment request of the third connection according to the reverse key3.
[0367] Table 6a is a schematic diagram showing the structure of the message header of the initial establishment request of the third connection.
[0368] The message header is represented by sip1:sport2->cip100:cport3.
[0369] Table 6a
[0370] S501a , the storage node 31 sends a request to establish a third connection to the VPC gateway 103 .
[0371] S501b , the storage node 31 sends the session information 3 related to the reverse key 3 to the VPC gateway 103 .
[0372] S502 : VPC gateway 103 allocates client 1 to the third connection establishment request according to session information 3 .
[0373] Optionally, the VPC gateway 103 may store the session information 3 synchronized by the storage node 31 .
[0374] S503 , the VPC gateway 103 forwards the request to establish the third connection to the client 1 .
[0375] S504: The third connection between the client 1 and the storage node 31 is established successfully.
[0376] S505 : The storage node 31 modifies the fifth message on the third connection used to notify that the requested lock has been unlocked according to the reverse key 3 to obtain a sixth message.
[0377] S506 , the storage node 31 sends a sixth message for notifying that the requested lock has been unlocked to the VPC gateway 103 , and the VPC gateway 103 forwards the sixth message to the client 1 according to the session information 3 .
[0378] In this embodiment of the present application, unlike the previous embodiment, in which the port number of client 1 in reverse key 2 used by storage node 31 when actively establishing a second connection with client 1 is a port number agreed upon in the protocol, in this embodiment of the present application, when storage node 31 actively establishes a third connection with client 1, the port number of client 1 in reverse key 3 used is the port number that storage node 31 actively obtained from client 1 through the previous second connection actively established with client 1. This port number of client 1 can be used to transmit a lock release message (e.g., the sixth message in S506).
[0379] The storage node of this embodiment can use the previous connection actively established with client 1 to obtain the address information required when it actively establishes the next connection with client 1, thereby ensuring that the next connection established can be used to transmit the lock release message, avoiding the situation where the established connection cannot be used to transmit the target information (such as the lock release message).
[0380] Similarly, in some scenarios, when client 1 replies to storage node 1 on the third connection, storage node 1 can determine that the message header can hit forward key 3, and thus adjust the source address of the message according to forward key 3 (from virtual address to physical address), and then perform process distribution and other processing on the adjusted message. The specific details will not be repeated here. The method of using forward key 3 is similar to that of forward key 2 and forward key 1.
[0381] In some embodiments, when the storage node 31 establishes the second connection or the third connection, the session message synchronized to the VPC gateway 103 may also be the forward key2 and reverse key2 associated with the second connection, or the forward key3 and reverse key3 associated with the third connection.
[0382] For example, referring to Figures 6a and 6b, since the forward key and reverse key corresponding to the same connection have the same address for the storage node, taking the second connection as an example, after the second connection is actively established by storage node 31 using reverse key 2, VPC gateway 103 can use forward key 2 to forward the message from port 2 of client 1 to port 2 of storage node 31 corresponding to the second connection, rather than sending it to other ports of storage node 31. In this way, after storage node 31 establishes a reverse connection, subsequent messages from client 1 on the connection can be distributed by VPC gateway 103 to the same storage node.
[0383] It should be understood that in the above example 1, the storage node supports information parsing of the VPC network as an example. In other words, the storage node supports removing the vpcID in the received message to determine the physical IP address of the client.
[0384] In Example 1 above, before actively establishing a connection with Client 1, the storage node 31 of the present application can use the message received from the connection already established with Client 1 to generate the flow table information needed for the next connection to be actively established. The flow table information may include the mapping between the virtual address vpc1:cip1 of Client 1 and the physical address (here, the global physical IP address cip100). Therefore, when the storage node 31 initiates a request to establish a connection, the physical address of Client 1 in the request can be converted into a virtual address according to the mapping in the flow table information, and then the request is sent; and the storage node 31 can send the mapping between the virtual address of Client 1 related to the connection and the virtual address (or physical address) of the storage node 31 as session information to the VPC gateway 103.
[0385] In this way, when the storage node actively establishes a connection with the client 1, the VPC gateway 103 can forward the message of the corresponding storage node according to the session message related to the connection synchronized from the storage node 31, thereby realizing the reverse connection of the storage node to the client and realizing the message forwarding after the reverse connection.
[0386] In Example 1 above, after the storage node 31 actively establishes a connection with the client 1 (e.g., the second connection or the third connection mentioned above), the storage node 31 can identify the message to be sent or received as the message on the connection (e.g., the request message of the client 1 or the response message of the storage node 31) by querying the forward key and reverse key associated with the corresponding connection, so as to facilitate the distribution of the request message and response message on the connection to the same process for processing. Among them, the storage node 31 can distribute messages (e.g., request messages, response messages) of different connections (e.g., the first connection, the second connection, and the third connection are different connections) to different processes for processing.
[0387] For example, after the above-mentioned second connection is successfully established, the client 1 sends a message to the storage node 31 on the second connection. The storage node 31 can then determine that the received message hits the forward key2, indicating that the message is a message on the second connection corresponding to the reverse key2. The storage node 31 can then use the forward key2 to modify the source address of the message from vpc1:cip1:cport2 to cip100:cport2, and distribute the modified message to the process related to the second connection (for example, process 1) for processing. When the storage node 31 sends a message to the client 1 on the second connection, the message can hit the reverse key2, indicating that the message is a message on the second connection corresponding to the reverse key2. The storage node 31 can then use the reverse key2 to modify the destination address of the message from cip100:cport2 to vpc1:cip1:cport2, and distribute the modified message to the process related to the second connection (for example, the above-mentioned process 1) for processing.
[0388] Example 2
[0389] The implementation process, principles, and effects of Example 2 are largely the same as those of Example 1 above. The difference is that in Example 2, the virtual address of the virtual instance in each computing node in the computing cluster 101 shown in Figure 3a can be encoded in IPv6. For example, the virtual address vpc1:cip1 of the virtual instance 1 running in the computing node 11 of tenant A is encoded in IPv6. In this way, the virtual addresses of virtual instances of different tenants are different. Among them, the virtual address may include the physical IP address of the virtual instance 1 (represented by cip1) and the ID of the VPC network 1 to which the virtual instance 1 belongs (represented by vpc1).
[0390] In this way, the virtual address of the virtual instance encoded in IPv6 can identify the virtual instance, and the storage node 31 can use the virtual address of the source end in the message from the client 1 to identify the client 1 without converting the physical IP address of the client 1 into a global physical IP address to identify the client 1.
[0391] Because the virtual address of client 1 can be used to uniquely identify client 1 within storage node 31, unlike Example 1 above, in Example 2, storage node 31 does not need to generate forward key 1 to forward key 3, and reverse key 1 to reverse key 3, nor does it need to use the corresponding forward key and reverse key to modify the relevant connected messages (specifically, convert the virtual address to the physical address). Therefore, the rest of the process in Example 2 is similar to that in Example 1.
[0392] However, in this example 2, the storage node 31 can still use the message received from the previous connection with the client 1 to generate session information related to the next connection actively established by the client 1, such as session information 2 related to the second connection, or session information 3 related to the third connection to synchronize to the VPC gateway 103.
[0393] In this way, in this example 2, before the storage node 31 actively establishes a connection with the client 1, it does not need to generate a mapping between the virtual address of the client 1 and the global physical address (such as the above-mentioned forward keys and reverse keys). It only needs to generate the address mapping relationship between the storage node 31 and the client 1 related to the connection to be established (such as the above-mentioned session information 2 and session information 3), thereby reducing the address conversion operation of the storage node 31, improving the speed at which the storage node actively establishes a connection with the client, and improving the storage node's processing efficiency of messages received from or sent to the client.
[0394] Example 3
[0395] The implementation process, principles, and effects of Example 3 are largely the same as those of Example 1 above. The difference is that, as shown in Figure 3b of Example 3, the computing cluster 101 and the storage cluster 102 do not interact through the TCP protocol as shown in Figure 3a, but interact through the RDMA protocol over the VPC network, thus bypassing the VPC gateway 103.
[0396] Different from Example 1 above, in Example 3, the interactions between storage node 31 and client 1 do not go through VPC gateway 103. Moreover, when storage node 31 actively establishes a connection with client 1, there is no need to synchronize the pre-generated session message to VPC gateway 103. Storage node 31 only needs to establish a connection with client 1 according to the session message.
[0397] In this way, when the computing cluster 101 and the storage cluster 102 interact through the RDMA protocol, they do not pass through the VPC gateway in the VPC network (therefore, the VPC gateway 103 shown in Figure 3a is not shown in Figure 3b, or the VPC gateway may not be deployed in the VPC network), so that the computing cluster 101 and the storage cluster 102 can interact directly through the RDMA protocol.
[0398] In the direct access mode, both the storage cluster 102 and the computing cluster 101 support the RDMA protocol, making the address information of both parties transparent to each other. In other words, the storage node and the virtual instance running in the computing cluster 101 can each determine the destination address of their message without the need for the VPC gateway to distribute the destination of their message. In order to enable the storage node 31 to actively establish a connection with the client 1 and actively send a message on the connection to provide information that the access lock of the target file has been released, the storage node and the client can bypass the VPC gateway 103 when interacting, and instead conduct direct access through the RDMA protocol. This satisfies the high-speed access of multiple tenants to the data in the storage cluster 102 in the cloud scenario, improves data access performance, and solves the problem of the storage node actively connecting to the virtual instance in the computing cluster 101.
[0399] Example 4
[0400] Example 4 can be a combination of the above-mentioned Example 2 and Example 3. In Example 4, the virtual address of the virtual instance in each computing node in the computing cluster 101 shown in Figure 3a can be encoded in IPv6, and the storage cluster 102 and the computing cluster 101 communicate with each other in the VPC network through the RDMA protocol without passing through the VPC gateway.
[0401] In this example 4, before the storage node 31 actively establishes a connection with the client 1, it is not necessary to generate a mapping between the virtual address of the client 1 and the global physical address (such as the above-mentioned forward keys and reverse keys), nor is it necessary to synchronize the address mapping relationship between the storage node 31 and the client 1 related to the connection to be established (such as the above-mentioned session information 2 and session information 3) to the VPC gateway when the storage node 31 actively establishes a connection with the client 1. This can not only reduce the address conversion operations of the storage node 31, but also improve the speed at which the storage node actively establishes a connection with the client, as well as improve the processing efficiency of messages received from or sent to the client. Moreover, the storage node 31 connects to and accesses the client 1 through the RDMA protocol, which can improve data access performance and meet the high-speed access requirements of a large number of tenants to the data of the storage node.
[0402] Example 5
[0403] In Examples 1 to 4 above, the virtual instances in the storage cluster 102 and the computing cluster 101 all use the NFS V3 protocol to meet the shared access requirements of multiple tenants of the computing nodes to the same file directory in the storage nodes.
[0404] The implementation process, principles and effects of this Example 5 (specifically including Examples 5.1 to 5.4) are the same as most of the contents of Examples 1 to 4 above. The difference from the application scenario of Examples 1 to 4 above is Scenario 1 above, which meets the shared access requirements of multiple tenants of computing nodes to the same file directory in the storage node.
[0405] The application scenario of Example 5 can be the same as Scenario 2 described above. That is, in Example 5, the virtual instances in computing cluster 101 can be private clients, and the virtual instances in computing cluster 101 and the storage nodes in storage cluster 102 can use private protocols. In Example 5, storage node 31 can actively access client 1 (here, a private client) to synchronize the metadata of the target file with client 1. Client 1 can then use the metadata synchronized by storage node 31 to access the target file.
[0406] The following describes some scenarios in which a storage node synchronizes metadata with a virtual instance (here, a private client) in a computing node.
[0407] The storage nodes in the storage cluster 102 shown in Figure 1 can store data and manage and store metadata information of the data. In some scenarios, the storage nodes need to actively push the metadata information of the data to the client so that the client can cache the metadata information.
[0408] For example, in scenario A, the storage location of file data changes from one storage node to another within storage cluster 102, causing the metadata information of the file data to be updated. To ensure that the client can correctly access the data in storage cluster 102, the storage node needs to proactively notify the client of the updated metadata information of the file data so that the client can use the updated metadata to access the file data from storage cluster 102.
[0409] In scenario B, for example, a client frequently accesses a file in storage cluster 102. To accelerate the client's access to the file stored in storage cluster 102, storage cluster 102 can push the frequently accessed file to the client. To push the file, storage cluster 102 proactively queries the client's metadata, such as the directory space size and cache size, to push the file to the client's corresponding directory space.
[0410] Of course, in the scenario where the client and storage node use private protocols for data storage and access, there may be other scenarios besides scenario A or scenario B, which requires the storage node to actively access the client to synchronize metadata information. There is no restriction here.
[0411] Then in the scenario described in Example 5 where both the client and the storage node use private protocols for data storage and access, in order to enable the storage node to actively access the client to synchronize metadata information, the storage node of the present application can still adopt a similar scheme to Examples 1 to 4 to enable the storage node to actively establish a connection with the private client, thereby enabling the storage node to actively send a message for synchronizing metadata information to the private client on the connection, so that the private client can use the synchronized metadata information to access the target file from the storage node, wherein the target file can be a file pre-existing on the storage node, or a file written to the storage node by other private clients, and there is no restriction here.
[0412] Specifically, in the application scenario of Example 5, four implementation solutions, Examples 5.1 to 5.4, can be provided to solve the problem that under a private protocol, the storage node cannot actively send messages to the client to synchronize metadata information.
[0413] Example 5.1
[0414] The implementation process, principles and effects of this example 5.1 are mostly the same as those in the above example 1. The difference is that before the storage node 31 actively connects to the client 1, the message of the preset type received using the first connection established with the client 1 is not a lock request under the NAS protocol, nor is it the first message for querying the lock notification port, but a message of a specified type under the private protocol.
[0415] Furthermore, in the scenario where the virtual instance is a private client, in Example 5.1, storage node 31 only needs to actively establish a connection with client 1 once to push the target file's metadata to client 1 using this actively established connection, without having to actively establish two connections. The port number of client 1 determined during the active connection establishment can be the port number used for metadata transmission as agreed upon in the protocol, without having to obtain it from client 1.
[0416] In this way, the data center network of the present application supports the deployment of private clients in the computing cluster 101, and the storage nodes in the storage cluster 102 can actively establish a connection with the private clients. Through the actively established connection, the storage nodes can synchronize the metadata information required by the private clients to access the target files to the private clients, such as the metadata information of the target files that the private clients access frequently, or the metadata information that has changed, etc. In this way, the private clients can use the synchronized metadata to quickly or accurately access the target files that are accessed frequently or whose metadata has changed.
[0417] Example 5.2
[0418] The implementation process, principles, and effects of this Example 5.2 are largely the same as those of Example 2 above. The difference between Example 5.2 and Example 2 is the same as the difference between Example 5.1 and Example 1 described in the previous embodiment, which is mainly reflected in the application scenario being a private protocol. The details will not be repeated here.
[0419] In this example 5.2, the computing cluster 101 supports the deployment of private clients, and the virtual address of the private client is encoded in IPv6. Before the storage node 31 actively establishes a connection with the client 1, it does not need to generate a mapping between the virtual address of the client 1 and the global physical address (such as the above-mentioned forward keys and reverse keys). It only needs to generate the address mapping relationship between the storage node 31 and the client 1 related to the connection to be established (such as the above-mentioned session information 2 and session information 3). This can reduce the address conversion operation of the storage node 31, improve the speed at which the storage node actively establishes a connection with the private client, and improve the storage node's processing efficiency of messages received from or sent to the client.
[0420] Example 5.3
[0421] The implementation process, principles, and effects of Example 5.3 are largely the same as those of Example 3 above. The difference between Example 5.3 and Example 3 is the same as the difference between Example 5.1 and Example 1 described in Example 5.1, which is mainly reflected in the application scenario of a private protocol. The details are not repeated here.
[0422] In this example 5.3, the computing cluster 101 supports the deployment of private clients. The interactions between the storage node 31 and the client 1 of the private protocol do not go through the VPC gateway 103. In addition, when the storage node 31 actively establishes a connection with the client 1 of the private protocol, there is no need to synchronize the pre-generated session message to the VPC gateway 103. The storage node 31 only needs to establish a connection with the client 1 of the private protocol according to the session message. This can improve the access performance of the private client to the data of the storage node in the scenario where the private client is deployed in the computing node.
[0423] Example 5.4
[0424] The implementation process, principles, and effects of Example 5.4 are largely the same as those of Example 4 above. The difference between Example 5.4 and Example 4 is the same as the difference between Example 5.1 and Example 1 described in Example 5.1, which is mainly reflected in the application scenario of a private protocol. The details are not repeated here.
[0425] In this example 5.4, the computing cluster 101 supports the deployment of private clients. Before the storage node 31 actively establishes a connection with the client 1 (the private client in this example 5.4), it is not necessary to generate a mapping between the virtual address of the client 1 and the global physical address (such as the above-mentioned forward keys and reverse keys). It is also not necessary to synchronize the address mapping relationship between the storage node 31 and the client 1 related to the connection to be established (such as the above-mentioned session information 2 and session information 3) to the VPC gateway when the storage node 31 actively establishes a connection with the client 1. This not only reduces the address conversion operations of the storage node 31, but also improves the speed at which the storage node actively establishes a connection with the client, as well as improves the processing efficiency of messages received from or sent to the private client. Moreover, the storage node 31 connects to and accesses the private client through the RDMA protocol, which can improve the data access performance of the private client to the storage cluster 102.
[0426] Example 6
[0427] The implementation process, principles, and effects of Example 6 are largely the same as those of Example 2 or Example 5.2 above. The difference between Example 6 and Example 2 or Example 5.2 above is that the network for communication between the compute nodes and the storage nodes in Example 2 or Example 5.2 above is a virtual network (such as a VPC network), while in Example 6, the network for communication between the compute nodes and the storage nodes is a physical network.
[0428] When the number of tenants in the computing cluster is small, the computing cluster 101 and the storage cluster 102 shown in Figure 1 can be connected through a physical network. That is, the business network for interaction between computing nodes and storage nodes can be a physical network, and the symmetric gateway of this application can be deployed in the physical network.
[0429] In Example 6, unlike Example 2 or Example 5.2 above, the computing nodes and storage nodes in Example 6 interact through a physical network rather than a virtual network. Therefore, the physical IP addresses of the virtual instances of different tenants of the computing cluster 101 are different, and each virtual instance can be identified.
[0430] Therefore, different from the above example 2 or example 5.2, in this example 6, the storage node 31 identifies the client 1 with the physical address of the client 1. In this example 6, before establishing an active connection with the client 1, the storage node 31 does not need to generate a mapping between the virtual address of the client 1 and the global physical address (such as the above-mentioned forward keys and reverse keys). It only needs to generate a mapping relationship between the physical addresses of the storage node 31 and the client 1 related to the connection to be established (a kind of session information), thereby reducing the address conversion operation of the storage node 31, and improving the speed of the storage node actively establishing a connection with the client, as well as improving the storage node's processing efficiency of messages received from or sent to the client. And the storage node 31 can use the message received from the previous connection established with the client 1 before the connection is established to generate the above-mentioned session information for establishing this connection. In a scenario with fewer tenants, when there is a gateway that interacts between the computing node and the storage node, active access of the storage node to the computing node can be achieved.
[0431] For the storage node 31 in Examples 1 to 6 above, FIG7 is an illustrative block diagram of the structure of the storage node 31. The structures of other storage nodes in the storage cluster 102 are similar to those described in FIG7 and are not described again here.
[0432] As shown in Figure 7, the storage node 31 may include but is not limited to: a central processing unit (CPU) and a data processing unit (DPU). For example, the CPU and the DPU may be connected via a PCIe (peripheral component interconnect express) port.
[0433] The CPU may include but is not limited to: a Network Attached Storage Server (NAS Server).
[0434] The DPU may include but is not limited to: a data processing logic unit and a data control logic unit.
[0435] For example, the NPU and SPU may be implemented as software modules.
[0436] As shown in FIG. 7 , the NAS Server may include a message type configuration module 10 .
[0437] The NPU may include but is not limited to: a message type matching module 11 , a flow table configuration module 12 , and a message modification module 13 .
[0438] The SPU may include but is not limited to: a flow table matching module 14 and a message processing module 15 .
[0439] Among them, the message type configuration module 10 can be used to configure the keyword (such as address offset) and value (such as encoding information) of the preset type of message for the message type matching module 11 through a configuration management program or configuration file, so that the message type matching module 11 can be configured with the keyword and value of the preset type of message for use in identifying the message type.
[0440] The message type matching module 11 can be used to parse the message received from the network or to be sent according to the pre-configured keywords and values of the preset type of message, and match the above keywords and values on the parsed message to determine whether the message is a preset type of message.
[0441] The flow table configuration module 12 can be used to configure flow table information (such as the various forward keys, reverse keys, etc. mentioned above) for the flow table matching module 14 based on the message when the message type matching module 11 determines that the corresponding message is a message of a preset type. In this way, the flow table matching module 14 can be configured with flow table information.
[0442] The message matching module 14 is configured to determine whether the message hits the flow table according to the configured flow table information when the message type matching module 11 determines that the corresponding message is a message of a preset type;
[0443] The message modification module 13 can be used to modify the address in the message according to the hit flow table information when the message matching module 14 determines that the corresponding message hits the flow table, and send the modified message to the message processing module 15.
[0444] The message processing module 15 may be configured to receive messages from the network or from the message modification module 13, and to process the received messages and then report the processed messages to the NAS Server for processing.
[0445] It should be understood that FIG7 is merely an illustrative schematic diagram of the framework structure of the storage node 31. Each storage node in the storage cluster 102 of the present application may have more or fewer components than shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in FIG7 may be implemented in hardware, including one or more signal processing and / or application-specific integrated circuits, software, or a combination of hardware and software.
[0446] The schematic diagram of the framework structure of the storage node 31 in Figure 7 takes the storage node 31 as an example to describe the NAS protocol. In other embodiments, the storage node 31 may also be a storage node of a private protocol, and its structure may differ from that of Figure 7, which is not limited here.
[0447] The functions and effects achieved by the storage node 31 are similar to those of the storage node 31 described in the method embodiments of the above-mentioned implementation modes, and are not described in detail here.
[0448] In one possible embodiment, the present application provides a storage node. Figure 8a is a schematic structural diagram of the storage node 802 shown as an example. The storage node 802 is used to communicate with multiple computing nodes through a virtual network, and a first virtual instance is running in the multiple computing nodes. The storage node 802 includes: a storage module 8021, which is used to pre-store target files, or to receive and store target files from the multiple computing nodes 801; a first connection establishment module 8022, which is used to actively request to establish a first connection with the first virtual instance; a first sending module 8023, which is used to send a first message to the first virtual instance through the first connection, and the first message is used to provide target information for accessing the target file; an access module 8024, which is used to access the target file in response to receiving a second message sent by the first virtual instance based on the first message.
[0449] In a possible implementation, the target information is used to indicate that the access lock to the target file has been released; or, the target information is used to provide metadata of the target file, wherein different files have different metadata.
[0450] In a possible implementation, the storage node 802 further includes: a first receiving module, configured to receive a third message from the first virtual instance through a second connection; and a first connection establishing module 8022, configured to actively request establishment of a first connection with the first virtual instance based on the third message.
[0451] In one possible implementation, the multiple computing nodes 801 run the first virtual instances of multiple tenants, and the multiple computing nodes 801 running the first virtual instances of different tenants run in different virtual networks, and the target information is used to indicate that the access lock to the target file has been released.
[0452] In one possible embodiment, the storage node 802 also includes: a second receiving module, used to receive a fourth message from the first virtual instance through a third connection, wherein the fourth message is used to provide information requesting an access lock for the target file; a first determination module, used to determine, in response to the fourth message, that the access lock of the target file is occupied by the second virtual instance running in the multiple computing nodes 801; and the first connection establishment module 8022, specifically used to actively request to establish the first connection between the first virtual instance when it is determined that the access lock of the target file is released.
[0453] In one possible embodiment, the storage node 802 also includes: a second connection establishment module, which is used to actively request to establish the second connection between the first virtual instance based on the fourth message when it is determined that the access lock of the target file is released; a second sending module, which is used to send a fifth message to the first virtual instance through the second connection, wherein the fifth message is used to query the port number of the target information; and the third message is used to provide the port number of the first virtual instance.
[0454] In one possible embodiment, the multiple computing nodes 801 run the first virtual instances of multiple tenants, and the multiple computing nodes 801 running the first virtual instances of different tenants run in different virtual networks. The storage node 802 also includes: a second determination module, used to determine the original IP address of the first virtual instance based on the third message; a third determination module, used to determine the global IP address corresponding to the original IP address, wherein the global IP address is used to identify the first virtual instance running in the virtual network; the first connection establishment module 8022, specifically used to actively request to establish a first connection with the first virtual instance based on the mapping relationship between the original IP address and the global IP address.
[0455] In a possible implementation, the first sending module 8023 is specifically configured to send the first message to the first virtual instance through the first connection based on the mapping relationship.
[0456] In a possible implementation, the storage node 802 is configured to interactively communicate with the multiple computing nodes in the virtual network via an RDMA protocol.
[0457] In one possible embodiment, the present application provides a data center. Figure 8b is a schematic structural diagram of an exemplary data center 800. Please refer to Figure 8b. The data center 800 includes multiple computing nodes 801 and the storage node 802 described in each of the above embodiments, wherein the multiple computing nodes 801 communicate with the storage node 802 through a virtual network. In addition, the data center 800 also includes a gateway 803 deployed in the virtual network, and the multiple computing nodes 801 interact with the storage node 802 through the gateway 803. As shown in Figure 8b, the storage node 802 also includes: a third sending module 8025 for sending the first session information to the gateway; the first connection establishment module 8022, specifically for sending the first connection establishment request to the gateway; the gateway 803 includes: a forwarding module 8031 for forwarding the first connection establishment request to the first virtual instance based on the first session information.
[0458] The methods and effects achieved by the storage nodes and data centers of the above-mentioned embodiments are similar to the effects of the methods of the above-mentioned embodiments, and will not be repeated here.
[0459] Among them, the above modules can all be implemented by software, or can be implemented by hardware. Among them, the module is an example of a software functional unit, and the above module may include code running on a storage node. Among them, the storage node may be a physical host (storage device). Further, the above storage node may be one or more. For example, the storage module 8021 may include code running on multiple physical hosts. It should be noted that the multiple physical hosts used to run the code may be distributed in the same region (region) or in different regions. Furthermore, the multiple physical hosts used to run the code may be distributed in the same availability zone (AZ) or in different AZs, and each AZ includes one data center or multiple geographically close data centers. Among them, usually a region can include multiple AZs.
[0460] Similarly, the multiple physical hosts used to run the code can be distributed within the same VPC or across multiple VPCs. Typically, a VPC is set up within a region. Cross-region communication between two VPCs within the same region, or between VPCs in different regions, requires the aforementioned gateway to be set up within each VPC, enabling interconnection between VPCs via the gateway.
[0461] As an example of a hardware functional unit, a module may include at least one storage device, such as a server. Alternatively, the module may be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0462] The multiple storage devices included in the above modules can be distributed in the same region or in different regions. The multiple storage devices included in the above modules can be distributed in the same AZ or in different AZs. Similarly, the multiple storage devices included in the above modules can be distributed in the same VPC or in multiple VPCs. The multiple storage devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, GALs, and other storage devices.
[0463] It should be noted that, in other embodiments, the above modules can be used to execute the corresponding steps in Figures 5a to 5c to implement all the functions of the data center 800.
[0464] This application also provides a storage device 900. As shown in Figure 9, storage device 900 includes a bus 902, a processor 904, a memory 906, and a communication interface 909. Processor 904, memory 906, and communication interface 909 communicate with each other via bus 902. Storage device 900 can be a server. It should be understood that this application does not limit the number of processors and memories in storage device 900.
[0465] Bus 902 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, for example. Buses may be classified as address buses, data buses, control buses, and the like. For ease of illustration, FIG9 shows a single line, but this does not imply a single bus or type of bus. Bus 902 may include a path for transmitting information between various components of storage device 900 (e.g., memory 906, processor 904, and communication interface 909).
[0466] The processor 904 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0467] The memory 906 may include volatile memory, such as random access memory (RAM). The processor 904 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0468] The memory 906 stores executable program code, and the processor 904 executes the executable program code to implement the functions of the aforementioned storage module, the first connection establishment module, the first sending module, the access module, and the like, thereby implementing the aforementioned access method, such as the access method shown in Figures 5a to 5c. In other words, the memory 906 stores instructions for executing the access method.
[0469] The communication interface 909 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the storage device 900 and other devices or a communication network.
[0470] The present application also provides a storage device cluster. The storage device cluster includes at least one storage device. The storage device can be a server, such as a central server, an edge server, or a local server in a local data center.
[0471] As shown in Figure 10, the storage device cluster includes at least one storage device 1000. The memory 1006 in one or more storage devices 1000 in the storage device cluster may store the same instructions for executing the above access method (eg, as shown in Figures 5a to 5c).
[0472] In some possible implementations, the memory 1006 of one or more storage devices 1000 in the storage device cluster may also store some instructions for executing the access method described above. In other words, the combination of one or more storage devices 1000 can jointly execute the instructions for executing the access method.
[0473] It should be noted that the memories 1006 in different storage devices 1000 in the storage device cluster can store different instructions, each used to perform a portion of the data center's functions. That is, the instructions stored in the memories 1006 in different storage devices 1000 can implement the functions of one or more of the aforementioned storage modules, such as the first connection establishment module, the first sending module, and the access module.
[0474] In some possible implementations, one or more storage devices in a storage device cluster may be connected to one or more computing devices in a computing device cluster via a network. The network may be a wide area network (WAN) or a local area network (LAN), etc. FIG. 11 illustrates a possible implementation. As shown in FIG. 11 , a computing device 1100A and a storage device 1100B are connected via a virtual network 1100C (e.g., a VPC). In this type of possible implementation, the memory 1106 in the storage device 1100B stores instructions for executing the functions of the aforementioned storage module, the first connection establishment module, the first sending module, the access module, and other modules.
[0475] It should be understood that the functionality of the computing device 1100A shown in FIG11 may also be implemented by multiple computing devices 1100. Similarly, the functionality of the storage device 1100B may also be implemented by multiple storage devices 1100.
[0476] Embodiments of the present application also provide another storage device cluster. The connection relationship between the storage devices in this storage device cluster can be similar to the connection methods of the storage device clusters described in Figures 9 and 11. However, the memory 1106 in one or more storage devices 1100 in this storage device cluster can store the same instructions for executing the aforementioned access method.
[0477] In some possible implementations, the memory 1106 of one or more storage devices 1100 in the storage device cluster may also store partial instructions for executing the access method. In other words, the combination of one or more storage devices 1100 can jointly execute instructions for executing the storage method.
[0478] It should be noted that the memory 1106 in different storage devices 1100 in the storage device cluster can store different instructions for executing part of the functions of the data center. In other words, the instructions stored in the memory 1106 in different storage devices 1100 can implement the functions of one or more devices in the data center.
[0479] The present application also provides a computer program product including instructions. The computer program product may be software or a program product including instructions that can be run on a storage device or stored on any available medium. When the computer program product is run on at least one storage device, the at least one storage device executes the access method described in the above embodiments.
[0480] The present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a storage device or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the storage device to execute the access method described in the above embodiment.
[0481] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the various embodiments of the present invention.
Claims
1. An access method, characterized in that: The data center includes a plurality of computing nodes and storage nodes, the plurality of computing nodes run a first virtual instance, the plurality of computing nodes interact with the storage nodes through a virtual network, and the method includes: The storage node stores the target file in advance, or the storage node receives and stores the target files from the plurality of computing nodes; The storage node actively requests to establish a first connection with the first virtual instance; The storage node sends a first message to the first virtual instance through the first connection, where the first message is used to provide target information for accessing the target file; In response to receiving the second message sent by the first virtual instance based on the first message, the storage node accesses the target file.
2. The method according to claim 1, characterized in that The target information is used to indicate that the access lock to the target file has been released; or, the target information is used to provide metadata of the target file, wherein different files have different metadata.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: The storage node receives a third message from the first virtual instance through a second connection; The storage node actively requests to establish a first connection with the first virtual instance based on the third message.
4. The method according to claim 3, characterized in that The plurality of computing nodes run first virtual instances of a plurality of tenants, the plurality of computing nodes running first virtual instances of different tenants run in different virtual networks, and the target information is used to indicate that an access lock to the target file has been released.
5. The method according to claim 4, characterized in that The method further comprises: The storage node receives a fourth message from the first virtual instance through a third connection, wherein the fourth message is used to provide information requesting access lock on the target file; The storage node determines, in response to the fourth message, that the access lock of the target file is occupied by the second virtual instance running in the plurality of computing nodes; The first connection is a connection with the first virtual instance that is actively requested to be established when the storage node determines that the access lock of the target file is released.
6. The method according to claim 5, characterized in that The method further comprises: When the storage node determines that the access lock of the target file is released, the storage node actively requests to establish the second connection with the first virtual instance based on the fourth message; The storage node sends a fifth message to the first virtual instance through the second connection, wherein the fifth message is used to query the port number for notifying the target information; The third message is used to provide the port number of the first virtual instance.
7. The method according to any one of claims 1 to 6, characterized in that: The plurality of computing nodes interact with the storage node via a gateway in the virtual network, and the method further comprises: The storage node sends first session information to the gateway; The storage node sends a request to establish the first connection to the gateway; The gateway forwards the first connection establishment request to the first virtual instance based on the first session information.
8. The method according to any one of claims 1 to 6, characterized in that The multiple computing nodes interact with the storage node in the virtual network through a remote direct memory access (RDMA) protocol.
9. The method according to any one of claims 3 to 8, characterized in that The plurality of computing nodes run first virtual instances of a plurality of tenants, and the plurality of computing nodes running first virtual instances of different tenants run in different virtual networks, and the method further includes: The storage node determines the original IP address of the first virtual instance based on the third message; The storage node determines a global IP address corresponding to the original IP address, wherein the global IP address is used to identify the first virtual instance running in the virtual network; The storage node actively requests to establish a first connection with the first virtual instance based on the mapping relationship between the original IP address and the global IP address.
10. The method according to claim 8, characterized in that The method further comprises: The storage node sends a first message to the first virtual instance through the first connection based on the mapping relationship.
11. A storage node, characterized in that: The storage node is used to communicate with multiple computing nodes through a virtual network, the first virtual instance is run in the multiple computing nodes, and the storage node includes: A storage module, used to pre-store target files, or to receive and store target files from the plurality of computing nodes; A first connection establishment module, used for actively requesting to establish a first connection with the first virtual instance; A first sending module, configured to send a first message to the first virtual instance through the first connection, wherein the first message is used to provide target information for accessing the target file; An access module is used to access the target file in response to receiving a second message sent by the first virtual instance based on the first message.
12. The storage node according to claim 11, characterized in that: The target information is used to indicate that the access lock to the target file has been released; or, the target information is used to provide metadata of the target file, wherein different files have different metadata.
13. The storage node according to claim 11 or 12, characterized in that: The storage node also includes: A first receiving module, configured to receive a third message from the first virtual instance through a second connection; The first connection establishing module is specifically configured to actively request to establish a first connection with the first virtual instance based on the third message.
14. The storage node according to claim 13, characterized in that: The plurality of computing nodes run first virtual instances of a plurality of tenants, the plurality of computing nodes running first virtual instances of different tenants run in different virtual networks, and the target information is used to indicate that an access lock to the target file has been released.
15. The storage node according to claim 14, characterized in that: The storage node also includes: A second receiving module, configured to receive a fourth message from the first virtual instance through a third connection, wherein the fourth message is used to provide information requesting access lock on the target file; A first determining module, configured to determine, in response to the fourth message, that the access lock of the target file is occupied by a second virtual instance running in the plurality of computing nodes; The first connection establishing module is specifically configured to actively request to establish the first connection with the first virtual instance when it is determined that the access lock of the target file is released.
16. The storage node according to claim 15, characterized in that: The storage node also includes: a second connection establishing module, configured to actively request to establish the second connection with the first virtual instance based on the fourth message when determining that the access lock of the target file is released; A second sending module, configured to send a fifth message to the first virtual instance through the second connection, wherein the fifth message is used to query a port number for notifying the target information; The third message is used to provide the port number of the first virtual instance.
17. The storage node according to any one of claims 13 to 16, characterized in that: The plurality of computing nodes run first virtual instances of a plurality of tenants, and the plurality of computing nodes running first virtual instances of different tenants run in different virtual networks, and the storage node further includes: A second determination module, configured to determine an original IP address of the first virtual instance based on the third message; a third determining module, configured to determine a global IP address corresponding to the original IP address, wherein the global IP address is used to identify the first virtual instance running in the virtual network; The first connection establishing module is specifically configured to actively request to establish a first connection with the first virtual instance based on a mapping relationship between the original IP address and the global IP address.
18. The storage node according to claim 17, characterized in that: The first sending module is specifically configured to send the first message to the first virtual instance through the first connection based on the mapping relationship.
19. The storage node according to any one of claims 11 to 18, characterized in that: The storage node is used to communicate with the multiple computing nodes in the virtual network through a remote direct memory access (RDMA) protocol.
20. A data center, comprising the storage node and computing node according to any one of claims 11 to 18, characterized in that: The data center further includes a gateway deployed in the virtual network, and the plurality of computing nodes interact with the storage nodes through the gateway; The storage module also includes: A third sending module, used for sending the first session information to the gateway; The first connection establishment module is specifically configured to send a request to establish the first connection to the gateway; The gateway comprises: A forwarding module is used to forward the establishment request of the first connection to the first virtual instance based on the first session information.
21. A storage node, characterized in that: The storage node includes a processor and a memory, the memory stores instructions, and the processor is used to execute the instructions stored in the memory. When the instructions are executed by the processor, the storage node and multiple computing nodes communicate through a virtual network, and the first virtual instance runs in the multiple computing nodes; When the instruction is executed by the processor, the storage node performs the following steps: The storage node stores the target file in advance, or the storage node receives and stores the target files from the plurality of computing nodes; The storage node actively requests to establish a first connection with the first virtual instance; The storage node sends a first message to the first virtual instance through the first connection, where the first message is used to provide target information for accessing the target file; In response to receiving the second message sent by the first virtual instance based on the first message, the storage node accesses the target file.
22. The storage node according to claim 21, characterized in that: The target information is used to indicate that the access lock to the target file has been released; or, the target information is used to provide metadata of the target file, wherein different files have different metadata.
23. The storage node according to claim 21 or 22, characterized in that: When the instruction is executed by the processor, the storage node further performs the following steps: The storage node receives a third message from the first virtual instance through a second connection; The storage node actively requests to establish a first connection with the first virtual instance based on the third message.
24. The storage node according to claim 23, characterized in that: The plurality of computing nodes run first virtual instances of a plurality of tenants, the plurality of computing nodes running first virtual instances of different tenants run in different virtual networks, and the target information is used to indicate that an access lock to the target file has been released.
25. The storage node according to claim 24, characterized in that: When the instruction is executed by the processor, the storage node further performs the following steps: The storage node receives a fourth message from the first virtual instance through a third connection, wherein the fourth message is used to provide information requesting access lock on the target file; The storage node determines, in response to the fourth message, that the access lock of the target file is occupied by the second virtual instance running in the plurality of computing nodes; The first connection is a connection with the first virtual instance that is actively requested to be established when the storage node determines that the access lock of the target file is released.
26. The storage node according to claim 25, characterized in that: When the instruction is executed by the processor, the storage node further performs the following steps: When the storage node determines that the access lock of the target file is released, the storage node actively requests to establish the second connection with the first virtual instance based on the fourth message; The storage node sends a fifth message to the first virtual instance through the second connection, wherein the fifth message is used to query the port number for notifying the target information; The third message is used to provide the port number of the first virtual instance.
27. The storage node according to any one of claims 21 to 26, characterized in that: When the instructions are executed by the processor, the storage node interacts with the plurality of computing nodes through a gateway in the virtual network, so that the storage node further performs the following steps: The storage node sends first session information to the gateway; The storage node sends the first connection establishment request to the gateway, so that the gateway forwards the first connection establishment request to the first virtual instance based on the first session information.
28. The storage node according to any one of claims 21 to 26, characterized in that: When the instructions are executed by the processor, the storage node interacts with the plurality of computing nodes in the virtual network through a remote direct memory access (RDMA) protocol.
29. The storage node according to any one of claims 23 to 28, characterized in that: The plurality of computing nodes run first virtual instances of a plurality of tenants, and the plurality of computing nodes running first virtual instances of different tenants run in different virtual networks. When the instruction is executed by the processor, the storage node further performs the following steps: The storage node determines the original IP address of the first virtual instance based on the third message; The storage node determines a global IP address corresponding to the original IP address, wherein the global IP address is used to identify the first virtual instance running in the virtual network; The storage node actively requests to establish a first connection with the first virtual instance based on the mapping relationship between the original IP address and the global IP address.
30. The storage node according to claim 28, characterized in that: When the instruction is executed by the processor, the storage node further performs the following steps: The storage node sends a first message to the first virtual instance through the first connection based on the mapping relationship.
31. A data center, characterized in that: The data center includes multiple computing nodes and storage nodes, a first virtual instance is run in the multiple computing nodes, the multiple computing nodes interact with the storage nodes through a virtual network, the storage nodes include a processor and a memory, the processor is used to execute instructions stored in the memory so that the storage node executes the method as described in any one of claims 1 to 10.
32. A computer-readable storage medium, characterized in that: The method comprises computer program instructions, which, when executed by a storage node, cause the storage node to perform the method according to any one of claims 1 to 10.
33. A computer program product comprising instructions, characterized in that When the instruction is executed by the storage node, the storage node executes the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Data transmission method and system
CN101309187A
Method and device for connecting service virtual machine and object storage system and storage medium
CN112565357A
Access processing method and computer equipment
CN115309545A
Efficient data forwarding in a networked device
US20200076732A1
