WO2023186109A1 - 节点访问方法以及数据传输系统 - Google Patents

节点访问方法以及数据传输系统 Download PDF

Info

Publication number
WO2023186109A1
WO2023186109A1 PCT/CN2023/085535 CN2023085535W WO2023186109A1 WO 2023186109 A1 WO2023186109 A1 WO 2023186109A1 CN 2023085535 W CN2023085535 W CN 2023085535W WO 2023186109 A1 WO2023186109 A1 WO 2023186109A1
Authority
WO
WIPO (PCT)
Prior art keywords
message data
address
node
request message
response message
Prior art date
Application number
PCT/CN2023/085535
Other languages
English (en)
French (fr)
Inventor
梁腾飞
Original Assignee
阿里云计算有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里云计算有限公司 filed Critical 阿里云计算有限公司
Publication of WO2023186109A1 publication Critical patent/WO2023186109A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Definitions

  • the embodiments of this specification relate to the field of data processing technology, and in particular, to a node access method.
  • IPV6 network is being fully rolled out.
  • many back-end services still only support IPV4 access and do not have IPV6 access capabilities. Therefore, the front-end provides IPV6 access, and the back-end still uses IPV4 as the load balancing technology for entity services. This has become a appropriate transition technology. This technology is called 6to4 load balancing.
  • 6to4 load balancing technology like other load balancing technologies, has the risk of traffic concentration and overwhelming the load balancer. It also has problems such as excessive single-flow pps and load balancer CPU imbalance.
  • Conventional 6to4 load balancing technology already has mature products. However, because of conventional 6to4 load balancing, traffic is concentrated on LVS. Every packet of round-trip traffic requires LVS to participate in scheduling and distribution, causing excessive pressure on LVS and performance bottlenecks. .
  • the embodiments of this specification provide two node access methods.
  • One or more embodiments of this specification relate to a data transmission system, two node access devices, two node access devices, a computing device, a computer-readable storage medium and a computer program to solve existing problems.
  • Technical flaws in the technology relate to a data transmission system, two node access devices, two node access devices, a computing device, a computer-readable storage medium and a computer program to solve existing problems.
  • a node access method including:
  • the first address correspondence is established through the message data sent by the transit node, and the first address correspondence includes the request Correspondence between the address of the node and the address carried in the response message.
  • a node access method including:
  • the service node address corresponding to the address in the second address correspondence relationship sends the second request message data to the service node.
  • a data transmission system including:
  • the requesting node converts the initial type of request message data into the target type of request message data, and sends the target type of request message data to the transfer node;
  • the transit node sends the request message data of the target type to the service node according to the scheduling rules
  • the service node generates response message data of the target type according to the request message data of the target type, and establishes a first address corresponding relationship, and
  • the requesting node establishes a second address correspondence based on the initial type of response message data, and accesses the service node based on the second address correspondence.
  • a node access device including:
  • the receiving module is configured to receive request message data
  • a generation module configured to generate response message data according to the request message data
  • the access module is configured to send the response message data to the requesting node according to the first address correspondence, wherein the first address correspondence is established through the request message data sent by the transit node, and the first The address correspondence includes a correspondence between the address of the requesting node and the address carried in the response message.
  • a node access device including:
  • the sending module is configured to forward the first request message data to the service node through the transit node to obtain the response message data;
  • a relationship establishment module configured to establish a second address correspondence between the address of the service node and the address of the transit node based on the address of the service node carried in the response message data;
  • the access module is configured to, when the second request message data needs to be sent, send the second request message data to the service node address corresponding to the second address correspondence relationship according to the address of the transfer node targeted by the second request message data.
  • the service node sends the second request message data.
  • a node access device including:
  • the receiving module is configured to receive request message data
  • a generation module configured to generate response message data according to the request message data
  • the access module is configured to send the response message data to the requesting node according to the first address correspondence, wherein the first address correspondence is established through the request message data sent by the transit node, and the third An address correspondence includes a correspondence between the address of the requesting node and the address carried in the response message.
  • a node access device including:
  • the sending module is configured to forward the first request message data to the service node through the transit node to obtain the response message data;
  • a relationship establishment module configured to establish a second address correspondence between the address of the service node and the address of the transit node based on the address of the service node carried in the response message data;
  • the access module is configured to, when the second request message data needs to be sent, send the second request message data to the service node address corresponding to the second address correspondence relationship according to the address of the transfer node targeted by the second request message data.
  • the service node sends the second request message data.
  • a computing device including:
  • the memory is used to store computer-executable instructions
  • the processor is used to execute the computer-executable instructions.
  • the steps of the node access method are implemented.
  • a computer-readable storage medium which stores computer-executable instructions that implement the steps of the above node access method when executed by a processor.
  • a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the node access method.
  • Embodiments of this specification provide a node access method and a data transmission system, wherein the node access method includes: receiving request message data, generating response message data according to the request message data, and generating response message data according to the first address correspondence. Send the response message data to the requesting node, wherein the first address correspondence is established through the message data sent by the transit node, and the first address correspondence includes the address of the requesting node and the response message. The correspondence between the addresses carried by the document. By generating response message data based on the received request message data, and directly sending the response message data to the requesting node based on the first address correspondence, the transit device is bypassed, thereby reducing the load on the transit device and achieving load balancing. .
  • Figure 1 is a flow chart of a node access method provided by an embodiment of this specification
  • Figure 2 is a flow chart of another node access method provided by an embodiment of this specification.
  • Figure 3a is a schematic diagram of a data transmission system provided by an embodiment of this specification.
  • Figure 3b is a timing diagram of a data transmission system provided by an embodiment of this specification.
  • Figure 4 is a process flow chart of a node access method provided by an embodiment of this specification.
  • Figure 5 is a schematic structural diagram of a node access device provided by an embodiment of this specification.
  • Figure 6 is a schematic structural diagram of another node access device provided by an embodiment of this specification.
  • Figure 7 is a structural block diagram of a computing device provided by an embodiment of this specification.
  • first, second, etc. may be used to describe various information in one or more embodiments of this specification, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other.
  • the first may also be called the second, and similarly, the second may also be called the first.
  • the word "if” as used herein may be interpreted as "when” or “when” or “in response to determining.”
  • VPC Virtual Private Cloud
  • vxlan is an overlay network technology that uses MAC in UDP method for encapsulation. It can create virtual layer 2 subnets across multiple physical IP subnets and create a fully virtualized infrastructure cloud service that allows layer 2 To communicate with any endpoint, VXLAN adds an 8-byte VXLAN Header to the inner original Ethernet frame, and then the outer layers are UDP Header, outer IP Header, and outer Mac Header, a total of 50 bytes of encapsulated report Text header.
  • the overlay address needs to correspond to an underlay address before it can be transmitted in the physical network.
  • the actual performance is in a virtual host, which must correspond to a real physical machine. Therefore, learning the correspondence between virtual and physical machines is the learning source ability. .
  • LVS refers to a device that integrates load balancing software and hardware.
  • Load balancing Built on the existing network structure, it provides a cheap, effective and transparent method to expand the bandwidth of network devices and servers, increase throughput, enhance network data processing capabilities, and improve network flexibility and availability.
  • a set of five quantities consisting of five-tuple information, source IP address, source port, destination IP address, destination port, and transport layer protocol.
  • Internet Protocol version 4 (English: Internet Protocol version 4, IPV4): Also known as the fourth version of the Internet Communication Protocol, it is the fourth revised version in the development process of the Internet Protocol and the first widely deployed version of this protocol.
  • IPV6 is the abbreviation of "Internet Protocol Version 6" in English. It is the next generation IP protocol designed by the Internet Engineering Task Force (IETF) to replace IPV4.
  • IETF Internet Engineering Task Force
  • pps Pulse Per Second.
  • the Chinese explanation is pulse per second, pulse number/second.
  • PPS is the abbreviation of pulse number per second, which generally appears in the communications industry.
  • IPV6 network is being fully rolled out.
  • many back-end services still only support IPV4 access and do not have IPV6 access capabilities. Therefore, the front-end provides IPV6 access, and the back-end still uses IPV4 as the load balancing technology for entity services.
  • This technology is called 6to4 load balancing.
  • 6to4 load balancing technology like other load balancing technologies, has the risk of traffic concentration and overwhelming the load balancer. It also has problems such as excessive single-flow pps and load balancer CPU imbalance. Based on this, a load balancing technology is proposed to offload the traffic from the load balancer, decentralize it, and provide a direct access mode from the source to the destination.
  • two node access methods are provided.
  • This specification also relates to a data transmission system, two node access devices, two node access devices, a computing device, and a computer-readable storage medium. Detailed descriptions will be given one by one in the following examples.
  • Figure 1 shows a flow chart of a node access method provided according to an embodiment of this specification. The method is applied to a service node and specifically includes the following steps.
  • Step 102 Receive request message data.
  • the request message data can be the message data sent by the client, which can be understood as the message data communicating with a certain service on the server.
  • a VPC scenario in practical applications, in a VPC scenario, it includes request nodes, service nodes and load balancing nodes.
  • the server can obtain the data from the client.
  • the end receives the request message data and provides services based on the request message data.
  • the request message data can be sent by the client of any tenant.
  • Each tenant has its own address.
  • each service provider also has its own address.
  • the server needs to receive the message data of a certain client from the load balancing node in order to obtain the client's address information.
  • the address of the device where the matching client is located can be obtained, so as to facilitate subsequent direct sending of message data to the client.
  • Step 104 Generate response message data according to the request message data
  • the response message data can be understood as the message data returned to the client.
  • the server needs to send a response message after receiving the client's request.
  • the response message data is generated based on the request message data sent by the client from the LVS device.
  • generating response message data according to the request message data includes:
  • the target type may be an IPV4 type
  • the initial type may be an IPV6 type
  • the inbound address correspondence may be understood as the correspondence between the five-tuple information and the address to be changed.
  • the IPV6 type request message data is determined based on the IPV4 type request message data, and the inbound address correspondence relationship is established based on the five-tuple information in the IPV6 type request message data.
  • the inbound address correspondence relationship includes: Inbound index and cache, the inbound index information is: IPV6+(client ip)cip+(client port)cport+(transit node ip)vip+(transit node port)vport, the inbound cache information is: the converted source IP is virtual ip (fip); the converted destination IP is the server IP (rip); the converted source port is the virtual port (fport); the converted destination port is the server port (rport). Then a response message is generated based on the IPV6 type request message data.
  • generating response message data of the target type according to the request message data of the initial type includes:
  • the IPV6 type request message data is generated according to the inbound address correspondence relationship to the IPV4 type virtual request message data, and the outbound address correspondence relationship is established.
  • the outbound address correspondence relationship includes the outbound index and cache, and the outbound index information is: : IPV4+(server IP)rip+(server port)rport+(virtual IP)fip+(virtual port)fport;
  • the outbound cache information is: the converted source IP is the access service IP (vip); the converted destination IP is the client’s IP address (cip); the converted source port is the access service port (vport); the converted destination port is the request port (cport) to access the client; the network card address of the host (request node) where the client is located is nc_ip; access VPC tunnel id (VPC tunnel identification) where the client is located.
  • IPV6 type request message data into the IPV4 type virtual request message data, submit it to the kernel protocol stack, and finally be processed by the business process.
  • What the business process receives is an IPV4 network request from the virtual IP, and the business process responds to the request message data.
  • the embodiment of this specification establishes a virtual IPV4 address corresponding to the IPV6 type message data, so that the client's IPV6 type message data can communicate with the IPV4 type server, thereby improving universal applicability.
  • Step 106 Send the response message data to the requesting node according to the first address correspondence, where the first address correspondence is established through the message data sent by the transit node, and the first address correspondence includes The corresponding relationship between the address of the requesting node and the address carried in the response message.
  • the server can bypass the transit node and directly access the client based on the established first address correspondence.
  • the reply is sent to the requesting node according to the first address correspondence.
  • the message data should include:
  • the response message data of the initial type is sent to the corresponding requesting node.
  • the first address correspondence relationship can be understood to include the above-mentioned inbound address correspondence relationship and outbound address correspondence relationship.
  • the response message is IPV4 type response message data
  • the five-tuple information is IPV4+rip+rport+fip+fport.
  • the response message sent by the business process reaches the kernel protocol stack and is sent by the kernel protocol stack.
  • the five-tuple information IPV4+rip+rport+fip+fport of the protocol and message is used to match the outbound index and the corresponding cache information is found. .
  • the IPV6 type response message data carries the client's request node.
  • the network card address and the VPC tunnel ID of the access client are used to send the IPV6 type response message data to the corresponding requesting node through the VPC tunnel.
  • Embodiments of this specification provide a node access method and a data transmission system, wherein the node access method includes: receiving request message data, generating response message data according to the request message data, and generating response message data according to the first address correspondence. Send the response message data to the requesting node, wherein the first address correspondence is established through the message data sent by the transit node, and the first address correspondence includes the address of the requesting node and the response message. The corresponding relationship between the addresses carried by the document.
  • the transit device is bypassed, thereby reducing the load on the transit device and achieving load balancing. .
  • Figure 2 shows a flow chart of another node access method provided according to an embodiment of this specification, which specifically includes the following steps.
  • Step 202 Forward the first request message data to the service node through the transit node to obtain the response message data.
  • the client's first message needs to be forwarded to the LVS device to match the service node.
  • forwarding the first request message data to the service node through the transit node includes:
  • the client accesses the LVS device (vip+vport), it sends message data whose message protocol is IPV6 protocol.
  • the five-tuple information is IPV6+cip+cport+vip+vport.
  • IPV6+cip+cport+vip+ vport Establish index and cache (second address correspondence), confirm that the network flow does not have a corresponding learning source record, combine the VPC information where the client is located, and query based on the VPC tunnel id + vip to find out that the VIP to be accessed is on the LVS device, and put the Network packets are forwarded to the LVS device.
  • the address cache record is established when the client sends a message to the server for the first time, so that when receiving a message returned by the server later, the address cache record can be completed to form a second address corresponding relationship, so that according to the second address
  • the correspondence between the two addresses directly accesses the server, improving communication efficiency.
  • forwarding the first request message data of the initial type to the transit node includes:
  • IPV6 network packets are further encapsulated into IPV4 vxlan packets; the outer source address of the vxlan packet is the network card address of the host where the client is located, and the destination address of the vxlan packet is the network card address of the LVS device, and then the vxlan packets can be forwarded to the LVS device through routing in the network.
  • Step 204 Establish a second address correspondence between the address of the service node and the address of the transit node based on the address of the service node carried in the response message data.
  • the client can determine the server address based on the message directly returned by the server.
  • establishing a second address correspondence between the address of the service node and the address of the transit node based on the address of the service node carried in the response message data includes:
  • the client strips off the vxlan message and exposes the inner IPV6 message, that is, the client receives an IPV6 type response message.
  • the service node where the server is located can be directly accessed according to the address, which reduces the pressure of load balancing and improves communication efficiency.
  • Step 206 When it is necessary to send the second request message data, send the second request message data to the service node according to the service node address corresponding to the address of the transit node targeted by the second request message data in the second address correspondence relationship.
  • the second request message data When it is necessary to send the second request message data, send the second request message data to the service node according to the service node address corresponding to the address of the transit node targeted by the second request message data in the second address correspondence relationship. The second request message data.
  • the client after sending the first message, the client can directly send a message to the server based on the second address correspondence.
  • the service node address corresponding to the address of the transit node targeted by the second request message data in the second address correspondence relationship is sent to the service node.
  • Request message data including:
  • the five-tuple information is still IPV6+cip+cport+vip+vport.
  • the client's packet accessing vip+vport is matched to the index and cache of the second address correspondence based on IPV6+cip+cport+vip+vport, confirms that the cache has a corresponding learning source record, and sends the IPV6 type request according to the learning source record
  • the message data is forwarded to the service node.
  • the forwarding method is to encapsulate the IPV6 type request message data into an IPV4 type vxlan message.
  • the outer source address of the vxlan message is the network card address of the host (requesting node) where the client is located, and the destination address of the vxlan message is the network card address of the physical machine server (service node), and the vxlan message can be forwarded to the physical machine server through routing in the network.
  • Embodiments of this specification provide a node access method and a data transmission system.
  • the node access method includes: forwarding the first request message data to the service node through the transit node to obtain the response message data.
  • the address of the service node carried in the data establishes a second address correspondence between the address of the service node and the address of the transit node.
  • the second request message data is used for
  • the address of the transit node corresponds to the service node address in the second address correspondence relationship, and sends the second request message data to the service node.
  • the first request message data is forwarded to the service node by the transit node to obtain the response message data.
  • the address of the service node carried in the response message data a relationship between the address of the service node and the address of the transit node is established.
  • the second address correspondence thus bypasses the transit device when sending the message again, thereby reducing the load on the transit device and achieving load balancing.
  • Figure 3a shows a schematic diagram of a data transmission system provided according to an embodiment of this specification.
  • the data transmission system includes a request node, a transit node and a service node.
  • the request node is configured to convert the request message data of the initial type into the request message data of the target type, and send the request message data of the target type to the transit node;
  • the transit node is configured to send the request message data of the target type to the service node according to scheduling rules
  • the service node is configured to generate response message data of the target type according to the request message data of the target type, and establish a first address correspondence relationship
  • the requesting node is configured to establish a second address correspondence based on the initial type of response message data, and to access the service node based on the second address correspondence.
  • the request node includes a request message hijacking module and a client
  • the transit node is an LVS device
  • the service node includes a response message hijacking module and a kernel protocol stack, where the request message hijacking module has Capability, responsible for determining which LVS device or service node the client's message should be sent to. That is, in this embodiment, the request packet hijacking module determines whether the network packet accessed by the client is sent to the LVS device or to the service node.
  • the LVS device is responsible for receiving network packets accessed by clients, forwarding the packets to the service node, and informing the service node of the client's information about the access source and the access target's information.
  • the response message hijacking module is a kernel module installed in the service node. This module registers hook (hijacking) points on the path of the kernel protocol stack to receive and send messages, hijacks each data packet, and processes the data packets: responsible for parsing
  • the network packet forwarded by LVS parses the access source information, is responsible for converting the IPV6 packet into an IPV4 packet, submits it to the kernel protocol stack, and then transfers it to the business process, and is responsible for converting the IPV4 packet responded by the business process into IPV6 message, further, the response message hijacking module is responsible for sending the response message of the business process directly to the requesting node of the access source.
  • FIG. 3b shows a timing diagram of a data transmission system provided according to an embodiment of this specification.
  • the request packet hijacking module in the requesting node encapsulates the IPV6 request message into an IPV4 request message in the VPC tunnel format (such as the vxlan protocol).
  • the IPV4 request message in the VPC tunnel format will carry the requesting node. network card address, and then sends the IPV4 request message to the corresponding transit node.
  • the transit node selects an appropriate service node (such as a service node with low communication delay) according to the scheduling rules, adds VPC tunnel identification and other information to the IPV4 request message, and sends the IPV4 request message to the corresponding service node.
  • an appropriate service node such as a service node with low communication delay
  • the service node first decapsulates the IPV4 request message to obtain the internal IPV6 request message, generates virtual IPV4 five-tuple information based on the five-tuple information of the IPV6 request message, and records the five-tuple information in the IPV6 request message.
  • the correspondence between the group information and the virtual IPV4 quintuple information that is, the inbound address correspondence, converts the IPV6 request message into a virtual IPV4 request message according to the inbound address correspondence, and establishes the outbound address correspondence.
  • the outbound address The corresponding relationship includes the virtual IPV4 five-tuple information and the five-tuple information in the IPV6 request message, as well as the network card address of the requesting node where the client is located and the VPC tunnel identifier to be used to access the requesting node. In other words, it can be accessed through the outbound
  • the address correspondence determines which VPC tunnel is used to send the packet data to which requesting node. Then the virtual IPV4 request message is sent to the kernel protocol stack, and the kernel protocol stack then forwards the virtual IPV4 request message to the business process. The business process generates an IPV4 response message for the virtual IPV4 request message, and the response message is hijacked.
  • the module hijacks the IPV4 response message and converts the IPV4 response message into an IPV6 response message through the outbound address correspondence.
  • the IPV6 response message needs to be encapsulated into a VPC tunnel format message (such as vxlan protocol) before it can pass the corresponding
  • the VPC tunnel identifier selects the VPC tunnel to send the IPV6 response message to the requesting node.
  • the first address correspondence includes an outbound address correspondence and an outbound address correspondence.
  • the request message hijacking module in the request node When the request message hijacking module in the request node receives the IPV6 response message in the VPC tunnel format, it can obtain the address information of the service node from the IPV6 response message in the VPC tunnel format, thereby generating a second address correspondence.
  • the second knowledge correspondence relationship includes the five-tuple information of the client's IPV6 request message and the network card address of the service node during this communication process.
  • the request message hijacking module will determine whether the five-tuple information of the new IPV6 request message has a corresponding service node address in the second address correspondence relationship. If If the corresponding service node address exists, the new IPV6 request message is directly encapsulated into an IPV4 request message and forwarded to the corresponding service node.
  • the service node is configured to monitor the number of addresses in the first address correspondence relationship, and when the number of addresses exceeds a preset quantity threshold, send alarm information to the management and control end.
  • the number of addresses can be understood as the number of quintuple information.
  • the preset quantity threshold can be 100. If the number of cached quintuple information in the preset first address correspondence exceeds 100, then an alarm message is sent to the control terminal to allow the staff to adjust First address correspondence.
  • the cache of the five-tuple information can also be cleared under the condition of the time threshold, for example, When the number of cached five-tuple information in the preset first address correspondence exceeds 100, the caches of the 20 five-tuple information that have not been used for more than the set time threshold are cleared according to the most recent use time. .
  • the embodiment of this specification provides a data transmission system.
  • the system includes: a request node, a transit node and a service node.
  • the request node converts the initial type of request message data into the target type of request message data, and converts the request message data of the initial type into the target type of request message data.
  • the request message data of the target type is sent to the transfer node; the transfer node of the data transmission system sends the request message data of the target type to the service node according to the scheduling rules; the service node sends the request message data of the target type to the service node according to the target type.
  • Generate response message data of the target type from the request message data establish a first address correspondence, and convert the response message data of the target type into response message data of the initial type according to the first address correspondence. , and sends the initial type of response message data to the requesting node; the requesting node establishes a second address correspondence based on the initial type of response message data, and accesses according to the second address correspondence
  • the service node The communication between the request node and the service node can be implemented to bypass the transit device, thereby reducing the load of the transit device and achieving load balancing.
  • FIG. 4 shows a process flow chart of a node access method provided by an embodiment of this specification, which specifically includes the following steps.
  • Step 402 The requesting node forwards the first request message data to the service node through the transit node.
  • Step 404 The service node receives the first request message data.
  • Step 406 The service node generates response message data according to the first request message data.
  • Step 408 The service node sends the response message data to the requesting node according to the first address correspondence.
  • Step 410 The requesting node establishes a second address correspondence between the address of the service node and the address of the transit node based on the address of the service node carried in the response message data.
  • Step 412 When the requesting node needs to send the second request message data, the requesting node sends the service node address to the service node according to the address of the transfer node targeted by the second request message data in the second address correspondence relationship. The node sends the second request message data.
  • the embodiments of this specification realize that the communication between the requesting node and the service node bypasses the transit device, thereby reducing the load of the transit device and achieving load balancing.
  • this specification also provides an embodiment of a node access device, which includes:
  • the receiving module is configured to receive request message data
  • a generation module configured to generate response message data according to the request message data
  • the access module is configured to send the response message data to the requesting node according to the first address correspondence, wherein the first address correspondence is established through the request message data sent by the transit node, and the first The address correspondence includes a correspondence between the address of the requesting node and the address carried in the response message.
  • the generation module is also configured as:
  • the generation module is also configured as:
  • the access module is also configured as:
  • the response message data of the target type is generated according to the corresponding relationship of the outbound address to generate a response message of the initial type. Message data should be sent;
  • the response message data of the initial type is sent to the corresponding requesting node.
  • Embodiments of this specification provide a node access device, wherein the node access device includes: receiving request message data, generating response message data according to the request message data, and sending to the requesting node according to the first address correspondence.
  • the response message data wherein the first address correspondence is established through the message data sent by the transit node, and the first address correspondence includes the address of the requesting node and the address carried in the response message corresponding relationship.
  • this specification also provides another embodiment of a node access device, which includes:
  • the sending module is configured to forward the first request message data to the service node through the transit node to obtain the response message data;
  • a relationship establishment module configured to establish a second address correspondence between the address of the service node and the address of the transit node based on the address of the service node carried in the response message data;
  • the access module is configured to, when the second request message data needs to be sent, send the second request message data to the service node address corresponding to the second address correspondence relationship according to the address of the transfer node targeted by the second request message data.
  • the service node sends the second request message data.
  • the sending module is also configured as:
  • the sending module is also configured as:
  • the relationship establishment module is also configured as:
  • the access module is also configured as:
  • Embodiments of this specification provide a node access device, which includes: forwarding the first request message data to a service node through a transit node to obtain the response message data, and establishing the response message data according to the address of the service node carried in the response message data.
  • the second address correspondence relationship between the address of the service node and the address of the transit node.
  • the address of the transit node targeted by the second request message data is in the second address.
  • the corresponding service node address in the address correspondence relationship sends the second request message data to the service node.
  • the first request message data is forwarded to the service node by the transit node to obtain the response message data.
  • the address of the service node carried in the response message data a relationship between the address of the service node and the address of the transit node is established.
  • the second address correspondence thus bypasses the transit device when sending the message again, thereby reducing the load on the transit device and achieving load balancing.
  • Figure 5 shows a schematic structural diagram of a node access device provided by an embodiment of this specification. As shown in Figure 5, the device includes:
  • the receiving module 502 is configured to receive request message data
  • the generation module 504 is configured to generate response message data according to the request message data
  • the access module 506 is configured to send the response message data to the requesting node according to the first address correspondence, wherein the first address correspondence is established through the request message data sent by the transit node, and the third An address correspondence includes a correspondence between the address of the requesting node and the address carried in the response message.
  • the generation module 504 is also configured as:
  • the generation module 504 is also configured as:
  • the access module 506 is also configured to:
  • the response message of the initial type is The data is sent to the corresponding requesting node.
  • Embodiments of this specification provide a node access device, wherein the node access device includes: receiving request message data, generating response message data according to the request message data, and sending to the requesting node according to the first address correspondence.
  • the response message data wherein the first address correspondence is established through the message data sent by the transit node, and the first address correspondence includes the address of the requesting node and the address carried in the response message corresponding relationship.
  • FIG. 6 shows a schematic structural diagram of another node access device provided by an embodiment of this specification. As shown in Figure 6, the device includes:
  • the sending module 602 is configured to forward the first request message data to the service node through the transit node to obtain the response message data;
  • the relationship establishment module 604 is configured to establish a second address corresponding relationship between the address of the service node and the address of the transit node based on the address of the service node carried in the response message data;
  • the access module 606 is configured to, when the second request message data needs to be sent, send the second request message data to the service node address corresponding to the address of the transit node in the second address correspondence relationship according to the second request message data.
  • the service node sends the second request message data.
  • the sending module 602 is also configured to:
  • the sending module 602 is also configured to:
  • the relationship establishment module 604 is also configured as:
  • the access module 606 is also configured to:
  • Embodiments of this specification provide a node access device, which includes: forwarding the first request message data to a service node through a transit node to obtain the response message data, and establishing the response message data according to the address of the service node carried in the response message data.
  • the second address correspondence relationship between the address of the service node and the address of the transit node.
  • the address of the transit node targeted by the second request message data is in the second address.
  • the corresponding service node address in the address correspondence relationship sends the second request message data to the service node.
  • the first request message data is forwarded to the service node by the transit node to obtain the response message data.
  • the address of the service node carried in the response message data a relationship between the address of the service node and the address of the transit node is established.
  • the second address correspondence thus bypasses the transit device when sending the message again, thereby reducing the load on the transit device and achieving load balancing.
  • the above is a schematic solution of a node access device in this embodiment. It should be noted that the technical solution of the node access device and the technical solution of the node access method mentioned above belong to the same concept. For details that are not described in detail in the technical solution of the node access device, please refer to the description of the technical solution of the node access method mentioned above. .
  • Figure 7 shows a structural block diagram of a computing device 700 provided according to an embodiment of this specification.
  • Components of the computing device 700 include, but are not limited to, memory 710 and processor 720 .
  • the processor 720 and the memory 710 are connected through a bus 730, and the database 750 is used to save data.
  • Computing device 700 also includes an access device 740 that enables computing device 700 to communicate via one or more networks 760 .
  • networks include the Public Switched Telephone Network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communications networks such as the Internet.
  • Access device 740 may include one or more of any type of network interface (eg, a network interface card (NIC)), wired or wireless, such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, Global Interconnection for Microwave Access ( Wi-MAX) interface, Ethernet interface, Universal Serial Bus (USB) interface, cellular network interface, Bluetooth interface, Near Field Communication (NFC) interface, etc.
  • NIC network interface card
  • the above-mentioned components of the computing device 700 and other components not shown in FIG. 7 may also be connected to each other, such as through a bus. It should be understood that the structural block diagram of the computing device shown in FIG. 7 is for illustrative purposes only and does not limit the scope of this description. Those skilled in the art can add or replace other components as needed.
  • Computing device 700 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet computer, personal digital assistant, laptop computer, notebook computer, netbook, etc.), a mobile telephone (e.g., smartphone ), a wearable computing device (e.g., smart watch, smart glasses, etc.) or other type of mobile device, or a stationary computing device such as a desktop computer or PC.
  • a mobile computer or mobile computing device e.g., tablet computer, personal digital assistant, laptop computer, notebook computer, netbook, etc.
  • a mobile telephone e.g., smartphone
  • a wearable computing device e.g., smart watch, smart glasses, etc.
  • stationary computing device such as a desktop computer or PC.
  • Computing device 700 may also be a mobile or stationary server.
  • the processor 720 is used to execute the following computer-executable instructions, which are processed The steps to implement the above node access method when the server is executed.
  • An embodiment of the present specification also provides a computer-readable storage medium that stores computer-executable instructions.
  • the computer-executable instructions are executed by a processor, the steps of the above node access method are implemented.
  • An embodiment of this specification also provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the node access method.
  • the computer instructions include computer program code, which may be in the form of source code, object code, executable file or some intermediate form.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signals, telecommunications signals, and software distribution media, etc.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electrical carrier signals telecommunications signals
  • software distribution media etc.
  • the content contained in the computer-readable medium can be appropriately added or deleted according to the requirements of legislation and patent practice in the jurisdiction.
  • the computer-readable medium Excludes electrical carrier signals and telecommunications signals.

Landscapes

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

Abstract

本申请提供一种节点访问方法以及数据传输系统,其中所述节点访问方法包括:接收请求报文数据,根据所述请求报文数据生成回应报文数据,根据第一地址对应关系向请求节点发送所述回应报文数据,其中,所述第一地址对应关系通过中转节点发送的报文数据建立,且所述第一地址对应关系包括所述请求节点的地址与所述回应报文携带的地址的对应关系。通过根据接收的请求报文数据生成回应报文数据,并根据第一地址对应关系向请求节点直接发送回应报文数据,绕开了中转设备,从而减轻了中转设备的负载,且实现了负载均衡。

Description

节点访问方法以及数据传输系统
本申请要求于2022年04月01日提交中国专利局、申请号为202210339380.6、申请名称为“节点访问方法以及数据传输系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本说明书实施例涉及数据处理技术领域,特别涉及一种节点访问方法。
背景技术
IPV6网络正在全面铺开,然而在很多后端服务,仍然只支持IPV4接入,不具备IPV6接入能力,因此前端提供IPV6方式访问,后端仍然以IPV4作为实体服务的负载均衡技术,成为一种合适的过渡技术。这种技术称为6to4负载均衡。
然而6to4负载均衡技术和其他负载均衡技术一样,会有流量集中化,压爆负载均衡的风险,也有单流pps过大,负载均衡器cpu失衡等问题。常规的6to4负载均衡技术已经有成熟产品,但因为常规的6to4负载均衡,流量都集中在LVS上处理,来回流量的每一个包都需要LVS参与调度分发,造成LVS压力过大,性能瓶颈的问题。
发明内容
有鉴于此,本说明书实施例提供了两种节点访问方法。本说明书一个或者多个实施例同时涉及一种数据传输系统,两种节点访问设备,两种节点访问装置,一种计算设备,一种计算机可读存储介质以及一种计算机程序,以解决现有技术中存在的技术缺陷。
根据本说明书实施例的第一方面,提供了一种节点访问方法,包括:
接收请求报文数据;
根据所述请求报文数据生成回应报文数据;
根据所述第一地址对应关系向请求节点发送所述回应报文数据,其中,所述第一地址对应关系通过中转节点发送的报文数据建立,且所述第一地址对应关系包括所述请求节点的地址与所述回应报文携带的地址的对应关系。
根据本说明书实施例的第二方面,提供了一种节点访问方法,包括:
通过中转节点转发第一请求报文数据至服务节点,以获取回应报文数据;
根据所述回应报文数据携带的服务节点的地址,建立所述服务节点的地址与所述中转节点的地址的第二地址对应关系;
在需要发送第二请求报文数据时,根据所述第二请求报文数据针对的中转节点的 地址在所述第二地址对应关系中对应的服务节点地址,向所述服务节点发送所述第二请求报文数据。
根据本说明书实施例的第三方面,提供了一种数据传输系统,包括:
请求节点、中转节点和服务节点;
所述请求节点将初始类型的请求报文数据转换为目标类型的请求报文数据,并将所述目标类型的请求报文数据发送至所述中转节点;
所述中转节点根据调度规则将所述目标类型的请求报文数据发送至所述服务节点;
所述服务节点根据所述目标类型的请求报文数据生成目标类型的回应报文数据,并建立第一地址对应关系,以及
根据所述第一地址对应关系将所述目标类型的回应报文数据转换为初始类型的回应报文数据,并将所述初始类型的回应报文数据发送至所述请求节点;
所述请求节点根据所述初始类型的回应报文数据建立第二地址对应关系,并根据所述第二地址对应关系访问所述服务节点。
根据本说明书实施例的第四方面,提供了一种节点访问设备,包括:
接收模块,被配置为接收请求报文数据;
生成模块,被配置为根据所述请求报文数据生成回应报文数据;
访问模块,被配置为根据所述第一地址对应关系向请求节点发送所述回应报文数据,其中,所述第一地址对应关系通过中转节点发送的请求报文数据建立,且所述第一地址对应关系包括所述请求节点的地址与所述回应报文携带的地址的对应关系。
根据本说明书实施例的第五方面,提供了一种节点访问设备,包括:
发送模块,被配置为通过中转节点转发第一请求报文数据至服务节点,以获取回应报文数据;
关系建立模块,被配置为根据所述回应报文数据携带的服务节点的地址,建立所述服务节点的地址与所述中转节点的地址的第二地址对应关系;
访问模块,被配置为在需要发送第二请求报文数据时,根据所述第二请求报文数据针对的中转节点的地址在所述第二地址对应关系中对应的服务节点地址,向所述服务节点发送所述第二请求报文数据。
根据本说明书实施例的第六方面,提供了一种节点访问装置,包括:
接收模块,被配置为接收请求报文数据;
生成模块,被配置为根据所述请求报文数据生成回应报文数据;
访问模块,被配置为根据所述第一地址对应关系向请求节点发送所述回应报文数据,其中,所述第一地址对应关系通过中转节点发送的请求报文数据建立,且所述第 一地址对应关系包括所述请求节点的地址与所述回应报文携带的地址的对应关系。
根据本说明书实施例的第七方面,提供了一种节点访问装置,包括:
发送模块,被配置为通过中转节点转发第一请求报文数据至服务节点,以获取回应报文数据;
关系建立模块,被配置为根据所述回应报文数据携带的服务节点的地址,建立所述服务节点的地址与所述中转节点的地址的第二地址对应关系;
访问模块,被配置为在需要发送第二请求报文数据时,根据所述第二请求报文数据针对的中转节点的地址在所述第二地址对应关系中对应的服务节点地址,向所述服务节点发送所述第二请求报文数据。
根据本说明书实施例的第八方面,提供了一种计算设备,包括:
存储器和处理器;
所述存储器用于存储计算机可执行指令,所述处理器用于执行所述计算机可执行指令,该计算机可执行指令被处理器执行时实现上述节点访问方法的步骤。
根据本说明书实施例的第九方面,提供了一种计算机可读存储介质,其存储有计算机可执行指令,该指令被处理器执行时实现上述节点访问方法的步骤。
根据本说明书实施例的第十方面,提供了一种计算机程序,其中,当所述计算机程序在计算机中执行时,令计算机执行上述节点访问方法的步骤。
本说明书实施例提供一种节点访问方法以及数据传输系统,其中所述节点访问方法包括:接收请求报文数据,根据所述请求报文数据生成回应报文数据,根据所述第一地址对应关系向请求节点发送所述回应报文数据,其中,所述第一地址对应关系通过中转节点发送的报文数据建立,且所述第一地址对应关系包括所述请求节点的地址与所述回应报文携带的地址的对应关系。通过根据接收的请求报文数据生成回应报文数据,并根据第一地址对应关系向请求节点直接发送回应报文数据,绕开了中转设备,从而减轻了中转设备的负载,且实现了负载均衡。
附图说明
图1是本说明书一个实施例提供的一种节点访问方法的流程图;
图2是本说明书一个实施例提供的另一种节点访问方法的流程图;
图3a是本说明书一个实施例提供的一种数据传输系统的示意图;
图3b是本说明书一个实施例提供的一种数据传输系统的时序图;
图4是本说明书一个实施例提供的一种节点访问方法的处理过程流程图;
图5是本说明书一个实施例提供的一种节点访问装置的结构示意图;
图6是本说明书一个实施例提供的另一种节点访问装置的结构示意图;
图7是本说明书一个实施例提供的一种计算设备的结构框图。
具体实施方式
在下面的描述中阐述了很多具体细节以便于充分理解本说明书。但是本说明书能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本说明书内涵的情况下做类似推广,因此本说明书不受下面公开的具体实施的限制。
在本说明书一个或多个实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书一个或多个实施例。在本说明书一个或多个实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本说明书一个或多个实施例中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
应当理解,尽管在本说明书一个或多个实施例中可能采用术语第一、第二等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本说明书一个或多个实施例范围的情况下,第一也可以被称为第二,类似地,第二也可以被称为第一。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。
首先,对本说明书一个或多个实施例涉及的名词术语进行解释。
虚拟私有云(VPC):是一个公共云计算资源的动态配置池,需要使用加密协议、隧道协议和其他安全程序,在民营企业和云服务提供商之间传输数据。
vxlan:vxlan是一种overlay的网络技术,使用MAC in UDP的方法进行封装,可以创建跨多个物理IP子网的虚拟2层子网,创建一个完全虚拟化的基础架构云服务,允许2层与任何端点进行通信,VXLAN在内层原始以太帧的基础上加了8字节的VXLAN Header,然后外层分别是UDP Header、外层IP Header、外层Mac Header,共50字节的封装报文头。
学源:overlay的地址,需要对应一个underlay地址才能在物理网络中传输,实际表现就在一个虚拟主机,必须对应由一个真实的物理机器,因此学习虚拟与物理机的对应关系,是学源能力。
LVS:指代负载均衡软硬一体的设备。
负载均衡:建立在现有网络结构之上,它提供了一种廉价有效透明的方法扩展网络设备和服务器的带宽、增加吞吐量、加强网络数据处理能力、提高网络的灵活性和可用性。
五元组信息,源IP地址,源端口,目的IP地址,目的端口,和传输层协议这五个量组成的一个集合。
网际协议版本4(英语:Internet Protocol version 4,IPV4):又称互联网通信协议第四版,是网际协议开发过程中的第四个修订版本,也是此协议第一个被广泛部署的版本。
IPV6:是英文“Internet Protocol Version 6”(互联网协议第6版)的缩写,是互联网工程任务组(IETF)设计的用于替代IPV4的下一代IP协议。
pps英文全称是Pulse Per Second,中文解释为秒脉冲,脉冲数/秒,PPS即每秒脉冲数的缩写,一般出现在通信行业中。
IPV6网络正在全面铺开,然而在很多后端服务,仍然只支持IPV4接入,不具备IPV6接入能力,因此前端提供IPV6方式访问,后端仍然以IPV4作为实体服务的负载均衡技术,成为一种合适的过渡技术。这种技术称为6to4负载均衡。然而6to4负载均衡技术和其他负载均衡技术一样,会有流量集中化,压爆负载均衡的风险,也有单流pps过大,负载均衡器cpu失衡等问题。基于此,提出一种负载均衡技术,将流量从负载均衡器卸载,去中心化,提供从源端到目的端的直接访问模式。
在本说明书中,提供了两种节点访问方法,本说明书同时涉及一种数据传输系统,两种节点访问设备,两种节点访问装置,一种计算设备,以及一种计算机可读存储介质,在下面的实施例中逐一进行详细说明。
参见图1,图1示出了根据本说明书一个实施例提供的一种节点访问方法的流程图,该方法应用于服务节点,具体包括以下步骤。
步骤102:接收请求报文数据。
其中,请求报文数据可以为客户端发送的报文数据,可以理解为对服务端某一服务进行通信的报文数据。
在实际应用中,在VPC场景下,包括请求节点、服务节点以及负载均衡节点,服务节点中存在多个服务提供方的服务端,请求节点中存在多个租户的客户端,服务端可以从客户端接收请求报文数据,并根据请求报文数据提供服务。其中,请求报文数据可以为任意一个租户的客户端发送的,每个租户拥有自己的地址,相应地,每个服务提供方也拥有自己的地址。在首次通信时,服务端需要从负载均衡节点接收某个客户端的报文数据,才能获得该客户端的地址信息。
例如,从LVS设备接收客户端发送的请求报文数据。
本说明书实施例通过首次从负载均衡接地接收报文数据,从而可以获得相匹配的客户端所在的设备的地址,便于后续直接向客户端发送报文数据。
步骤104:根据所述请求报文数据生成回应报文数据;
其中,回应报文数据可以理解为对客户端返回的报文数据。
在实际应用中,服务器在接收到客户端的请求之后,需要发送一个回应报文。
例如,根据从LVS设备接收客户端发送的请求报文数据,生成回应报文数据。
在一种可实现的方式中,所述根据所述请求报文数据生成回应报文数据,包括:
根据目标类型的请求报文数据确定初始类型的请求报文数据,并根据所述初始类 型的请求报文数据建立入向地址对应关系;
根据所述初始类型的请求报文数据生成所述目标类型的回应报文数据。
其中,所述目标类型可以为IPV4类型;所述初始类型可以为IPV6类型;入向地址对应关系可以理解为五元组信息和与要更改的地址的对应关系。
例如,根据IPV4类型的请求报文数据确定IPV6类型的请求报文数据,并根据IPV6类型的请求报文数据中的五元组信息建立入向地址对应关系,具体地,入向地址对应关系包括入向索引和缓存,入向索引信息为:IPV6+(客户端ip)cip+(客户端端口)cport+(中转节点ip)vip+(中转节点端口)vport,入向缓存信息为:转换的源IP为虚拟ip(fip);转换的目的IP为服务端IP(rip);转换的源端口为虚拟端口(fport);转换的目的端口为服务端端口(rport)。然后根据IPV6类型的请求报文数据生成回应报文。
在一种可实现的方式中,所述根据所述初始类型的请求报文数据生成所述目标类型的回应报文数据,包括:
将所述初始类型的请求报文数据根据所述入向地址对应关系,生成虚拟请求报文数据,并根据所述虚拟请求报文数据建立出向地址对应关系;
根据所述虚拟请求报文数据生成所述目标类型的回应报文数据。
例如,将IPV6类型的请求报文数据根据入向地址对应关系生成IPV4类型的虚拟请求报文数据,并建立出向地址对应关系,具体地,出向地址对应关系包括出向索引和缓存,出向索引信息为:IPV4+(服务端IP)rip+(服务端端口)rport+(虚拟IP)fip+(虚拟端口)fport;出向缓存信息为:转换的源IP为接入服务IP(vip);转换的目的IP为客户端的IP地址(cip);转换的源端口为接入服务端口(vport);转换的目的端口为访问客户端的请求端口(cport);访问客户端所在宿主机(请求节点)的网卡地址为nc_ip;访问客户端所在VPC tunnel id(VPC隧道标识)。将IPV6类型的请求报文数据修改为IPV4类型的虚拟请求报文数据,提交给内核协议栈,最终由业务进程处理,业务进程接收到的就是一个来自虚拟IP的IPV4网络请求,业务进程对该网络请求发送回应报文。
本说明书实施例通过建立IPV6类型的报文数据对应的虚拟的IPV4地址,以使客户端的IPV6类型的报文数据可以与IPV4类型的服务端进行通信,提高了普适性。
步骤106:根据所述第一地址对应关系向请求节点发送所述回应报文数据,其中,所述第一地址对应关系通过中转节点发送的报文数据建立,且所述第一地址对应关系包括所述请求节点的地址与所述回应报文携带的地址的对应关系。
在实际应用中,服务器可以根据已建立的第一地址对应关系绕过中转节点直接访问客户端。
在一种可实现的方式中,所述根据所述第一地址对应关系向请求节点发送所述回 应报文数据,包括:
将所述目标类型的回应报文数据根据所述出向地址对应关系,生成初始类型的回应报文数据;
根据所述初始类型的回应报文数据中携带地址信息,将所述初始类型的回应报文数据发送至对应的请求节点。
其中,第一地址对应关系可以理解为包括上述的入向地址对应关系和出向地址对应关系。
例如,回应报文为IPV4类型的回应报文数据,五元组信息为IPV4+rip+rport+fip+fport。业务进程发送的回应报文达到内核协议栈,由内核协议栈发送,发送之前会用协议和报文的五元组信息IPV4+rip+rport+fip+fport匹配到出向索引,并找到对应缓存信息。依赖缓存信息对该报文进行IPV4转IPV6处理,即,将IPV4类型的回应报文数据更改为IPV6类型的回应报文数据,IPV6类型的回应报文数据中携带客户端你所在的请求节点的网卡地址以及访问客户端所在的VPC隧道标识,将IPV6类型的回应报文数据通过VPC隧道发送至对应的请求节点。
本说明书实施例提供一种节点访问方法以及数据传输系统,其中所述节点访问方法包括:接收请求报文数据,根据所述请求报文数据生成回应报文数据,根据所述第一地址对应关系向请求节点发送所述回应报文数据,其中,所述第一地址对应关系通过中转节点发送的报文数据建立,且所述第一地址对应关系包括所述请求节点的地址与所述回应报文携带的地址的对应关系。通过根据接收的请求报文数据生成回应报文数据,并根据第一地址对应关系向请求节点直接发送回应报文数据,绕开了中转设备,从而减轻了中转设备的负载,且实现了负载均衡。
参见图2,图2示出了根据本说明书一个实施例提供的另一种节点访问方法的流程图,具体包括以下步骤。
步骤202:通过中转节点转发第一请求报文数据至服务节点,以获取回应报文数据。
在实际应用中,客户端的首次报文需要向LVS设备转发,以匹配到服务节点。
在一种可实现的方式中,所述通过中转节点转发第一请求报文数据至服务节点,包括:
在初始类型的第一请求报文数据不存在所述第二地址对应关系的情况下,对所述初始类型的第一请求报文数据进行解析得到所述中转节点的地址;
根据所述中转节点的地址建立地址缓存记录,以及转发所述初始类型的第一请求报文数据至所述中转节点。
例如,客户端访问LVS设备(vip+vport),即发送报文协议为IPV6协议的报文数据,五元组信息为IPV6+cip+cport+vip+vport,根据IPV6+cip+cport+vip+vport 建立索引和缓存(第二地址对应关系),确认该网络流没有对应学源记录,结合客户端所在VPC信息,基于VPC tunnel id+vip查询到到要访问的vip是在LVS设备上,将该网络报文转发到LVS设备。
本说明书实施例在客户端第一次向服务端发送报文时建立地址缓存记录,以使之后在接收到服务端返回的报文时可以完善地址缓存记录形成第二地址对应关系,从而根据第二地址对应关系直接访问服务端,提高了通信效率。
在一种可实现的方式中,所述转发所述初始类型的第一请求报文数据至所述中转节点,包括:
将初始类型的第一请求报文数据转换为目标类型的请求报文数据,并将所述目标类型的请求报文数据发送至所述中转节点。
举例来说:IPV6网络报文进一步封装为IPV4的vxlan报文;vxlan报文的外层源地址为客户端所在宿主机的网卡地址,vxlan报文的目的地址为LVS设备的网卡地址,进而该vxlan报文能够在网络中通过路由转发到LVS设备。
步骤204:根据所述回应报文数据携带的服务节点的地址,建立所述服务节点的地址与所述中转节点的地址的第二地址对应关系。
在实际应用中,客户端根据服务器直接返回的报文即可确定服务器地址。
在一种可实现的方式中,所述根据所述回应报文数据携带的服务节点的地址,建立所述服务节点的地址与所述中转节点的地址的第二地址对应关系,包括:
对所述初始类型的回应报文数据进行解析得到所述服务节点的地址;
将所述服务节点的地址与所述地址缓存记录中的所述中转节点的地址进行匹配,并生成所述第二地址对应关系。
例如:解析接收到的服务器直接返回的vxlan报文,此时内层报文的五元组信息为IPV6+vip+vport+cip+cport,匹配第二地址对应关系中建立的索引和缓存。此时vxlan报文源地址为服务节点的网卡地址,由此产生该缓存的学源记录。即将服务节点的IP地址保存在该缓存中。客户端剥离vxlan报文,暴露内层的IPV6报文,即客户端收到了IPV6类型的回应报文。
本说明书实施例根据回应报文中的携带的服务端的地址,可以直接根据该地址访问服务端所在的服务节点,减少了负载均衡的压力,并且提高了通信效率。
步骤206:在需要发送第二请求报文数据时,根据所述第二请求报文数据针对的中转节点的地址在所述第二地址对应关系中对应的服务节点地址,向所述服务节点发送所述第二请求报文数据。
在实际应用中,客户端在发送首次报文之后,可以根据第二地址对应关系直接向服务器发送消息。
在一种可实现的方式中,所述根据所述第二请求报文数据针对的中转节点的地址在所述第二地址对应关系中对应的服务节点地址,向所述服务节点发送所述第二请求报文数据,包括:
将第二请求报文数据中携带中转节点的地址与所述第二地址对应关系进行匹配,得到对应的服务节点地址;
根据所述服务节点地址将所述第二请求报文数据转换为目标类型的第二请求报文数据;
向所述服务节点发送所述目标类型的第二请求报文数据。
例如:客户端继续访问LVS设备(vip+vport),五元组信息仍然为IPV6+cip+cport+vip+vport。客户端访问vip+vport的报文根据IPV6+cip+cport+vip+vport匹配到第二地址对应关系的索引和缓存,确认该缓存有对应学源记录,按照学源记录将该IPV6类型的请求报文数据转发到服务节点。转发的方法是将该IPV6类型的请求报文数据封装为IPV4类型的vxlan报文,vxlan报文的外层源地址为客户端所在宿主机(请求节点)的网卡地址,vxlan报文的目的地址为物理机服务器(服务节点)的网卡地址,进而该vxlan报文能够在网络中通过路由转发到物理机服务器。
本说明书实施例提供一种节点访问方法以及数据传输系统,其中所述节点访问方法包括:通过中转节点转发第一请求报文数据至服务节点,以获取回应报文数据,根据所述回应报文数据携带的服务节点的地址,建立所述服务节点的地址与所述中转节点的地址的第二地址对应关系,在需要发送第二请求报文数据时,根据所述第二请求报文数据针对的中转节点的地址在所述第二地址对应关系中对应的服务节点地址,向所述服务节点发送所述第二请求报文数据。通过中转节点转发第一请求报文数据至服务节点,以获取回应报文数据,根据所述回应报文数据携带的服务节点的地址,建立所述服务节点的地址与所述中转节点的地址的第二地址对应关系,从而再次发送报文时绕开了中转设备,从而减轻了中转设备的负载,且实现了负载均衡。
参见图3a,图3a示出了根据本说明书一个实施例提供的一种数据传输系统的示意图,所述数据传输系统包括,请求节点、中转节点和服务节点。
所述请求节点,被配置为将初始类型的请求报文数据转换为目标类型的请求报文数据,并将所述目标类型的请求报文数据发送至所述中转节点;
所述中转节点,被配置为根据调度规则将所述目标类型的请求报文数据发送至所述服务节点;
所述服务节点,被配置为根据所述目标类型的请求报文数据生成目标类型的回应报文数据,并建立第一地址对应关系,以及
根据所述第一地址对应关系将所述目标类型的回应报文数据转换为初始类型的回 应报文数据,并将所述初始类型的回应报文数据发送至所述请求节点;
所述请求节点,被配置为根据所述初始类型的回应报文数据建立第二地址对应关系,并根据所述第二地址对应关系访问所述服务节点。
在一种可实现的方式中,请求节点括请求报文劫持模块和客户端,中转节点为LVS设备,服务节点包括回应报文劫持模块和内核协议栈,其中,请求报文劫持模块具备学源能力,负责确定客户端的报文应该发向哪个LVS设备或者服务节点。即在本实施例中,由请求报文劫持模块决定客户端访问的网络报文是发送至LVS设备,还是发送至服务节点。LVS设备负责接收客户端访问的网络报文,并将报文转发至服务节点,同时告知服务节点,访问源的客户端的信息和访问目标的信息。回应报文劫持模块安装在服务节点中的内核模块,该模块在内核协议栈收取和发送报文的路径上注册hook(劫持)点,劫持每一个数据包,并对数据包做处理:负责解析LVS转发过来的网络报文,解析访问源的信息,并且负责将IPV6报文转换为IPV4报文,提交给内核协议栈,进而转至业务进程,以及负责将业务进程回应的IPV4报文转换为IPV6报文,进一步地,回应报文劫持模块负责将业务进程回应的报文,指定直接发送到访问源的请求节点。
进一步地,参见图3b,图3b示出了根据本说明书一个实施例提供的一种数据传输系统的时序图。在首次进行连接时,请求节点中的请求报文劫持模块将IPV6请求报文封装为VPC隧道格式的IPV4请求报文(如vxlan协议),该VPC隧道格式的IPV4请求报文中会携带请求节点的网卡地址,再将IPV4请求报文发送至对应的中转节点。
中转节点根据调度规则,选择合适的服务节点(如通信延迟低的服务节点),并在IPV4请求报文中添加VPC隧道标识等信息,将IPV4请求报文发送至对应的服务节点。
服务节点中的首先将IPV4请求报文进行拆封得到内部的IPV6请求报文,根据该IPV6请求报文的五元组信息生成虚拟的IPV4五元组信息,并记录IPV6请求报文中五元组信息与虚拟的IPV4五元组信息的对应关系,即入向地址对应关系,根据入向地址对应关系将IPV6请求报文转换为虚拟的IPV4请求报文,并建立出向地址对应关系,出向地址对应关系包括虚拟的IPV4五元组信息与IPV6请求报文中五元组信息,以及客户端所在的请求节点的网卡地址和访问请求节点的所要使用的VPC隧道标识,也就是说,可以通过出向地址对应关系确定通过哪一条VPC隧道,将报文数据发往哪一个请求节点。接着将虚拟的IPV4请求报文发送至内核协议栈,内核协议栈进而将虚拟的IPV4请求报文转至业务进程,业务进程会针对虚拟的IPV4请求报文生成IPV4回应报文,回应报文劫持模块劫持该IPV4回应报文,并将IPV4回应报文通过出向地址对应关系转换为IPV6回应报文,该IPV6回应报文需要封装为VPC隧道格式的报文(如vxlan协议),才能通过相应的VPC隧道标识选择VPC隧道发送IPV6回应报文至请求节点。 需要说明的是,第一地址对应关系包括出向地址对应关系和出向地址对应关系。
请求节点中的请求报文劫持模块收到VPC隧道格式的IPV6回应报文的情况下,可以从VPC隧道格式的IPV6回应报文中得到服务节点的地址信息,以此生成第二地址对应关系,第二知识对应关系中包括本次通信过程中的客户端的IPV6请求报文的五元组信息以及服务节点的网卡地址。
当该客户端再次发送新的IPV6请求报文的情况下,请求报文劫持模块将判断新的IPV6请求报文的五元组信息在第二地址对应关系中是否有对应的服务节点地址,如果存在对应的服务节点地址,则直接将新的IPV6请求报文封装为IPV4请求报文转发给对应的服务节点。
进一步地,所述服务节点,被配置为监测所述第一地址对应关系中的地址数量,在所述地址数量超过预设数量阈值的情况下,向管控端发送报警信息。
其中,地址数量可以理解为五元组信息的数量。
在实际应用中,服务节点经过一段时间的连接之后,服务节点的第一地址对应关系中的五元组信息的缓存数量会增加,那么该服务节点的计算压力会增加,在到达一定的连接数量后,需要对该服务节点与一些请求节点之间对应关系进行重新分配。
在一种可能的实现方式中,预设数量阈值可以为100,预设第一地址对应关系中的五元组信息的缓存数量超过100个,那么向控制端发送报警信息,以使工作人员调整第一地址对应关系。
另外,还可以根据使用时间来确定清除哪些缓存,在预设第一地址对应关系中的五元组信息的缓存数量超过100个的情况下,判断第一地址对应关系中的五元组信息最近一次使用时间,如果超过设定的时间阈值未使用,则将该五元组信息的缓存清理掉,进一步地,还可以在时间阈值的条件下清除固定数量的五元组信息的缓存,例如,在预设第一地址对应关系中的五元组信息的缓存数量超过100个的情况下,按照最近一次使用时间进行排列,清除超过设定的时间阈值未使用的20个五元组信息的缓存。
本说明书实施例提供一种数据传输系统,该系统包括:请求节点、中转节点和服务节点,所述请求节点将初始类型的请求报文数据转换为目标类型的请求报文数据,并将所述目标类型的请求报文数据发送至所述中转节点;数据传输系统所述中转节点根据调度规则将所述目标类型的请求报文数据发送至所述服务节点;所述服务节点根据所述目标类型的请求报文数据生成目标类型的回应报文数据,并建立第一地址对应关系,以及根据所述第一地址对应关系将所述目标类型的回应报文数据转换为初始类型的回应报文数据,并将所述初始类型的回应报文数据发送至所述请求节点;所述请求节点根据所述初始类型的回应报文数据建立第二地址对应关系,并根据所述第二地址对应关系访问所述服务节点。可以实现请求节点和服务节点之间的通信绕开了中转设备,从而减轻了中转设备的负载,且实现了负载均衡。
下述结合附图4,以本说明书提供的节点访问方法在分布式系统的应用为例,对所述节点访问方法进行进一步说明。其中,图4示出了本说明书一个实施例提供的一种节点访问方法的处理过程流程图,具体包括以下步骤。
步骤402:请求节点通过中转节点转发第一请求报文数据至服务节点。
步骤404:服务节点接收第一请求报文数据。
步骤406:服务节点根据所述第一请求报文数据生成回应报文数据。
步骤408:服务节点根据所述第一地址对应关系向请求节点发送所述回应报文数据。
步骤410:请求节点根据所述回应报文数据携带的服务节点的地址,建立所述服务节点的地址与所述中转节点的地址的第二地址对应关系。
步骤412:请求节点在需要发送第二请求报文数据时,根据所述第二请求报文数据针对的中转节点的地址在所述第二地址对应关系中对应的服务节点地址,向所述服务节点发送所述第二请求报文数据。
本说明书实施例实现请求节点和服务节点之间的通信绕开了中转设备,从而减轻了中转设备的负载,且实现了负载均衡。
与上述方法实施例相对应,本说明书还提供了节点访问设备的实施例,该设备包括:
接收模块,被配置为接收请求报文数据;
生成模块,被配置为根据所述请求报文数据生成回应报文数据;
访问模块,被配置为根据所述第一地址对应关系向请求节点发送所述回应报文数据,其中,所述第一地址对应关系通过中转节点发送的请求报文数据建立,且所述第一地址对应关系包括所述请求节点的地址与所述回应报文携带的地址的对应关系。
在一种可行的实现方式中,生成模块,还被配置为:
根据目标类型的请求报文数据确定初始类型的请求报文数据,并根据所述初始类型的请求报文数据建立入向地址对应关系;
根据所述初始类型的请求报文数据生成所述目标类型的回应报文数据。
在一种可行的实现方式中,生成模块,还被配置为:
将所述初始类型的请求报文数据根据所述入向地址对应关系,生成虚拟请求报文数据,并根据所述虚拟请求报文数据建立出向地址对应关系;
根据所述虚拟请求报文数据生成所述目标类型的回应报文数据。
在一种可行的实现方式中,访问模块,还被配置为:
将所述目标类型的回应报文数据根据所述出向地址对应关系,生成初始类型的回 应报文数据;
根据所述初始类型的回应报文数据中携带地址信息,将所述初始类型的回应报文数据发送至对应的请求节点。
本说明书实施例提供一种节点访问装置,其中所述节点访问装置包括:接收请求报文数据,根据所述请求报文数据生成回应报文数据,根据所述第一地址对应关系向请求节点发送所述回应报文数据,其中,所述第一地址对应关系通过中转节点发送的报文数据建立,且所述第一地址对应关系包括所述请求节点的地址与所述回应报文携带的地址的对应关系。通过根据接收的请求报文数据生成回应报文数据,并根据第一地址对应关系向请求节点直接发送回应报文数据,绕开了中转设备,从而减轻了中转设备的负载,且实现了负载均衡。
与上述方法实施例相对应,本说明书还提供了另一种节点访问设备的实施例,该设备包括:
发送模块,被配置为通过中转节点转发第一请求报文数据至服务节点,以获取回应报文数据;
关系建立模块,被配置为根据所述回应报文数据携带的服务节点的地址,建立所述服务节点的地址与所述中转节点的地址的第二地址对应关系;
访问模块,被配置为在需要发送第二请求报文数据时,根据所述第二请求报文数据针对的中转节点的地址在所述第二地址对应关系中对应的服务节点地址,向所述服务节点发送所述第二请求报文数据。
在一种可行的实现方式中,发送模块,还被配置为:
在初始类型的第一请求报文数据不存在所述第二地址对应关系的情况下,对所述初始类型的第一请求报文数据进行解析得到所述中转节点的地址;
根据所述中转节点的地址建立地址缓存记录,以及转发所述初始类型的第一请求报文数据至所述中转节点。
在一种可行的实现方式中,发送模块,还被配置为:
将初始类型的第一请求报文数据转换为目标类型的请求报文数据,并将所述目标类型的请求报文数据发送至所述中转节点。
在一种可行的实现方式中,关系建立模块,还被配置为:
对所述初始类型的回应报文数据进行解析得到所述服务节点的地址;
将所述服务节点的地址与所述地址缓存记录中的所述中转节点的地址进行匹配,并生成所述第二地址对应关系。
在一种可行的实现方式中,访问模块,还被配置为:
将第二请求报文数据中携带中转节点的地址与所述第二地址对应关系进行匹配, 得到对应的服务节点地址;
根据所述服务节点地址将所述第二请求报文数据转换为目标类型的第二请求报文数据;
向所述服务节点发送所述目标类型的第二请求报文数据。
本说明书实施例提供一种节点访问设备,包括:通过中转节点转发第一请求报文数据至服务节点,以获取回应报文数据,根据所述回应报文数据携带的服务节点的地址,建立所述服务节点的地址与所述中转节点的地址的第二地址对应关系,在需要发送第二请求报文数据时,根据所述第二请求报文数据针对的中转节点的地址在所述第二地址对应关系中对应的服务节点地址,向所述服务节点发送所述第二请求报文数据。通过中转节点转发第一请求报文数据至服务节点,以获取回应报文数据,根据所述回应报文数据携带的服务节点的地址,建立所述服务节点的地址与所述中转节点的地址的第二地址对应关系,从而再次发送报文时绕开了中转设备,从而减轻了中转设备的负载,且实现了负载均衡。
与上述方法实施例相对应,本说明书还提供了节点访问装置实施例,图5示出了本说明书一个实施例提供的一种节点访问装置的结构示意图。如图5所示,该装置包括:
接收模块502,被配置为接收请求报文数据;
生成模块504,被配置为根据所述请求报文数据生成回应报文数据;
访问模块506,被配置为根据所述第一地址对应关系向请求节点发送所述回应报文数据,其中,所述第一地址对应关系通过中转节点发送的请求报文数据建立,且所述第一地址对应关系包括所述请求节点的地址与所述回应报文携带的地址的对应关系。
在一种可行的实现方式中,生成模块504,还被配置为:
根据目标类型的请求报文数据确定初始类型的请求报文数据,并根据所述初始类型的请求报文数据建立入向地址对应关系;
根据所述初始类型的请求报文数据生成所述目标类型的回应报文数据。
在一种可行的实现方式中,生成模块504,还被配置为:
将所述初始类型的请求报文数据根据所述入向地址对应关系,生成虚拟请求报文数据,并根据所述虚拟请求报文数据建立出向地址对应关系;
根据所述虚拟请求报文数据生成所述目标类型的回应报文数据。
在一种可行的实现方式中,访问模块506,还被配置为:
将所述目标类型的回应报文数据根据所述出向地址对应关系,生成初始类型的回应报文数据;
根据所述初始类型的回应报文数据中携带地址信息,将所述初始类型的回应报文 数据发送至对应的请求节点。
本说明书实施例提供一种节点访问装置,其中所述节点访问装置包括:接收请求报文数据,根据所述请求报文数据生成回应报文数据,根据所述第一地址对应关系向请求节点发送所述回应报文数据,其中,所述第一地址对应关系通过中转节点发送的报文数据建立,且所述第一地址对应关系包括所述请求节点的地址与所述回应报文携带的地址的对应关系。通过根据接收的请求报文数据生成回应报文数据,并根据第一地址对应关系向请求节点直接发送回应报文数据,绕开了中转设备,从而减轻了中转设备的负载,且实现了负载均衡。
与上述方法实施例相对应,本说明书还提供了另一种节点访问装置实施例,图6示出了本说明书一个实施例提供的另一种节点访问装置的结构示意图。如图6所示,该装置包括:
发送模块602,被配置为通过中转节点转发第一请求报文数据至服务节点,以获取回应报文数据;
关系建立模块604,被配置为根据所述回应报文数据携带的服务节点的地址,建立所述服务节点的地址与所述中转节点的地址的第二地址对应关系;
访问模块606,被配置为在需要发送第二请求报文数据时,根据所述第二请求报文数据针对的中转节点的地址在所述第二地址对应关系中对应的服务节点地址,向所述服务节点发送所述第二请求报文数据。
在一种可行的实现方式中,发送模块602,还被配置为:
在初始类型的第一请求报文数据不存在所述第二地址对应关系的情况下,对所述初始类型的第一请求报文数据进行解析得到所述中转节点的地址;
根据所述中转节点的地址建立地址缓存记录,以及转发所述初始类型的第一请求报文数据至所述中转节点。
在一种可行的实现方式中,发送模块602,还被配置为:
将初始类型的第一请求报文数据转换为目标类型的请求报文数据,并将所述目标类型的请求报文数据发送至所述中转节点。
在一种可行的实现方式中,关系建立模块604,还被配置为:
对所述初始类型的回应报文数据进行解析得到所述服务节点的地址;
将所述服务节点的地址与所述地址缓存记录中的所述中转节点的地址进行匹配,并生成所述第二地址对应关系。
在一种可行的实现方式中,访问模块606,还被配置为:
将第二请求报文数据中携带中转节点的地址与所述第二地址对应关系进行匹配,得到对应的服务节点地址;
根据所述服务节点地址将所述第二请求报文数据转换为目标类型的第二请求报文数据;
向所述服务节点发送所述目标类型的第二请求报文数据。
本说明书实施例提供一种节点访问装置,包括:通过中转节点转发第一请求报文数据至服务节点,以获取回应报文数据,根据所述回应报文数据携带的服务节点的地址,建立所述服务节点的地址与所述中转节点的地址的第二地址对应关系,在需要发送第二请求报文数据时,根据所述第二请求报文数据针对的中转节点的地址在所述第二地址对应关系中对应的服务节点地址,向所述服务节点发送所述第二请求报文数据。通过中转节点转发第一请求报文数据至服务节点,以获取回应报文数据,根据所述回应报文数据携带的服务节点的地址,建立所述服务节点的地址与所述中转节点的地址的第二地址对应关系,从而再次发送报文时绕开了中转设备,从而减轻了中转设备的负载,且实现了负载均衡。
上述为本实施例的一种节点访问装置的示意性方案。需要说明的是,该节点访问装置的技术方案与上述的节点访问方法的技术方案属于同一构思,节点访问装置的技术方案未详细描述的细节内容,均可以参见上述节点访问方法的技术方案的描述。
图7示出了根据本说明书一个实施例提供的一种计算设备700的结构框图。该计算设备700的部件包括但不限于存储器710和处理器720。处理器720与存储器710通过总线730相连接,数据库750用于保存数据。
计算设备700还包括接入设备740,接入设备740使得计算设备700能够经由一个或多个网络760通信。这些网络的示例包括公用交换电话网(PSTN)、局域网(LAN)、广域网(WAN)、个域网(PAN)或诸如因特网的通信网络的组合。接入设备740可以包括有线或无线的任何类型的网络接口(例如,网络接口卡(NIC))中的一个或多个,诸如IEEE802.11无线局域网(WLAN)无线接口、全球微波互联接入(Wi-MAX)接口、以太网接口、通用串行总线(USB)接口、蜂窝网络接口、蓝牙接口、近场通信(NFC)接口,等等。
在本说明书的一个实施例中,计算设备700的上述部件以及图7中未示出的其他部件也可以彼此相连接,例如通过总线。应当理解,图7所示的计算设备结构框图仅仅是出于示例的目的,而不是对本说明书范围的限制。本领域技术人员可以根据需要,增添或替换其他部件。
计算设备700可以是任何类型的静止或移动计算设备,包括移动计算机或移动计算设备(例如,平板计算机、个人数字助理、膝上型计算机、笔记本计算机、上网本等)、移动电话(例如,智能手机)、可佩戴的计算设备(例如,智能手表、智能眼镜等)或其他类型的移动设备,或者诸如台式计算机或PC的静止计算设备。计算设备700还可以是移动式或静止式的服务器。
其中,处理器720用于执行如下计算机可执行指令,该计算机可执行指令被处理 器执行时实现上述节点访问方法的步骤。
上述为本实施例的一种计算设备的示意性方案。需要说明的是,该计算设备的技术方案与上述的节点访问方法的技术方案属于同一构思,计算设备的技术方案未详细描述的细节内容,均可以参见上述节点访问方法的技术方案的描述。
本说明书一实施例还提供一种计算机可读存储介质,其存储有计算机可执行指令,该计算机可执行指令被处理器执行时实现上述节点访问方法的步骤。
上述为本实施例的一种计算机可读存储介质的示意性方案。需要说明的是,该存储介质的技术方案与上述的节点访问方法的技术方案属于同一构思,存储介质的技术方案未详细描述的细节内容,均可以参见上述节点访问方法的技术方案的描述。
本说明书一实施例还提供一种计算机程序,其中,当所述计算机程序在计算机中执行时,令计算机执行上述节点访问方法的步骤。
上述为本实施例的一种计算机程序的示意性方案。需要说明的是,该计算机程序的技术方案与上述的节点访问方法的技术方案属于同一构思,计算机程序的技术方案未详细描述的细节内容,均可以参见上述节点访问方法的技术方案的描述。
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
所述计算机指令包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。
需要说明的是,对于前述的各方法实施例,为了简便描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本说明书实施例并不受所描述的动作顺序的限制,因为依据本说明书实施例,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定都是本说明书实施例所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。
以上公开的本说明书优选实施例只是用于帮助阐述本说明书。可选实施例并没有详尽叙述所有的细节,也不限制该发明仅为所述的具体实施方式。显然,根据本说明书实施例的内容,可作很多的修改和变化。本说明书选取并具体描述这些实施例,是为了更好地解释本说明书实施例的原理和实际应用,从而使所属技术领域技术人员能很好地理解和利用本说明书。本说明书仅受权利要求书及其全部范围和等效物的限制。

Claims (15)

  1. 一种节点访问方法,应用于分布式系统中的服务节点,所述方法包括:
    接收请求报文数据;
    根据所述请求报文数据生成回应报文数据;
    根据第一地址对应关系向请求节点发送所述回应报文数据,其中,所述第一地址对应关系通过中转节点发送的报文数据建立,且所述第一地址对应关系包括所述请求节点的地址与所述回应报文携带的地址的对应关系。
  2. 根据权利要求1所述的方法,所述根据所述请求报文数据生成回应报文数据,包括:
    根据目标类型的请求报文数据确定初始类型的请求报文数据,并根据所述初始类型的请求报文数据建立入向地址对应关系;
    根据所述初始类型的请求报文数据生成所述目标类型的回应报文数据。
  3. 根据权利要求2所述的方法,所述根据所述初始类型的请求报文数据生成所述目标类型的回应报文数据,包括:
    将所述初始类型的请求报文数据根据所述入向地址对应关系,生成虚拟请求报文数据,并根据所述虚拟请求报文数据建立出向地址对应关系;
    根据所述虚拟请求报文数据生成所述目标类型的回应报文数据。
  4. 根据权利要求3所述的方法,所述根据所述第一地址对应关系向请求节点发送所述回应报文数据,包括:
    将所述目标类型的回应报文数据根据所述出向地址对应关系,生成初始类型的回应报文数据;
    根据所述初始类型的回应报文数据中携带地址信息,将所述初始类型的回应报文数据发送至对应的请求节点。
  5. 一种节点访问方法,应用于分布式系统中的请求节点,所述方法包括:
    通过中转节点转发第一请求报文数据至服务节点,以获取回应报文数据;
    根据所述回应报文数据携带的服务节点的地址,建立所述服务节点的地址与所述中转节点的地址的第二地址对应关系;
    在需要发送第二请求报文数据时,根据所述第二请求报文数据针对的中转节点的地址在所述第二地址对应关系中对应的服务节点地址,向所述服务节点发送所述第二请求报文数据。
  6. 根据权利要求5所述的方法,所述通过中转节点转发第一请求报文数据至服务节点,包括:
    在初始类型的第一请求报文数据不存在所述第二地址对应关系的情况下,对所述初始 类型的第一请求报文数据进行解析得到所述中转节点的地址;
    根据所述中转节点的地址建立地址缓存记录,以及转发所述初始类型的第一请求报文数据至所述中转节点。
  7. 根据权利要求6所述的方法,所述转发所述初始类型的请求报文数据至所述中转节点,包括:
    将初始类型的第一请求报文数据转换为目标类型的请求报文数据,并将所述目标类型的请求报文数据发送至所述中转节点。
  8. 根据权利要求6所述的方法,所述根据所述回应报文数据携带的服务节点的地址,建立所述服务节点的地址与所述中转节点的地址的第二地址对应关系,包括:
    对所述初始类型的回应报文数据进行解析得到所述服务节点的地址;
    将所述服务节点的地址与所述地址缓存记录中的所述中转节点的地址进行匹配,并生成所述第二地址对应关系。
  9. 根据权利要求5所述的方法,所述根据所述第二请求报文数据针对的中转节点的地址在所述第二地址对应关系中对应的服务节点地址,向所述服务节点发送所述第二请求报文数据,包括:
    将第二请求报文数据中携带中转节点的地址与所述第二地址对应关系进行匹配,得到对应的服务节点地址;
    根据所述服务节点地址将所述第二请求报文数据转换为目标类型的第二请求报文数据;
    向所述服务节点发送所述目标类型的第二请求报文数据。
  10. 一种数据传输系统,所述数据传输系统包括,请求节点、中转节点和服务节点;
    所述请求节点,被配置为将初始类型的请求报文数据转换为目标类型的请求报文数据,并将所述目标类型的请求报文数据发送至所述中转节点;
    所述中转节点,被配置为根据调度规则将所述目标类型的请求报文数据发送至所述服务节点;
    所述服务节点,被配置为根据所述目标类型的请求报文数据生成目标类型的回应报文数据,并建立第一地址对应关系,以及
    根据所述第一地址对应关系将所述目标类型的回应报文数据转换为初始类型的回应报文数据,并将所述初始类型的回应报文数据发送至所述请求节点;
    所述请求节点,被配置为根据所述初始类型的回应报文数据建立第二地址对应关系,并根据所述第二地址对应关系访问所述服务节点。
  11. 根据权利要求10的系统,还包括:
    所述服务节点,被配置为监测所述第一地址对应关系中的地址数量,在所述地址数量 超过预设数量阈值的情况下,向管控端发送报警信息。
  12. 一种数据传输设备,包括:
    接收模块,被配置为接收请求报文数据;
    生成模块,被配置为根据所述请求报文数据生成回应报文数据;
    访问模块,被配置为根据第一地址对应关系向请求节点发送所述回应报文数据,其中,所述第一地址对应关系通过中转节点发送的报文数据建立,且所述第一地址对应关系包括所述请求节点的地址与所述回应报文携带的地址的对应关系。
  13. 一种数据传输设备,包括:
    发送模块,被配置为通过中转节点转发第一请求报文数据至服务节点,以获取回应报文数据;
    关系建立模块,被配置为根据所述回应报文数据携带的服务节点的地址,建立所述服务节点的地址与所述中转节点的地址的第二地址对应关系;
    访问模块,被配置为在需要发送第二请求报文数据时,根据所述第二请求报文数据针对的中转节点的地址在所述第二地址对应关系中对应的服务节点地址,向所述服务节点发送所述第二请求报文数据。
  14. 一种计算设备,包括:
    存储器和处理器;
    所述存储器用于存储计算机可执行指令,所述处理器用于执行所述计算机可执行指令,该计算机可执行指令被处理器执行时实现权利要求1至9任意一项所述节点访问方法的步骤。
  15. 一种计算机可读存储介质,其存储有计算机可执行指令,该计算机可执行指令被处理器执行时实现权利要求1至9任意一项所述节点访问方法的步骤。
PCT/CN2023/085535 2022-04-01 2023-03-31 节点访问方法以及数据传输系统 WO2023186109A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210339380.6A CN114827078A (zh) 2022-04-01 2022-04-01 节点访问方法以及数据传输系统
CN202210339380.6 2022-04-01

Publications (1)

Publication Number Publication Date
WO2023186109A1 true WO2023186109A1 (zh) 2023-10-05

Family

ID=82532928

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/085535 WO2023186109A1 (zh) 2022-04-01 2023-03-31 节点访问方法以及数据传输系统

Country Status (2)

Country Link
CN (1) CN114827078A (zh)
WO (1) WO2023186109A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114827078A (zh) * 2022-04-01 2022-07-29 阿里云计算有限公司 节点访问方法以及数据传输系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217482A (zh) * 2008-01-18 2008-07-09 杭州华三通信技术有限公司 一种穿越nat下发策略的方法和一种通信装置
CN102347993A (zh) * 2010-07-28 2012-02-08 中国移动通信集团公司 一种网络通信的方法和设备
CN104052830A (zh) * 2014-05-29 2014-09-17 汉柏科技有限公司 网络转发方法和设备
CN107026890A (zh) * 2016-02-02 2017-08-08 华为技术有限公司 一种基于服务器集群的报文生成方法和负载均衡器
CN114827078A (zh) * 2022-04-01 2022-07-29 阿里云计算有限公司 节点访问方法以及数据传输系统

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442493B (zh) * 2008-12-26 2011-08-10 华为技术有限公司 Ip报文分发方法、集群系统和负载均衡器
CN101616079B (zh) * 2009-07-30 2011-07-27 杭州华三通信技术有限公司 Dns请求报文的nat出口链路负载均衡方法及装置
WO2017133291A1 (zh) * 2016-02-02 2017-08-10 华为技术有限公司 一种基于服务器集群的报文生成方法和负载均衡器
EP3361675B1 (en) * 2016-12-14 2019-05-08 Huawei Technologies Co., Ltd. Distributed load balancing system, health check method and service node
CN108667888B (zh) * 2017-09-08 2020-12-29 新华三技术有限公司 一种负载均衡方法和装置
US11038952B2 (en) * 2019-07-12 2021-06-15 Ebay Inc. Connection service discovery and load rebalancing
CN111131439A (zh) * 2019-12-20 2020-05-08 浪潮电子信息产业股份有限公司 基于iSCSI的报文传输方法、装置、设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217482A (zh) * 2008-01-18 2008-07-09 杭州华三通信技术有限公司 一种穿越nat下发策略的方法和一种通信装置
CN102347993A (zh) * 2010-07-28 2012-02-08 中国移动通信集团公司 一种网络通信的方法和设备
CN104052830A (zh) * 2014-05-29 2014-09-17 汉柏科技有限公司 网络转发方法和设备
CN107026890A (zh) * 2016-02-02 2017-08-08 华为技术有限公司 一种基于服务器集群的报文生成方法和负载均衡器
CN114827078A (zh) * 2022-04-01 2022-07-29 阿里云计算有限公司 节点访问方法以及数据传输系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"3rd Generation Partnership Project; Technical Specification Group Radio Access Network; IP transport in UTRAN; (Release 5)", 3GPP STANDARD; 3GPP TR 25.933, 3RD GENERATION PARTNERSHIP PROJECT (3GPP), MOBILE COMPETENCE CENTRE ; 650, ROUTE DES LUCIOLES ; F-06921 SOPHIA-ANTIPOLIS CEDEX ; FRANCE, no. V5.2.0, 1 September 2002 (2002-09-01), Mobile Competence Centre ; 650, route des Lucioles ; F-06921 Sophia-Antipolis Cedex ; France , pages 1 - 132, XP050369471 *

Also Published As

Publication number Publication date
CN114827078A (zh) 2022-07-29

Similar Documents

Publication Publication Date Title
US9876760B2 (en) Peer-to-peer connection establishment using turn
US11277313B2 (en) Data transmission method and corresponding device
CN109889618B (zh) 用于处理dns请求的方法和系统
EP3225014B1 (en) Source ip address transparency systems and methods
WO2021073565A1 (zh) 业务服务提供方法及系统
WO2023005773A1 (zh) 基于远程直接数据存储的报文转发方法、装置、网卡及设备
WO2021047515A1 (zh) 一种服务路由方法及装置
WO2021073555A1 (zh) 业务服务提供方法及系统、远端加速网关
US20080205388A1 (en) Discovery of network devices logically located between a client and a service
CN112968965B (zh) Nfv网络节点的元数据服务方法、服务器及存储介质
CN113228571B (zh) 用于从驻地网络访问云服务的网络优化的方法和设备
US20150373135A1 (en) Wide area network optimization
WO2021008591A1 (zh) 数据传输方法、装置及系统
CN112073545B (zh) 使用dns来传送服务器设备的mp-tcp能力
JP5360233B2 (ja) 負荷分散システム及びその方法
WO2023186109A1 (zh) 节点访问方法以及数据传输系统
CN113810349B (zh) 数据传输方法、装置、计算机设备和存储介质
WO2009053878A1 (en) Methods and systems for offload processing
WO2023116165A1 (zh) 网络负载均衡方法、装置、电子设备、介质和程序产品
EP3926932A1 (en) Duplex load balancing for massive iot applications
CN113497767A (zh) 传输数据的方法、装置、计算设备及存储介质
US8036218B2 (en) Technique for achieving connectivity between telecommunication stations
CN108848175A (zh) 一种创建tcp连接的方法及装置
WO2024113776A1 (zh) 数据传输方法以及相关设备
WO2023056873A1 (zh) 数据请求方法、通信装置和通信系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23778473

Country of ref document: EP

Kind code of ref document: A1