WO2024109262A1 - 一种信息处理方法及装置、存储介质 - Google Patents
一种信息处理方法及装置、存储介质 Download PDFInfo
- Publication number
- WO2024109262A1 WO2024109262A1 PCT/CN2023/117536 CN2023117536W WO2024109262A1 WO 2024109262 A1 WO2024109262 A1 WO 2024109262A1 CN 2023117536 W CN2023117536 W CN 2023117536W WO 2024109262 A1 WO2024109262 A1 WO 2024109262A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- address
- information processing
- data access
- processing device
- access request
- Prior art date
Links
- 230000010365 information processing Effects 0.000 title claims abstract description 289
- 238000003672 processing method Methods 0.000 title claims abstract description 39
- 230000004044 response Effects 0.000 claims abstract description 117
- 230000015654 memory Effects 0.000 claims description 44
- 238000000034 method Methods 0.000 claims description 39
- 238000004590 computer program Methods 0.000 claims description 15
- 238000004891 communication Methods 0.000 claims description 13
- 230000005540 biological transmission Effects 0.000 claims description 12
- 230000004048 modification Effects 0.000 claims description 4
- 238000012986 modification Methods 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 22
- 238000012545 processing Methods 0.000 description 20
- 230000008569 process Effects 0.000 description 14
- 230000006870 function Effects 0.000 description 6
- 230000007246 mechanism Effects 0.000 description 5
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 3
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 2
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 2
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 2
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 2
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 229920001690 polydopamine Polymers 0.000 description 2
- 238000013519 translation Methods 0.000 description 2
- 101000652292 Homo sapiens Serotonin N-acetyltransferase Proteins 0.000 description 1
- 102100030547 Serotonin N-acetyltransferase Human genes 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/565—Conversion or adaptation of application format or content
Definitions
- the present application relates to the field of information processing technology, and relates to but is not limited to an information processing method and device, and a storage medium.
- the services on the container orchestration management platform (kubernetes, K8S) expose ClusterIP, NodePort, and load balancer to implement the load balancing process of data access requests through these services.
- data access requests and their corresponding response information will pass through the same computing node with a forwarding program.
- the number of data access requests increases, the number of corresponding response information will also increase accordingly.
- the number of computing nodes in K8s is limited.
- the bandwidth of the computing node containing the forwarding program will increase, thereby reducing the speed at which the computing node processes data access requests.
- the embodiments of the present application hope to provide an information processing method and device, and a storage medium, which can improve the processing speed of data access requests.
- the present application embodiment provides an information processing method, which is applied to a first information processing device.
- the information processing method includes:
- the request forwarding address is the address of the second information processing device
- the second address is the address of the first information processing device;
- the present application provides an information processing method, which is applied to a second information processing device.
- the information processing method includes:
- the first data access request is sent to the first information processing device.
- the present application provides a first information processing device, the device comprising:
- the parsing part is configured to parse the first data access request transmitted by the second information processing device to obtain a request forwarding address and a first address when receiving the first data access request transmitted by the second information processing device; the request forwarding address is the address of the second information processing device;
- a generating part configured to generate corresponding response information according to the first data access request
- a first modification part is configured to modify the second address in the response information to the request forwarding address to obtain updated response information; the second address is the address of the first information processing device;
- the transmission part is configured to transmit the updated response to the client corresponding to the first address. Response information.
- An embodiment of the present application provides a second information processing device, the device comprising:
- a first acquisition part is configured to acquire a request forwarding address from a second data access request transmitted by a client upon receiving the second data access request; and acquire a second address of the first information processing device;
- a determination part configured to determine the first information processing device according to the request forwarding address
- an adjustment part configured to adjust the second data access request using the request forwarding address and the second address to obtain a first data access request
- the sending part is configured to send the first data access request to the first information processing device.
- the present application provides a first information processing device, the device comprising:
- a first memory a first processor and a first communication bus, wherein the first memory communicates with the first processor via the first communication bus, the first memory stores an information processing program executable by the first processor, and when the information processing program is executed, the above-mentioned information processing method applied to the first information processing device is executed by the first processor.
- An embodiment of the present application provides a second information processing device, the device comprising:
- a second memory, a second processor and a second communication bus wherein the second memory communicates with the second processor via the second communication bus, and the second memory stores an information processing program executable by the second processor.
- the information processing program is executed, the information processing method applied to the second information processing device described above is executed by the second processor.
- the embodiment of the present application provides a storage medium on which a computer program is stored, which is applied to a first information processing device and a second information processing device.
- a computer program When the computer program is executed by the first processor, the information processing method applied to the first information processing device is implemented; when the computer program is executed by the second processor, the information processing method applied to the second information processing device is implemented.
- Information processing method When the computer program is executed by the first processor, the information processing method applied to the first information processing device is implemented; when the computer program is executed by the second processor, the information processing method applied to the second information processing device is implemented.
- the embodiment of the present application provides an information processing method and device, and a storage medium.
- the information processing method includes: when receiving a first data access request transmitted by a second information processing device, parsing the first data access request to obtain a request forwarding address and a first address; the request forwarding address is the address of the second information processing device; generating corresponding response information according to the first data access request; modifying the second address in the response information to the request forwarding address to obtain updated response information; the second address is the address of the first information processing device; transmitting the updated response information to the client corresponding to the first address.
- the first information processing device parses the first data access request to obtain the first address and the request forwarding address of the client, and modifies the second address in the response information to the request forwarding address, so that the client can think that the updated response information is sent by the second information processing device according to the request forwarding address, and can directly identify the updated response information, so that there is no need to use the second information processing device to transmit the response information to the client according to the transmission reverse path of the data access request.
- the bandwidth of the information processing device is reduced, that is, the bandwidth of the computing node is reduced, and the processing speed of the data access request is improved.
- FIG. 1( a ) is a schematic diagram of a ClusterIP mode in the prior art provided in an embodiment of the present application;
- FIG1( b ) is a schematic diagram of a NodePort mode in the prior art provided in an embodiment of the present application;
- FIG1( c ) is a schematic diagram of a load balancer mode in the prior art provided in an embodiment of the present application;
- FIG. 2( a ) is a diagram of a ClusterIP mode in the prior art provided in an embodiment of the present application. Sum response data flow diagram
- FIG2( b ) is a schematic diagram of request and response data flow of a NodePort mode in the prior art provided in an embodiment of the present application;
- FIG2( c ) is a schematic diagram of request and response data flow of a load balancing mode in the prior art provided by an embodiment of the present application;
- FIG3 is a flow chart of an information processing method provided in an embodiment of the present application.
- FIG4 is an exemplary information processing block diagram provided in an embodiment of the present application.
- FIG5 is a second flow chart of an information processing method provided in an embodiment of the present application.
- FIG6 is a schematic diagram of an exemplary request data sent within a k8s cluster provided in an embodiment of the present application
- FIG7 is a schematic diagram of an exemplary request data sent out by a k8s cluster provided in an embodiment of the present application
- FIG8 is a schematic diagram of a first information processing device according to an embodiment of the present application.
- FIG9 is a second schematic diagram of the structure of a first information processing device provided in an embodiment of the present application.
- FIG10 is a schematic diagram of a first structure of a second information processing device provided in an embodiment of the present application.
- FIG. 11 is a second schematic diagram of the composition structure of a second information processing device provided in an embodiment of the present application.
- ClusterIP is limited to workloads within the k8s cluster.
- the forwarding program is deployed on the computing node to forward the requests sent by the workload on the computing node to the workload on other nodes.
- ClusterIP is only accessible within the cluster.
- the NodePort method also deploys a forwarding program on the computing node.
- the workload (request end) outside the k8s cluster can access the computing node IP and the assigned port where the workload is located, and the forwarding program on the computing node forwards the access request to the workload in the cluster.
- the horizontal expansion capability is not good, and TCP ports need to be allocated from the computing node. Due to the number of ports, the number of services supported is limited.
- Load balancer refers to relying on traditional load balancing equipment to assign a service IP and port to the service in the k8s cluster.
- the client's request first reaches the load balancer, which forwards the request to the workload in the k8s cluster.
- the application embodiment provides an information processing method, which is applied to a first information processing device.
- FIG3 is a flow chart of an information processing method provided by the embodiment of the application. As shown in FIG3, the information processing method may include:
- S101 Upon receiving a first data access request transmitted by a second information processing device, parse the first data access request to obtain a request forwarding address and a first address; the request forwarding address is the address of the second information processing device.
- An information processing method provided in an embodiment of the present application is suitable for accessing data in K8s In the scenario where load balancing is required.
- the first information processing device can be implemented in various forms.
- the first information processing device described in the present application can include devices such as mobile phones, cameras, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, and devices such as digital TVs, desktop computers, and servers.
- devices such as mobile phones, cameras, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, and devices such as digital TVs, desktop computers, and servers.
- the first information processing device is a computing node within K8s
- the second information processing device can be a client (i.e., a computing node outside the K8s cluster), and the second information processing device can also be a computing node within K8s (i.e., other computing nodes except the first information processing device); the specific second information processing device can be determined according to actual conditions, and the embodiment of the present application does not limit this.
- the first data access request may be a request generated by the second information processing device; or the first data access request may be a request to forward the second data access request generated by the client to the first information processing device through the second information processing device.
- the first information processing device includes an address translation module (ReqMux-NAT-Agent) for parsing the first data access request to obtain the first address and the request forwarding address.
- ReqMux-NAT-Agent address translation module
- the first address is the address of the client.
- the first information processing device parses the first data access request, and the obtained request forwarding address is the same as the first address, both of which are the address of the second information processing device.
- the first address can be an Internet Protocol (IP)/Transmission Control Protocol (TCP) address, or other addresses; the specific first address can be determined based on actual conditions, and the embodiments of the present application do not limit this.
- IP Internet Protocol
- TCP Transmission Control Protocol
- request forwarding address may be an IP/TCP address; the request forwarding address may also be other addresses; the specific request forwarding address may be determined based on actual conditions, and the embodiments of the present application do not limit this.
- the address conversion module is deployed in each computing node in the K8s cluster.
- the first data access request may be an access request for any data; the specific first data access request may be determined based on actual conditions, and the embodiment of the present application does not limit this.
- the manner in which the first information processing device parses the first data access request is an existing technical manner; the specific manner can be determined based on actual conditions, and the embodiment of the present application does not limit this.
- the process in which the first information processing device, upon receiving a first data access request transmitted by a second information processing device, parses the first data access request to obtain a first address and a request forwarding address includes: the first information processing device, upon receiving the first data access request and the first data access request carries a preset identifier, parses the first data access request to obtain the first address and the request forwarding address.
- the preset identifier carried in the first data access request may be: the identifier of the preset identifier field in the IP option in the first data access request is the preset identifier.
- the preset identifier can be an unallocated identifier, and the preset identifier complies with the Request for Comments (RFC) regulations.
- RRC Request for Comments
- the preset identifier may be a code, or may be other identifiers; the specific preset identifier may be determined according to actual conditions, and the embodiments of the present application do not limit this.
- the first data access request includes an IP header and an IP message
- the IP option in the IP message records the destination address of the request (for the first data access request sent to the second information processing device, the destination address is the address of the second information processing device).
- the IP option consists of three fields: code, length, and value, wherein the information in value is the request forwarding address, the information in length is the length value of the information in Value, and code is a preset identifier.
- the first information processing device parses the first data access request and obtains the first address and the request forwarding address
- the first information processing device also establishes a first corresponding relationship between the first address, the second address and the request forwarding address.
- the second address is the device that actually processes the first data access request and generates corresponding response information, that is, the address of the first information processing device.
- the first address includes the source IP and source port (Port) of the client; the second address includes the destination IP and destination port (Port) of the first information processing device.
- the first information processing device will also obtain the transport layer protocol from the first data access request, such as the Transmission Control Protocol (TCP)/User Datagram Protocol (UDP).
- TCP Transmission Control Protocol
- UDP User Datagram Protocol
- the first information processing device uses the first address, the second address and the transport layer protocol as keys and the request forwarding address as the corresponding value to obtain a k-v key-value pair, that is, a first corresponding relationship.
- S102 Generate corresponding response information according to the first data access request.
- the first information processing device parses the first data access request and obtains the request forwarding address and the first address, the first information processing device generates corresponding response information according to the first data access request.
- the process in which the first information processing device generates corresponding response information according to the first data access request is a prior art, and the embodiment of the present application does not limit this.
- S103 modify the second address in the response information to the request forwarding address, and obtain updated response information; the second address is the address of the first information processing device.
- the first information processing device modifies the second address in the response information to the request forwarding address to obtain updated response information.
- the first information processing device may delete the second address in the response information and write the requested forwarding address in the position of the second address, thereby obtaining updated response information; the specific implementation method of the first information processing device modifying the second address in the response information to the requested forwarding address to obtain the updated response information can be determined according to actual conditions, and the embodiment of the present application does not limit this.
- the process in which the first information processing device modifies the second address in the response information to the request forwarding address to obtain the updated response information includes the first information processing device obtaining the destination sending address of the response information, the second address carried in the response information, and the request forwarding address; establishing a second correspondence between the destination sending address, the second address, and the request forwarding address; and when the first correspondence matches the second correspondence, modifying the second address in the response information to the request forwarding address to obtain the updated response information.
- the generated response information carries the second address.
- the manner in which the first information processing device establishes a second correspondence between the destination sending address, the second address and the request forwarding address is the same as the manner in which the information processing device establishes a first correspondence between the first address, the second address and the request forwarding address.
- the first information processing device determines that the request forwarding address in the first relationship is the same as the request forwarding address in the second relationship, the second address in the first relationship is the same as the second address in the second relationship, and the first address in the first relationship is the same as the destination sending address in the second relationship, the first information processing device determines that the first corresponding relationship matches the second corresponding relationship.
- S104 Transmit updated response information to the client corresponding to the first address.
- the first information processing device modifies the second address in the response information to the request forwarding address. After obtaining the updated response information, the first information processing device sends a request forwarding address to the first information processing device. The client corresponding to an address transmits updated response information.
- ReqMux-NAT-Agent is used to parse an IP message sent to the first information processing device (the first data access request is composed of multiple IP messages). If the code field is included in the IP option of the IP message, the field is parsed to obtain the request forwarding address before being modified by the request distribution module (ReqMux) in the second information processing device, and a record is generated.
- the key of the record is the five-tuple information extracted from the IP message (source IP, source port, destination IP, destination port, transport layer protocol), and the value of the record is the request forwarding address, thereby obtaining a first corresponding relationship.
- the five-tuple information is also extracted according to the above method to obtain the second corresponding relationship, and it is checked whether there is a record (to determine whether the first corresponding relationship matches the second corresponding relationship). If so (the first corresponding relationship matches the second corresponding relationship), the second address in the response information is modified to the request forwarding address to obtain an updated response information.
- ReqMux-NAT-Agent is divided into two parts, as shown in 2 in Figure 4.
- the program logic is connected in series to the message processing link (LocalIN) of the operating system protocol stack for the first information processing device through the HOOK mechanism of the operating system.
- the address conversion (DNAT, destination address conversion) program is executed preferentially.
- the Linux system uses the netfilter framework to register a hook function on the PREROUTING chain to parse the incoming IP message (parse the received message or the generated message).
- the field is parsed to obtain the request forwarding address before modification by the ReqMux in the second information processing device, and a record is generated.
- the key of the record is the five-tuple information (source IP, source port, destination IP, destination port, transport layer protocol) extracted from the IP message, and the value of the record is the request forwarding address, thereby obtaining the first corresponding relationship.
- the other part is for the message sent by the first information processing device, as shown in 3 of FIG4, through the HOOK mechanism of the operating system, the program logic is connected in series to the message processing link (LocalOut) of the operating system protocol stack for the message sent to the first information processing device, and by setting the priority, the program is executed first for the message sent to the first information processing device.
- the Linux system uses the netfilter framework in the POSTROUTING The hook function is registered on the chain, the five-tuple information is extracted, the second correspondence is obtained, and the information saved in 2 is searched (to determine whether the first correspondence matches the second correspondence). If found (that is, the first correspondence matches the second correspondence), the second address in the response information is modified to the request forwarding address (SNAT, source address translation) to obtain the updated response information.
- SNAT request forwarding address
- the first information processing device obtains the first address and request forwarding address of the client by parsing the first data access request, and modifies the second address in the response information to the request forwarding address, so that the client can believe that the updated response information is sent by the second information processing device based on the request forwarding address, and can directly identify the updated response information, thereby eliminating the need to use the second information processing device to transmit the response information to the client along the reverse transmission path of the data access request.
- the bandwidth of the information processing device is reduced, that is, the bandwidth of the computing node is reduced, and at the same time the processing speed of the data access request is improved.
- the present application embodiment further provides an information processing method, which is applied to a second information processing device.
- FIG5 is a flow chart of an information processing method applied to a second information processing device provided by the present application embodiment. As shown in FIG5 , the information processing method may include:
- An information processing method provided in an embodiment of the present application is suitable for a scenario in which load balancing is performed on data access requests in K8s.
- the second information processing device can be implemented in various forms.
- the second information processing device described in the present application can include devices such as mobile phones, cameras, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, and devices such as digital TVs, desktop computers, and servers.
- the second information processing device carries a request distribution module (ReqMux) for processing a second data access request transmitted by the client to the second information processing device or a second data access request generated by the second information processing device, obtains a first data access request, and sends it to the first information processing device.
- ReqMux request distribution module
- ReqMux is deployed in each computing node in the K8s cluster.
- the client is a computing node outside the K8s cluster
- the second information processing device is other computing nodes in the K8s cluster except the first information processing device.
- the second information processing device determines the first information processing device based on the request forwarding address (that is, the address of the second information processing device, and the second data access request generated by the second information processing device carries the request forwarding address) and obtains the second address of the first information processing device; adjusts the second data access request using the request forwarding address and the second address to obtain the first data access request; and sends the first data access request to the first information processing device.
- the request forwarding address that is, the address of the second information processing device, and the second data access request generated by the second information processing device carries the request forwarding address
- the second data access request carries a request forwarding address and a first address of the client, wherein the first address is the address of the client.
- the first address may be an IP/TCP address, or other addresses; the specific first address may be determined based on actual conditions, and the embodiments of the present application do not limit this.
- request forwarding address may be an IP/TCP address; the request forwarding address may also be other addresses; the specific request forwarding address may be determined based on actual conditions, and the embodiments of the present application do not limit this.
- the second address may be an IP/TCP address; the second address may also be other addresses; the specific second address may be determined based on actual conditions, and the embodiments of the present application do not limit this.
- the second data access request may be a request for accessing any data;
- the specific second data access request can be determined based on actual conditions, and this embodiment of the present application does not limit this.
- the second information processing device when the second information processing device receives the second data access request transmitted by the client, before obtaining the request forwarding address from the second data access request, the second information processing device will also use the dynamic routing protocol to broadcast the request forwarding address; or call the cluster external interface to register the request forwarding address.
- the second information processing device includes a routing module (RouteAgent) for broadcasting a request forwarding address using a dynamic routing protocol; or calling a cluster external interface to register a request forwarding address so that the client can transmit a second data access request to the second information processing device according to the request forwarding address.
- a routing module for broadcasting a request forwarding address using a dynamic routing protocol; or calling a cluster external interface to register a request forwarding address so that the client can transmit a second data access request to the second information processing device according to the request forwarding address.
- the second information processing device may also broadcast a request forwarding address to the client in other ways; the specific way in which the second information processing device broadcasts a request forwarding address to the client can be determined based on actual conditions, and the embodiment of the present application does not limit this.
- routing module is deployed in some computing nodes within the K8s cluster, such as the routing forwarding module is deployed in the second information processing device within the K8s cluster.
- S202 Determine the first information processing device according to the request forwarding address, and obtain the second address of the first information processing device.
- the second information processing device determines the first information processing device based on the request forwarding address and obtains the second address of the first information processing device.
- the method in which the second information processing device determines the first information processing device according to the request forwarding address is an existing technical method; the specific embodiment of the present application does not limit this.
- S203 Use the request forwarding address and the second address to adjust the second data access request to obtain the first data access request.
- the second information processing device determines the first information processing device according to the request forwarding address and obtains the second address of the first information processing device. The device adjusts the second data access request using the request forwarding address and the second address to obtain the first data access request.
- the process in which the second information processing device uses the request forwarding address and the second address to adjust the second data access request to obtain the first data access request includes: the second information processing device determines the first message header based on the second address; uses the first message header to modify the second message header in the second data access request to obtain the third data access request; adds the request forwarding address to the third data access request to obtain the first data access request.
- the first message header can be determined according to the format of the message header in the second data access request and the IP/TCP address.
- the process in which the second information processing device adds a request forwarding address in the third data access request to obtain the first data access request includes: the second information processing device adds a request forwarding address in the data message of the third data access request to obtain the first data access request.
- the second data access request includes at least one message, each of the at least one message includes an IP header and an IP message, and the IP option in the IP message consists of three fields: code, length and value, wherein the value of the value field is the requested forwarding address, the value of the length field is the length value of the information in the Value; code is a preset identifier.
- the second information processing device adds a request forwarding address to the data message of the third data access request to obtain the first data access request.
- the second information processing device can set the value of the value field of the data message (IP message) to the request forwarding address, and use the value of the length field to identify the information length of the request forwarding address information; and set the code to obtain the first data access request.
- IP message data message
- the second information processing device adjusts the second data access request using the request forwarding address and the second address, and after obtaining the first data access request, the second information processing device sends the first data access request to the first information processing device.
- ReqMux is used to receive a second data access request and match the request forwarding address (ip, port) of the request.
- the first information processing device back-end server
- the message header IP header and TCP header
- the corresponding IP and TCP port of the request forwarding address are modified to the IP and service port of the first information processing device, and the destination request address (i.e., the address of the first information processing device) is recorded in the IP option of the IP message of the second data access request.
- ReqMux can connect the program logic in series to the message processing link sent to the second information processing device by the operating system protocol stack through the HOOK mechanism of the operating system.
- the request dispatching program is executed preferentially for the message sent to the second information processing device.
- the Linux system uses the netfilter framework to register the hook function on the LOCAL_IN chain.
- IP and port number For all messages sent to the second information processing device, obtain the request forwarding address (IP and port number) of the message, search for the exposed service list through the IP and port number, and if found, select a backend server (workload, i.e., the first information processing device) through a consistent hashing algorithm (e.g., maglev consistent hashing algorithm), modify the message header of the second data access request, modify the corresponding IP and TCP port of the request forwarding address to the IP and service port (DNAT) of the first information processing device, and record the request forwarding address (ip, port) in the IP option of the IP message.
- the IP option consists of three fields: code, length, and value.
- the value of the value field is the request forwarding address, and the value of the length field is the length value of the information in the Value.
- the code is a preset identifier that complies with the IPv4RFC and IPv6RFC protocols.
- the preset identifier is a private code and does not conflict with other programs within the organization.
- a client outside the cluster transmits a second data access request to a second information processing device (computing node 1) in the K8s cluster; the second information processing device (ReqMux in) obtains a request forwarding address (172.1.2.1:80) from the second data access request; determines the first information processing device according to the request forwarding address, and obtains the second address of the first information processing device (192.168.1.3:8080); determines a first message header according to the second address; uses the first message header to modify the second message header in the second data access request, and obtains a third message header.
- the ReqMux-NAT-Agent in the second information processing device parses the first data access request to obtain the first address and the request forwarding address; generates corresponding response information according to the first data access request; ReqMux-NAT-Agent modifies the second address in the response information to the request forwarding address to obtain updated response information; transmits the updated response information to the client corresponding to the first address (workload: 10.1.2.3).
- the second information processing device determines the first information processing device according to the request forwarding address (i.e., the address of the second information processing device), and obtains the second address of the first information processing device; adjusts the second data access request using the request forwarding address and the second address to obtain the first data access request; and sends the first data access request to the first information processing device.
- the request forwarding address i.e., the address of the second information processing device
- the ReqMux-NAT-Agent in the second information processing device parses the first data access request to obtain the first address and the request forwarding address; at this time, the first address and the request forwarding address are the same, and the corresponding response information is generated according to the first data access request; the ReqMux-NAT-Agent modifies the second address in the response information to the request forwarding address to obtain the updated response information; and transmits the updated response information to the client corresponding to the first address (workload: 10.1.2.3).
- the second information processing device when the second information processing device receives the second data access request transmitted by the client, it adjusts the second data access request using the request forwarding address and the second address to obtain the first data access request, that is, adds the request forwarding address and the second address to the second data access request, so that the first information processing device can modify the second address in the response information to the request forwarding address, so that the client can believe that the updated response information is sent by the second information processing device according to the request forwarding address, and can directly identify the updated response information, thereby no longer needing to use
- a second information processing device is used to transmit response information to the client along the reverse transmission path of the data access request. When the number of data access requests and response information is large, the bandwidth of the information processing device is reduced, that is, the bandwidth of the computing node is reduced, while the processing speed of the data access request is improved.
- FIG8 is a schematic diagram of a composition structure of a first information processing device provided by the embodiment of the present application, and the first information processing device 1 may include:
- the parsing part 11 is configured to parse the first data access request transmitted by the second information processing device to obtain a request forwarding address and a first address when receiving the first data access request transmitted by the second information processing device; the request forwarding address is the address of the second information processing device;
- a generating part 12 configured to generate corresponding response information according to the first data access request
- the first modifying part 13 is configured to modify the second address in the response information to the request forwarding address to obtain updated response information; the second address is the address of the first information processing device;
- the transmission part 14 is configured to transmit the updated response information to the client corresponding to the first address.
- the parsing part 11 is configured to parse the first data access request to obtain the request forwarding address and the first address when the first data access request is received and the first data access request carries a preset identifier.
- the apparatus further comprises an establishing portion
- the establishing part is configured to establish a first corresponding relationship between the first address, the second address and the request forwarding address.
- the apparatus further comprises a second acquisition part
- the second acquisition part is configured to acquire the destination sending address of the response information, the The second address and the request forwarding address in the response information;
- the establishing part is configured to establish a second corresponding relationship between the destination sending address, the second address and the request forwarding address;
- the first modifying part 13 is configured to modify the second address in the response information to the request forwarding address to obtain the updated response information when the first corresponding relationship matches the second corresponding relationship.
- the above-mentioned parsing part 11, generating part 12, first modifying part 13 and transmitting part 14 can be implemented by the first processor 15 on the first information processing device 1, specifically, CPU (Central Processing Unit), MPU (Microprocessor Unit), DSP (Digital Signal Processing) or Field Programmable Gate Array (FPGA); the above-mentioned data storage can be implemented by the first memory 16 on the first information processing device 1.
- CPU Central Processing Unit
- MPU Microprocessor Unit
- DSP Digital Signal Processing
- FPGA Field Programmable Gate Array
- the first information processing device 1 includes: a first processor 15, a first memory 16 and a first communication bus 17.
- the first memory 16 communicates with the first processor 15 via the first communication bus 17.
- the first memory 16 stores a program executable by the first processor 15. When the program is executed, the information processing method described above is executed by the first processor 15.
- the first memory 16 can be a volatile memory (volatile memory), such as a random access memory (Random-Access Memory, RAM); or a non-volatile memory (non-volatile memory), such as a read-only memory (Read-Only Memory, ROM), a flash memory (flash memory), a hard disk (Hard Disk Drive, HDD) or a solid-state drive (Solid-State Drive, SSD); or a combination of the above types of memories, and provide instructions and data to the first processor 15.
- volatile memory such as a random access memory (Random-Access Memory, RAM)
- non-volatile memory such as a read-only memory (Read-Only Memory, ROM), a flash memory (flash memory), a hard disk (Hard Disk Drive, HDD) or a solid-state drive (Solid-State Drive, SSD); or a combination of the above types of memories, and provide instructions and data to the first processor 15.
- An embodiment of the present application provides a computer-readable storage medium having a computer program thereon, and when the program is executed by the first processor 15 , the information processing method as described above is implemented.
- the first information processing device obtains The client's first address and request forwarding address modify the second address in the response information to the request forwarding address, so that the client can believe that the updated response information is sent by the second information processing device based on the request forwarding address, and can directly identify the updated response information, thereby no longer needing to use the second information processing device to transmit the response information to the client according to the reverse path of the data access request transmission.
- the bandwidth of the information processing device is reduced, that is, the bandwidth of the computing node is reduced, and at the same time the processing speed of the data access request is improved.
- FIG. 10 is a schematic diagram of a second information processing device provided by the embodiment of the present application, and the second information processing device 2 may include:
- the first acquisition part 21 is configured to acquire a request forwarding address from the second data access request when receiving the second data access request transmitted by the client; and acquire a second address of the first information processing device;
- a determination part 22 configured to determine a first information processing device according to the request forwarding address
- An adjustment part 23 is configured to adjust the second data access request using the request forwarding address and the second address to obtain a first data access request
- the sending part 24 is configured to send the first data access request to the first information processing device.
- the device further includes a second modifying portion and an adding portion
- the determining part 22 is configured to determine the first message header according to the second address
- the second modification part is configured to modify the second message header in the second data access request by using the first message header to obtain a third data access request;
- the adding part is configured to add the request forwarding address to the third data access request to obtain the first data access request.
- the adding part is configured to add the request forwarding address in the data message of the third data access request to obtain the first data access request.
- the apparatus further includes a broadcasting part and a registration part
- the broadcast part is configured to broadcast the request forwarding address using a dynamic routing protocol
- the registration part is configured to call a cluster external interface to register the request forwarding address.
- the above-mentioned first acquisition part 21, determination part 22, adjustment part 23 and sending part 24 can be implemented by the second processor 25 on the second information processing device 2, specifically, CPU (Central Processing Unit), MPU (Microprocessor Unit), DSP (Digital Signal Processing) or field programmable gate array (FPGA); the above-mentioned data storage can be implemented by the second memory 26 on the second information processing device 2.
- CPU Central Processing Unit
- MPU Microprocessor Unit
- DSP Digital Signal Processing
- FPGA field programmable gate array
- An embodiment of the present application also provides a second information processing device 2, as shown in Figure 11, the second information processing device 2 includes: a second processor 25, a second memory 26 and a second communication bus 27, the second memory 26 communicates with the second processor 25 via the second communication bus 27, the second memory 26 stores a program executable by the second processor 25, and when the program is executed, the information processing method described above is executed by the second processor 25.
- the second memory 26 can be a volatile memory (volatile memory), such as a random access memory (Random-Access Memory, RAM); or a non-volatile memory (non-volatile memory), such as a read-only memory (Read-Only Memory, ROM), a flash memory (flash memory), a hard disk (Hard Disk Drive, HDD) or a solid-state drive (Solid-State Drive, SSD); or a combination of the above types of memories, and provide instructions and data to the second processor 25.
- volatile memory such as a random access memory (Random-Access Memory, RAM)
- non-volatile memory such as a read-only memory (Read-Only Memory, ROM), a flash memory (flash memory), a hard disk (Hard Disk Drive, HDD) or a solid-state drive (Solid-State Drive, SSD); or a combination of the above types of memories, and provide instructions and data to the second processor 25.
- An embodiment of the present application provides a computer-readable storage medium having a computer program thereon, and when the program is executed by the second processor 25, the information processing method as described above is implemented.
- the second information processing device when it receives the second data access request transmitted by the client, it adjusts the second data access request using the request forwarding address and the second address.
- a first data access request is obtained, that is, a request forwarding address and a second address are added to the second data access request, so that the first information processing device can modify the second address in the response information to the request forwarding address, so that the client can believe that the updated response information is sent by the second information processing device according to the request forwarding address, and can directly identify the updated response information, thereby eliminating the need to use the second information processing device to transmit the response information to the client according to the reverse path of the data access request transmission.
- the bandwidth of the information processing device is reduced, that is, the bandwidth of the computing node is reduced, and the processing speed of the data access request is improved.
- the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
- a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
- These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
- the embodiment of the present application provides an information processing method and device, and a storage medium.
- the information processing method includes: when receiving a first data access request transmitted by a second information processing device, parsing the first data access request to obtain a request forwarding address and a first address; the request forwarding address is the address of the second information processing device; generating corresponding response information according to the first data access request; modifying the second address in the response information to the request forwarding address to obtain updated response information; the second address is the address of the first information processing device; transmitting the updated response information to the client corresponding to the first address.
- the first information processing device parses the first data access request to obtain the first address and the request forwarding address of the client, and modifies the second address in the response information to the request forwarding address, so that the client can think that the updated response information is sent by the second information processing device according to the request forwarding address, and can directly identify the updated response information, so that there is no need to use the second information processing device to transmit the response information to the client according to the transmission reverse path of the data access request.
- the bandwidth of the information processing device is reduced, that is, the bandwidth of the computing node is reduced, and the processing speed of the data access request is improved.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本申请实施例提供了一种信息处理方法及装置、存储介质,信息处理方法包括:在接收到第二信息处理装置传输的第一数据访问请求的情况下,解析第一数据访问请求,得到请求转发地址和第一地址;请求转发地址为第二信息处理装置的地址;根据第一数据访问请求生成对应的响应信息;将响应信息中的第二地址修改为请求转发地址,得到更新后的响应信息;第二地址为第一信息处理装置的地址;向第一地址对应的客户端传输更新后的响应信息。
Description
相关申请的交叉引用
本申请要求在2022年11月22日提交中国专利局、申请号为202211474087.7、申请名称为“一种信息处理方法及装置、存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及信息处理技术领域,涉及但不限于一种信息处理方法及装置、存储介质。
容器编排管理平台(kubernetes,K8S)上的服务对外暴露有ClusterIP、NodePort以及负载均衡器等,以通过这些服务方式实现数据访问请求的负载均衡过程。
相关技术中,数据访问请求和其对应的响应信息会经过同一个具有转发程序的计算节点,在数据访问请求数量增加的情况下,对应的响应信息的数量也会对应增加,但是K8s中的计算节点数量有限,在数据访问请求和响应信息的数量大的情况下,会增加包含转发程序的计算节点的带宽,从而降低计算节点处理数据访问请求时的速度。
发明内容
为解决上述技术问题,本申请实施例期望提供一种信息处理方法及装置、存储介质,能够提高数据访问请求的处理速度。
本申请的技术方案是这样实现的:
本申请实施例提供一种信息处理方法,应用于第一信息处理装置,所
述信息处理方法包括:
在接收到第二信息处理装置传输的第一数据访问请求的情况下,解析所述第一数据访问请求,得到请求转发地址和第一地址;所述请求转发地址为所述第二信息处理装置的地址;
根据所述第一数据访问请求生成对应的响应信息;
将所述响应信息中的第二地址修改为所述请求转发地址,得到更新后的响应信息;所述第二地址为所述第一信息处理装置的地址;
向所述第一地址对应的客户端传输所述更新后的响应信息。
本申请实施例提供一种信息处理方法,应用于第二信息处理装置,所述信息处理方法包括:
在接收到客户端传输的第二数据访问请求的情况下,从所述第二数据访问请求中获取请求转发地址;
根据所述请求转发地址确定第一信息处理装置,并获取所述第一信息处理装置的第二地址;
利用所述请求转发地址和所述第二地址调整所述第二数据访问请求,得到第一数据访问请求;
向所述第一信息处理装置发送所述第一数据访问请求。
本申请实施例提供了一种第一信息处理装置,所述装置包括:
解析部分,配置于在接收到第二信息处理装置传输的第一数据访问请求的情况下,解析所述第一数据访问请求,得到请求转发地址和第一地址;所述请求转发地址为所述第二信息处理装置的地址;
生成部分,配置于根据所述第一数据访问请求生成对应的响应信息;
第一修改部分,配置于将所述响应信息中的第二地址修改为所述请求转发地址,得到更新后的响应信息;所述第二地址为所述第一信息处理装置的地址;
传输部分,配置于向所述第一地址对应的客户端传输所述更新后的响
应信息。
本申请实施例提供了一种第二信息处理装置,所述装置包括:
第一获取部分,配置于在接收到客户端传输的第二数据访问请求的情况下,从所述第二数据访问请求中获取请求转发地址;获取所述第一信息处理装置的第二地址;
确定部分,配置于根据所述请求转发地址确定第一信息处理装置;
调整部分,配置于利用所述请求转发地址和所述第二地址调整所述第二数据访问请求,得到第一数据访问请求;
发送部分,配置于向所述第一信息处理装置发送所述第一数据访问请求。
本申请实施例提供了一种第一信息处理装置,所述装置包括:
第一存储器、第一处理器和第一通信总线,所述第一存储器通过所述第一通信总线与所述第一处理器进行通信,所述第一存储器存储所述第一处理器可执行的信息处理的程序,当所述信息处理的程序被执行时,通过所述第一处理器执行上述所述的应用于第一信息处理装置中的信息处理方法。
本申请实施例提供了一种第二信息处理装置,所述装置包括:
第二存储器、第二处理器和第二通信总线,所述第二存储器通过所述第二通信总线与所述第二处理器进行通信,所述第二存储器存储所述第二处理器可执行的信息处理的程序,当所述信息处理的程序被执行时,通过所述第二处理器执行上述所述的应用于第二信息处理装置中的信息处理方法。
本申请实施例提供了一种存储介质,其上存储有计算机程序,应用于第一信息处理装置和第二信息处理装置,该计算机程序被第一处理器执行时实现上述所述的应用于第一信息处理装置中的信息处理方法;该计算机程序被第二处理器执行时实现上述所述的应用于第二信息处理装置中的信
息处理方法。
本申请实施例提供了一种信息处理方法及装置、存储介质,信息处理方法包括:在接收到第二信息处理装置传输的第一数据访问请求的情况下,解析第一数据访问请求,得到请求转发地址和第一地址;请求转发地址为第二信息处理装置的地址;根据第一数据访问请求生成对应的响应信息;将响应信息中的第二地址修改为请求转发地址,得到更新后的响应信息;第二地址为第一信息处理装置的地址;向第一地址对应的客户端传输更新后的响应信息。采用上述方法实现方案,第一信息处理装置通过解析第一数据访问请求,得到客户端的第一地址和请求转发地址,将响应信息中的第二地址修改为请求转发地址,使得客户端可以根据请求转发地址认为更新后的响应信息为第二信息处理装置发送的,可以直接识别该更新后的响应信息,从而不需要再利用第二信息处理装置按照数据访问请求的传输反路径、将响应信息传输至客户端,在数据访问请求和响应信息的数量大的情况下,降低了信息处理装置的带宽、即降低了计算节点的带宽,同时提高了数据访问请求的处理速度。
此处的附图被并入说明书中构成本说明书的一部分,这些附图示出了符合本申请的实施例,并与说明书一起用于说明本申请的技术方案。
图1(a)为本申请实施例提供的一种现有技术中的ClusterIP模式示意图;
图1(b)为本申请实施例提供的一种现有技术中的NodePort模式示意图;
图1(c)为本申请实施例提供的一种现有技术中的负载均衡器模式示意图;
图2(a)为本申请实施例提供的一种现有技术中的ClusterIP模式的请
求和响应数据流示意图;
图2(b)为本申请实施例提供的一种现有技术中的NodePort模式的请求和响应数据流示意图;
图2(c)为本申请实施例提供的一种现有技术中的负载均衡模式的请求和响应数据流示意图;
图3为本申请实施例提供的一种信息处理方法流程图一;
图4为本申请实施例提供的一种示例性的信息处理框图;
图5为本申请实施例提供的一种信息处理方法流程图二;
图6为本申请实施例提供的一种示例性的k8s集群内发的请求数据示意图;
图7为本申请实施例提供的一种示例性的k8s集群外发的请求数据示意图;
图8为本申请实施例提供的一种第一信息处理装置的组成结构示意图一;
图9为本申请实施例提供的一种第一信息处理装置的组成结构示意图二;
图10为本申请实施例提供的一种第二信息处理装置的组成结构示意图一;
图11为本申请实施例提供的一种第二信息处理装置的组成结构示意图二。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
现有技术中:如图1(a)所示,ClusterIP仅限在k8s集群内的工作负
载可访问,通过在计算节点上部署转发程序,将计算节点上的工作负载发出的请求转发到其它节点上的工作负载上。如图2(a)所示:ClusterIP的方式,只能在集群内可访问。
如图1(b)所示:NodePort方式同样是在计算节点上部署转发程序,k8s集群外的工作负载(请求端)可以访问工作负载所在的计算节点IP和分配的port,由计算节点上的转发程序将访问请求转发到集群内的工作负载上。如图2(b)所示:采用NodePort的方式,请求和响应数据都需要经过计算节点,对于需要大量数据传输的请求,会影响计算节点的带宽,消耗计算点的计算性能,同时需要额外引入高可用机制,如利用服务主动健康检查探测的机制切换DNS等,横向水平扩展能力不好,同时需要从计算节点分配TCP端口,受限于端口数量,支持的服务数有限。
如图1(c)所示:负载均衡器(LB)是指依赖传统的负载均衡设备,给k8s集群内的service分配一个服务IP和端口,Client端的请求先到负载均衡器,由负载均衡器将请求转发到k8s集群内的工作负载上。如图2(c)所示:采用负载均衡方式,不管是集群外还是集群内的请求和响应都需要经过它进行中转,时延比较高,由于东西向的工作负载间的流量比较大,需要更大处理能力的负载均衡服务集群,导致成本比较高。
针对现有技术中的不足,可以采用以下实施例中的方法进行解决。
申请实施例提供了一种信息处理方法,一种信息处理方法应用于第一信息处理装置,图3为本申请实施例提供的一种信息处理方法流程图,如图3所示,信息处理方法可以包括:
S101、在接收到第二信息处理装置传输的第一数据访问请求的情况下,解析第一数据访问请求,得到请求转发地址和第一地址;请求转发地址为第二信息处理装置的地址。
本申请实施例提供的一种信息处理方法适用于对K8s中的数据访问请
求进行负载均衡的场景下。
在本申请实施例中,第一信息处理装置可以以各种形式来实施。例如,本申请中描述的第一信息处理装置可以包括诸如手机、照相机、平板电脑、笔记本电脑、掌上电脑、个人数字助理(Personal Digital Assistant,PDA)、便捷式媒体播放器(Portable Media Player,PMP)、导航装置、可穿戴设备、智能手环、计步器等装置,以及诸如数字TV、台式计算机、服务器等装置。
在本申请实施例中,第一信息处理装置为K8s内的计算节点,第二信息处理装置可以为客户端(即K8s集群外的计算节点),第二信息处理装置也可以为K8s内的计算节点(即除第一信息处理装置外的其他计算节点);具体的第二信息处理装置可以根据实际情况进行确定,本申请实施例对此不作限定。
在本申请实施例中,若第二信息处理装置为K8s内除第一信息处理装置外的其他计算节点,则第一数据访问请求可以为第二信息处理装置生成的请求;或者第一数据访问请求为通过第二信息处理装置将客户端生成的第二数据访问请求转发至第一信息处理装置中的请求。
在本申请实施例中,第一信息处理装置中包括地址转换模块(ReqMux-NAT-Agent),用于解析第一数据访问请求,得到第一地址和请求转发地址。
在本申请实施例中,若第一数据访问请求为通过第二信息处理装置将客户端生成的第二数据访问请求转发至第一信息处理装置中的请求,则第一地址为客户端的地址。
在本申请实施例中,若第一数据访问请求为第二信息处理装置生成的请求,则第一信息处理装置在接收到第一数据访问请求的情况下,解析第一数据访问请求,得到的请求转发地址和第一地址相同,都为第二信息处理装置的地址。
需要说明的是,第一地址可以为网际互联协议(Internet Protocol,IP)/传输控制协议(Transmission Control Protocol,TCP)地址,第一地址还可以为其他的地址;具体的第一地址可以根据实际情况进行确定,本申请实施例对此不作限定。
需要说明的是,请求转发地址可以为IP/TCP地址;请求转发地址也可以为其他的地址;具体的请求转发地址可以根据实际情况进行确定,本申请实施例对此不作限定。
在本申请实施例中,地址转换模块部署在K8s集群内的每一个计算节点中。
在本申请实施例中,第一数据访问请求可以是任意数据的访问请求;具体的第一数据访问请求可以根据实际情况进行确定,本申请实施例对此不作限定。
在本申请实施例中,第一信息处理装置解析第一数据访问请求的方式为现有的技术方式;具体的可以根据实际情况进行确定,本申请实施例对此不作限定。
在本申请实施例中,第一信息处理装置在接收到第二信息处理装置传输的第一数据访问请求的情况下,解析第一数据访问请求,得到第一地址和请求转发地址的过程,包括:第一信息处理装置在接收到第一数据访问请求、且第一数据访问请求中携带预设标识的情况下,解析第一数据访问请求,得到第一地址和请求转发地址。
在本申请实施例中,第一数据访问请求中携带预设标识可以为:第一数据访问请求中的IP选项中的预设标识字段的标识为预设标识。
需要说明的是,预设标识可以为未被分配使用标识,预设标识遵守请求评论(Request for Comments,RFC)规定。
示例性的,预设标识可以为code,预设标识也可以为其他的标识;具体的预设标识可以根据实际情况进行确定,本申请实施例对此不作限定。
在本申请实施例中,第一数据访问请求包括IP头和IP报文,IP报文中的IP选项中记录有请求的目的地址(对于发送至第二信息处理装置中的第一数据访问请求,其目的地址为第二信息处理装置的地址)。具体的,IP选项由code、length和value三个字段组成,其中,value中的信息为请求转发地址,length中的信息为Value中信息的长度值;code为预设标识。
在本申请实施例中,第一信息处理装置解析第一数据访问请求,得到第一地址和请求转发地址之后,第一信息处理装置还会建立第一地址、第二地址和请求转发地址之间的第一对应关系。
需要说明的是,第二地址为实际处理第一数据访问请求生成对应的响应信息的装置,即为第一信息处理装置的地址。
需要说明的是,第一地址包括客户端的源IP和源端口(Port);第二地址包括第一信息处理装置的目的IP和目的端口(Port)。
在本申请实施例中,第一信息处理装置还会从第一数据访问请求中获取传输层协议,如传输控制协议(Transmission Control Protocol,TCP)/用户数据报协议(User Datagram Protocol,UDP)。
在本申请实施例中,第一信息处理装置以第一地址、第二地址和传输层协议为key,以请求转发地址为对应的value值,从而得到k-v键值对,即得到第一对应关系。
S102、根据第一数据访问请求生成对应的响应信息。
在本申请实施例中,第一信息处理装置解析第一数据访问请求,得到请求转发地址和第一地址之后,第一信息处理装置就根据第一数据访问请求生成对应的响应信息。
在本申请实施例中,第一信息处理装置根据第一数据访问请求生成对应的响应信息的过程为现有技术,本申请实施例对此不作限定。
S103、将响应信息中的第二地址修改为请求转发地址,得到更新后的响应信息;第二地址为第一信息处理装置的地址。
在本申请实施例中,第一信息处理装置根据第一数据访问请求生成对应的响应信息之后,第一信息处理装置就将响应信息中的第二地址修改为请求转发地址,得到更新后的响应信息。
在本申请实施例中,第一信息处理装置可以将响应信息中的第二地址删除,并在第二地址的位置处写入请求转发地址,从而得到了更新后的响应信息;第一信息处理装置将响应信息中的第二地址修改为请求转发地址得到更新后的响应信息的具体实施方式,可以根据实际情况进行确定,本申请实施例对此不作限定。
在本申请实施例中,第一信息处理装置将响应信息中的第二地址修改为请求转发地址,得到更新后的响应信息的过程,包括第一信息处理装置获取响应信息的目的发送地址、响应信息中携带的第二地址、请求转发地址;建立目的发送地址、与第二地址,请求转发地址之间的第二对应关系;在第一对应关系与第二对应关系匹配的情况下,将响应信息中的第二地址修改为请求转发地址,得到更新后的响应信息。
在本申请实施例中,生成的响应信息中携带有第二地址。
在本申请实施例中,第一信息处理装置建立目的发送地址、第二地址和请求转发地址之间的第二对应关系的方式,与信息处理装置建立第一地址、第二地址和请求转发地址之间的第一对应关系的方式相同。
在本申请实施例中,第一信息处理装置在确定出第一关系中的请求转发地址和第二关系中的请求转发地址相同、第一关系中的第二地址与第二关系中的第二地址相同、第一关系中的第一地址与第二关系中的目的发送地址相同的情况下,第一信息处理装置就确定第一对应关系与第二对应关系匹配。
S104、向第一地址对应的客户端传输更新后的响应信息。
在本申请实施例中,第一信息处理装置将响应信息中的第二地址修改为请求转发地址,得到更新后的响应信息之后,第一信息处理装置就向第
一地址对应的客户端传输更新后的响应信息。
在本申请实施例中,ReqMux-NAT-Agent用于解析发往第一信息处理装置中的IP报文(第一数据访问请求由多条IP报文组成),如果在IP报文的IP选项中包括code字段,则解析该字段,得到经第二信息处理装置中的请求分发模块(ReqMux)修改前的请求转发地址,并生成一条记录,记录的key为从IP报文中提取的五元组信息(源IP,源端口,目的IP,目的端口,传输层协议),记录的value值为请求转发地址,从而得到第一对应关系。对于第一信息处理装置发送的IP报文,也按照上述方法提取五元组信息,得到第二对应关系,查找是否存在记录(确定第一对应关系与第二对应关系是否匹配),如果存在(第一对应关系与第二对应关系匹配)则将响应信息中的第二地址修改为请求转发地址,得到更新后的响应信息。
示例性的,如图4所示:ReqMux-NAT-Agent分2个部分,如图4中的②所示,对于发往第一信息处理装置的报文,通过操作系统的HOOK机制,将程序逻辑串联到操作系统协议栈对发往第一信息处理装置的报文处理链路上(LocalIN),通过设置优先级,对于发往第一信息处理装置的报文,优先执行地址转换(DNAT,目的地址转换)程序,例如linux系统,利用netfilter框架,在PREROUTING链上注册钩子函数,解析入方向的IP报文(解析接收到的报文或者是生成的报文),如果IP报文的IP选项中包括code字段,则解析该字段,得到经第二信息处理装置中的ReqMux修改前的请求转发地址,并生成一条记录,记录的key为从IP报文中提取的五元组信息(源IP,源端口,目的IP,目的端口,传输层协议),记录的value值为请求转发地址,从而得到第一对应关系。另一个部分是对于第一信息处理装置发出的报文,如图4中的③所示,通过操作系统的HOOK机制,将程序逻辑串联到操作系统协议栈对发往第一信息处理装置的报文处理链路上(LocalOut),通过设置优先级,对于发往第一信息处理装置的报文,优先执行本程序,例如linux系统,利用netfilter框架,在POSTROUTING
链上注册钩子函数,提取五元组信息,得到第二对应关系,查找②中保存的信息(确定第一对应关系与第二对应关系是否匹配),若找到(即第一对应关系与第二对应关系匹配),则将响应信息中的第二地址修改为请求转发地址(SNAT,源地址转换),得到更新后的响应信息。
可以理解的是,第一信息处理装置通过解析第一数据访问请求,得到客户端的第一地址和请求转发地址,将响应信息中的第二地址修改为请求转发地址,使得客户端可以根据请求转发地址认为更新后的响应信息为第二信息处理装置发送的,可以直接识别该更新后的响应信息,从而不需要再利用第二信息处理装置按照数据访问请求的传输反路径、将响应信息传输至客户端,在数据访问请求和响应信息的数量大的情况下,降低了信息处理装置的带宽、即降低了计算节点的带宽,同时提高了数据访问请求的处理速度。
本申请实施例又提供了一种信息处理方法,应用于第二信息处理装置,图5为本申请实施例提供的一种应用于第二信息处理装置中的信息处理方法流程图,如图5所示,信息处理方法可以包括:
S201、在接收到客户端传输的第二数据访问请求的情况下,从第二数据访问请求中获取请求转发地址。
本申请实施例提供的一种信息处理方法适用于对K8s中的数据访问请求进行负载均衡的场景下。
在本申请实施例中,第二信息处理装置可以以各种形式来实施。例如,本申请中描述的第二信息处理装置可以包括诸如手机、照相机、平板电脑、笔记本电脑、掌上电脑、个人数字助理(Personal Digital Assistant,PDA)、便捷式媒体播放器(Portable Media Player,PMP)、导航装置、可穿戴设备、智能手环、计步器等装置,以及诸如数字TV、台式计算机、服务器等装置。
在本申请实施例中,第二信息处理装置中携带有请求分发模块(ReqMux),用于对客户端传输的至第二信息处理装置中的第二数据访问请求或者是第二信息处理装置生成的第二数据访问请求进行处理,得到第一数据访问请求,并发送至第一信息处理装置中。
在本申请实施例中,ReqMux部署在K8s集群内的每一个计算节点中。
在本申请实施例中,客户端为K8s集群外的计算节点,第二信息处理装置为K8s集群内除第一信息处理装置外的其他计算节点。
在本申请实施例中,若第二数据访问请求为第二信息处理装置生成的请求,则在第二信息处理装置生成第二数据访问请求的情况下,第二信息处理装置就根据请求转发地址(即为第二信息处理装置的地址,第二信息处理装置生成的第二数据访问请求中携带有请求转发地址)确定第一信息处理装置,并获取第一信息处理装置的第二地址;利用请求转发地址和第二地址调整第二数据访问请求,得到第一数据访问请求;向第一信息处理装置发送第一数据访问请求。
在本申请实施例中,第二数据访问请求中携带有请求转发地址和客户端的第一地址。其中,第一地址为客户端的地址。
需要说明的是,第一地址可以为IP/TCP地址,第一地址还可以为其他的地址;具体的第一地址可以根据实际情况进行确定,本申请实施例对此不作限定。
需要说明的是,请求转发地址可以为IP/TCP地址;请求转发地址也可以为其他的地址;具体的请求转发地址可以根据实际情况进行确定,本申请实施例对此不作限定。
需要说明的是,第二地址可以为IP/TCP地址;第二地址也可以为其他的地址;具体的第二地址可以根据实际情况进行确定,本申请实施例对此不作限定。
在本申请实施例中,第二数据访问请求可以是任意数据的访问请求;
具体的第二数据访问请求可以根据实际情况进行确定,本申请实施例对此不作限定。
在本申请实施例中,第二信息处理装置在接收到客户端传输的第二数据访问请求的情况下,从第二数据访问请求中获取请求转发地址之前,第二信息处理装置还会利用动态路由协议广播请求转发地址;或者调用集群外部接口注册请求转发地址。
在本申请实施例中,第二信息处理装置中包括路由模块(RouteAgent),用于利用动态路由协议广播请求转发地址;或者调用集群外部接口注册请求转发地址,以供客户端可以根据请求转发地址向第二信息处理装置传输第二数据访问请求。
在本申请实施例中,第二信息处理装置也可以利用其他的方式向客户端广播请求转发地址;具体的第二信息处理装置向客户端广播请求转发地址的方式可以根据实际情况进行确定,本申请实施例对此不作限定。
需要说明的是,路由模块部署在K8s集群内的部分计算节点中,如路由转发模块部署在K8s集群内的第二信息处理装置中。
S202、根据请求转发地址确定第一信息处理装置,并获取第一信息处理装置的第二地址。
在本申请实施例中,第二信息处理装置从第二数据访问请求中获取请求转发地址之后,第二信息处理装置就根据请求转发地址确定第一信息处理装置,并获取第一信息处理装置的第二地址。
在本申请实施例中,第二信息处理装置根据请求转发地址确定第一信息处理装置的方式为现有的技术方式;具体的本申请实施例对此不作限定。
S203、利用请求转发地址和第二地址调整第二数据访问请求,得到第一数据访问请求。
在本申请实施例中,第二信息处理装置根据请求转发地址确定第一信息处理装置,并获取第一信息处理装置的第二地址之后,第二信息处理装
置就利用请求转发地址和第二地址调整第二数据访问请求,得到第一数据访问请求。
在本申请实施例中,第二信息处理装置利用请求转发地址和第二地址调整第二数据访问请求,得到第一数据访问请求的过程,包括:第二信息处理装置根据第二地址确定第一报文头;利用第一报文头修改第二数据访问请求中的第二报文头,得到第三数据访问请求;在第三数据访问请求中添加请求转发地址,得到第一数据访问请求。
在本申请实施例中,若第二地址为IP/TCP地址,则可以按照第二数据访问请求中的报文头的格式、以及IP/TCP地址确定出第一报文头。
在本申请实施例中,第二信息处理装置在第三数据访问请求中添加请求转发地址,得到第一数据访问请求的过程,包括:第二信息处理装置在第三数据访问请求的数据报文中添加请求转发地址,得到第一数据访问请求。
在本申请实施例中,第二数据访问请求中包括至少一条报文,至少一条报文中的每一条报文都包括IP头和IP报文,IP报文中的IP选项由code、length和value三个字段组成,其中,value字段的值为请求转发地址,length字段的值为Value中信息的长度值;code为预设标识。
在本申请实施例中,第二信息处理装置在第三数据访问请求的数据报文中添加请求转发地址,得到第一数据访问请求的过程,可以为第二信息处理装置将数据报文(IP报文)的value字段的值设置为请求转发地址,利用length字段的值标识请求转发地址信息的信息长度;并设置code,从而得到第一数据访问请求。
S204、向第一信息处理装置发送第一数据访问请求。
在本申请实施例中,第二信息处理装置利用请求转发地址和第二地址调整第二数据访问请求,得到第一数据访问请求之后,第二信息处理装置就向第一信息处理装置发送第一数据访问请求。
在本申请实施例中,ReqMux用于接收第二数据访问请求并匹配请求的请求转发地址(ip,port),匹配上后,根据请求转发地址确定第一信息处理装置(后端服务器),修改第二数据访问请求的报文头(IP头和TCP头),将请求转发地址的对应的IP和TCP端口修改成第一信息处理装置的IP和服务端口,并在第二数据访问请求的IP报文的IP选项中记录目的请求地址(即第一信息处理装置的地址)。
示例性的,ReqMux可以通过操作系统的HOOK机制,将程序逻辑串联到操作系统协议栈对发往第二信息处理装置的报文处理链路上,通过设置优先级,对于发往第二信息处理装置中的报文,优先执行请求分发程序,例如linux系统,利用netfilter框架,在LOCAL_IN链上注册钩子函数。对所有发往第二信息处理装置的报文,获取报文的请求转发地址(IP和端口号),通过IP和端口号查找暴露的服务列表,如果找到就通过一致性哈希算法(例如maglev consistent hash算法)选择一个后端服务器(工作负载,也即第一信息处理装置),修改第二数据访问请求的报文头,将请求转发地址的对应的IP和TCP端口修改成第一信息处理装置的IP和服务端口(DNAT),并在IP报文的IP选项中记录请求转发地址(ip,port),IP选项由code,length,value三个字段组成,value字段的值为请求转发地址,length字段的值为Value中信息的长度值;code为预设标识,遵从IPv4RFC和IPv6RFC协议,预设标识为私有的code并且在组织内部不与其它程序冲突。
示例性的,如图6所示:集群外的客户端(工作负载:10.1.2.3)将第二数据访问请求传输至K8s集群内的第二信息处理装置(计算节点1);第二信息处理装置(中的ReqMux)从第二数据访问请求中获取请求转发地址(172.1.2.1:80);根据请求转发地址确定第一信息处理装置,并获取第一信息处理装置的第二地址(192.168.1.3:8080);根据第二地址确定第一报文头;利用第一报文头修改第二数据访问请求中的第二报文头,得到第三
数据访问请求;在第三数据访问请求中添加请求转发地址,得到第一数据访问请求;向第一信息处理装置发送第一数据访问请求。第一信息处理装置(计算节点2)在接收到第二信息处理装置传输的第一数据访问请求的情况下,第二信息处理装置中的ReqMux-NAT-Agent解析第一数据访问请求,得到第一地址和请求转发地址;根据第一数据访问请求生成对应的响应信息;ReqMux-NAT-Agent将响应信息中的第二地址修改为请求转发地址,得到更新后的响应信息;向第一地址对应的客户端(工作负载:10.1.2.3)传输更新后的响应信息。
示例性的,如图7所示:K8s集群内的第二信息处理装置(计算节点1)生成了第二数据访问请求的情况下,第二信息处理装置就根据请求转发地址(即为第二信息处理装置的地址)确定第一信息处理装置,并获取第一信息处理装置的第二地址;利用请求转发地址和第二地址调整第二数据访问请求,得到第一数据访问请求;向第一信息处理装置发送第一数据访问请求。K8s集群内的第一信息处理装置(计算节点2)在接收到第二信息处理装置传输的第一数据访问请求的情况下,第二信息处理装置中的ReqMux-NAT-Agent解析第一数据访问请求,得到第一地址和请求转发地址;此时第一地址和请求转发地址相同,根据第一数据访问请求生成对应的响应信息;ReqMux-NAT-Agent将响应信息中的第二址修改为请求转发地址,得到更新后的响应信息;向第一地址对应的客户端(工作负载:10.1.2.3)传输更新后的响应信息。
可以理解的是,第二信息处理装置在接收到客户端传输的第二数据访问请求的情况下,利用请求转发地址和第二地址调整第二数据访问请求,得到第一数据访问请求,即在第二数据访问请求中添加请求转发地址和第二地址,以供第一信息处理装置将响应信息中的第二地址修改为请求转发地址,使得客户端可以根据请求转发地址认为更新后的响应信息为第二信息处理装置发送的,可以直接识别该更新后的响应信息,从而不需要再利
用第二信息处理装置按照数据访问请求的传输反路径、将响应信息传输至客户端,在数据访问请求和响应信息的数量大的情况下,降低了信息处理装置的带宽、即降低了计算节点的带宽,同时提高了数据访问请求的处理速度。
基于与上述应用于第一信息处理装置中的信息处理方法的同一发明构思,本申请实施例提供了一种第一信息处理装置1,对应于一种信息处理方法;图8为本申请实施例提供的一种第一信息处理装置的组成结构示意图一,该第一信息处理装置1可以包括:
解析部分11,配置于在接收到第二信息处理装置传输的第一数据访问请求的情况下,解析所述第一数据访问请求,得到请求转发地址和第一地址;所述请求转发地址为所述第二信息处理装置的地址;
生成部分12,配置于根据所述第一数据访问请求生成对应的响应信息;
第一修改部分13,配置于将所述响应信息中的第二地址修改为所述请求转发地址,得到更新后的响应信息;所述第二地址为所述第一信息处理装置的地址;
传输部分14,配置于向所述第一地址对应的客户端传输所述更新后的响应信息。
在本申请的一些实施例中,所述解析部分11,配置于在接收到所述第一数据访问请求、且所述第一数据访问请求中携带预设标识的情况下,解析所述第一数据访问请求,得到所述请求转发地址和所述第一地址。
在本申请的一些实施例中,所述装置还包括建立部分;
所述建立部分,配置于建立所述第一地址、所述第二地址和所述请求转发地址之间的第一对应关系。
在本申请的一些实施例中,所述装置还包括第二获取部分;
所述第二获取部分,配置于获取所述响应信息的目的发送地址、所述
响应信息中的所述第二地址、所述请求转发地址;
所述建立部分,配置于建立所述目的发送地址、所述第二地址和所述请求转发地址之间的第二对应关系;
所述第一修改部分13,配置于在所述第一对应关系与所述第二对应关系匹配的情况下,将所述响应信息中的第二地址修改为所述请求转发地址,得到所述更新后的响应信息。
需要说明的是,在实际应用中,上述解析部分11、生成部分12、第一修改部分13和传输部分14可由第一信息处理装置1上的第一处理器15实现,具体为CPU(Central Processing Unit,中央处理器)、MPU(Microprocessor Unit,微处理器)、DSP(Digital Signal Processing,数字信号处理器)或现场可编程门阵列(FPGA,Field Programmable Gate Array)等实现;上述数据存储可由第一信息处理装置1上的第一存储器16实现。
本申请实施例还提供了一种第一信息处理装置1,如图9所示,所述第一信息处理装置1包括:第一处理器15、第一存储器16和第一通信总线17,所述第一存储器16通过所述第一通信总线17与所述第一处理器15进行通信,所述第一存储器16存储所述第一处理器15可执行的程序,当所述程序被执行时,通过所述第一处理器15执行如上述所述的信息处理方法。
在实际应用中,上述第一存储器16可以是易失性存储器(volatile memory),例如随机存取存储器(Random-Access Memory,RAM);或者非易失性存储器(non-volatile memory),例如只读存储器(Read-Only Memory,ROM),快闪存储器(flash memory),硬盘(Hard Disk Drive,HDD)或固态硬盘(Solid-State Drive,SSD);或者上述种类的存储器的组合,并向第一处理器15提供指令和数据。
本申请实施例提供了一种计算机可读存储介质,其上有计算机程序,所述程序被第一处理器15执行时实现如上述所述的信息处理方法。
可以理解的是,第一信息处理装置通过解析第一数据访问请求,得到
客户端的第一地址和请求转发地址,将响应信息中的第二地址修改为请求转发地址,使得客户端可以根据请求转发地址认为更新后的响应信息为第二信息处理装置发送的,可以直接识别该更新后的响应信息,从而不需要再利用第二信息处理装置按照数据访问请求的传输反路径、将响应信息传输至客户端,在数据访问请求和响应信息的数量大的情况下,降低了信息处理装置的带宽、即降低了计算节点的带宽,同时提高了数据访问请求的处理速度。
基于与上述应用于第二信息处理装置中的信息处理方法的同一发明构思,本申请实施例提供了一种第二信息处理装置2,对应于一种信息处理方法;图10为本申请实施例提供的一种第二信息处理装置的组成结构示意图一,该第二信息处理装置2可以包括:
第一获取部分21,配置于在接收到客户端传输的第二数据访问请求的情况下,从所述第二数据访问请求中获取请求转发地址;获取所述第一信息处理装置的第二地址;
确定部分22,配置于根据所述请求转发地址确定第一信息处理装置;
调整部分23,配置于利用所述请求转发地址和所述第二地址调整所述第二数据访问请求,得到第一数据访问请求;
发送部分24,配置于向所述第一信息处理装置发送所述第一数据访问请求。
在本申请的一些实施例中,所述装置还包括第二修改部分和添加部分;
所述确定部分22,配置于根据所述第二地址确定第一报文头;
所述第二修改部分,配置于利用所述第一报文头修改所述第二数据访问请求中的第二报文头,得到第三数据访问请求;
所述添加部分,配置于在所述第三数据访问请求中添加所述请求转发地址,得到所述第一数据访问请求。
在本申请的一些实施例中,所述添加部分,配置于在所述第三数据访问请求的数据报文中添加所述请求转发地址,得到所述第一数据访问请求。
在本申请的一些实施例中,所述装置还包括广播部分和注册部分;
所述广播部分,配置于利用动态路由协议广播所述请求转发地址;
或者所述注册部分,配置于调用集群外部接口注册所述请求转发地址。
需要说明的是,在实际应用中,上述第一获取部分21、确定部分22、调整部分23和发送部分24可由第二信息处理装置2上的第二处理器25实现,具体为CPU(Central Processing Unit,中央处理器)、MPU(Microprocessor Unit,微处理器)、DSP(Digital Signal Processing,数字信号处理器)或现场可编程门阵列(FPGA,Field Programmable Gate Array)等实现;上述数据存储可由第二信息处理装置2上的第二存储器26实现。
本申请实施例还提供了一种第二信息处理装置2,如图11所示,所述第二信息处理装置2包括:第二处理器25、第二存储器26和第二通信总线27,所述第二存储器26通过所述第二通信总线27与所述第二处理器25进行通信,所述第二存储器26存储所述第二处理器25可执行的程序,当所述程序被执行时,通过所述第二处理器25执行如上述所述的信息处理方法。
在实际应用中,上述第二存储器26可以是易失性存储器(volatile memory),例如随机存取存储器(Random-Access Memory,RAM);或者非易失性存储器(non-volatile memory),例如只读存储器(Read-Only Memory,ROM),快闪存储器(flash memory),硬盘(Hard Disk Drive,HDD)或固态硬盘(Solid-State Drive,SSD);或者上述种类的存储器的组合,并向第二处理器25提供指令和数据。
本申请实施例提供了一种计算机可读存储介质,其上有计算机程序,所述程序被第二处理器25执行时实现如上述所述的信息处理方法。
可以理解的是,第二信息处理装置在接收到客户端传输的第二数据访问请求的情况下,利用请求转发地址和第二地址调整第二数据访问请求,
得到第一数据访问请求,即在第二数据访问请求中添加请求转发地址和第二地址,以供第一信息处理装置将响应信息中的第二地址修改为请求转发地址,使得客户端可以根据请求转发地址认为更新后的响应信息为第二信息处理装置发送的,可以直接识别该更新后的响应信息,从而不需要再利用第二信息处理装置按照数据访问请求的传输反路径、将响应信息传输至客户端,在数据访问请求和响应信息的数量大的情况下,降低了信息处理装置的带宽、即降低了计算节点的带宽,同时提高了数据访问请求的处理速度。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,
使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。
本申请实施例提供了一种信息处理方法及装置、存储介质,信息处理方法包括:在接收到第二信息处理装置传输的第一数据访问请求的情况下,解析第一数据访问请求,得到请求转发地址和第一地址;请求转发地址为第二信息处理装置的地址;根据第一数据访问请求生成对应的响应信息;将响应信息中的第二地址修改为请求转发地址,得到更新后的响应信息;第二地址为第一信息处理装置的地址;向第一地址对应的客户端传输更新后的响应信息。采用上述方法实现方案,第一信息处理装置通过解析第一数据访问请求,得到客户端的第一地址和请求转发地址,将响应信息中的第二地址修改为请求转发地址,使得客户端可以根据请求转发地址认为更新后的响应信息为第二信息处理装置发送的,可以直接识别该更新后的响应信息,从而不需要再利用第二信息处理装置按照数据访问请求的传输反路径、将响应信息传输至客户端,在数据访问请求和响应信息的数量大的情况下,降低了信息处理装置的带宽、即降低了计算节点的带宽,同时提高了数据访问请求的处理速度。
Claims (13)
- 一种信息处理方法,应用于第一信息处理装置,所述方法包括:在接收到第二信息处理装置传输的第一数据访问请求的情况下,解析所述第一数据访问请求,得到请求转发地址和第一地址;所述请求转发地址为所述第二信息处理装置的地址;根据所述第一数据访问请求生成对应的响应信息;将所述响应信息中的第二地址修改为所述请求转发地址,得到更新后的响应信息;所述第二地址为所述第一信息处理装置的地址;向所述第一地址对应的客户端传输所述更新后的响应信息。
- 根据权利要求1所述的方法,其中,所述在接收到第二信息处理装置传输的第一数据访问请求的情况下,解析所述第一数据访问请求,得到请求转发地址和第一地址,包括:在接收到所述第一数据访问请求、且所述第一数据访问请求中携带预设标识的情况下,解析所述第一数据访问请求,得到所述请求转发地址和所述第一地址。
- 根据权利要求1所述的方法,其中,所述解析所述第一数据访问请求,得到请求转发地址和第一地址之后,所述方法还包括:建立所述第一地址、所述第二地址和所述请求转发地址之间的第一对应关系。
- 根据权利要求1所述的方法,其中,所述将所述响应信息中的第二地址修改为所述请求转发地址,得到更新后的响应信息,包括:获取所述响应信息的目的发送地址、所述响应信息中的所述第二地址、所述请求转发地址;建立所述目的发送地址、所述第二地址和所述请求转发地址之间的第二对应关系;在第一对应关系与所述第二对应关系匹配的情况下,将所述响应信息中的第二地址修改为所述请求转发地址,得到所述更新后的响应信息。
- 一种信息处理方法,应用于第二信息处理装置,所述方法包括:在接收到客户端传输的第二数据访问请求的情况下,从所述第二数据访问请求中获取请求转发地址;根据所述请求转发地址确定第一信息处理装置,并获取所述第一信息处理装置的第二地址;利用所述请求转发地址和所述第二地址调整所述第二数据访问请求,得到第一数据访问请求;向所述第一信息处理装置发送所述第一数据访问请求。
- 根据权利要求5所述的方法,其中,所述利用所述请求转发地址和所述第二地址调整所述第二数据访问请求,得到第一数据访问请求,包括:根据所述第二地址确定第一报文头;利用所述第一报文头修改所述第二数据访问请求中的第二报文头,得到第三数据访问请求;在所述第三数据访问请求中添加所述请求转发地址,得到所述第一数据访问请求。
- 根据权利要求6所述的方法,其中,所述在所述第三数据访问请求中添加所述请求转发地址,得到所述第一数据访问请求,包括:在所述第三数据访问请求的数据报文中添加所述请求转发地址,得到所述第一数据访问请求。
- 根据权利要求5所述的方法,其中,所述在接收到客户端传输的第二数据访问请求的情况下,从所述第二数据访问请求中获取请求转发地址之前,所述方法还包括:利用动态路由协议广播所述请求转发地址;或者调用集群外部接口注册所述请求转发地址。
- 一种第一信息处理装置,所述装置包括:解析部分,配置于在接收到第二信息处理装置传输的第一数据访问请求的情况下,解析所述第一数据访问请求,得到请求转发地址和第一地址;所述请求转发地址为所述第二信息处理装置的地址;生成部分,配置于根据所述第一数据访问请求生成对应的响应信息;第一修改部分,配置于将所述响应信息中的第二地址修改为所述请求转发地址,得到更新后的响应信息;所述第二地址为所述第一信息处理装置的地址;传输部分,配置于向所述第一地址对应的客户端传输所述更新后的响应信息。
- 一种第二信息处理装置,所述装置包括:第一获取部分,配置于在接收到客户端传输的第二数据访问请求的情况下,从所述第二数据访问请求中获取请求转发地址;获取所述第一信息处理装置的第二地址;确定部分,配置于根据所述请求转发地址确定第一信息处理装置;调整部分,配置于利用所述请求转发地址和所述第二地址调整所述第二数据访问请求,得到第一数据访问请求;发送部分,配置于向所述第一信息处理装置发送所述第一数据访问请求。
- 一种第一信息处理装置,所述装置包括:第一存储器、第一处理器和第一通信总线,所述第一存储器通过所述第一通信总线与所述第一处理器进行通信,所述第一存储器存储所述第一处理器可执行的信息处理的程序,当所述信息处理的程序被执行时,通过所述第一处理器执行如权利要求1至4任一项所述的方法。
- 一种第二信息处理装置,所述装置包括:第二存储器、第二处理器和第二通信总线,所述第二存储器通过所述 第二通信总线与所述第二处理器进行通信,所述第二存储器存储所述第二处理器可执行的信息处理的程序,当所述信息处理的程序被执行时,通过所述第二处理器执行如权利要求5至8任一项所述的方法。
- 一种存储介质,其上存储有计算机程序,应用于第一信息处理装置和第二信息处理装置,该计算机程序被第一处理器执行时实现权利要求1至4任一项所述的方法;该计算机程序被第二处理器执行时实现权利要求5至8任一项所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211474087.7 | 2022-11-22 | ||
CN202211474087.7A CN115883644A (zh) | 2022-11-22 | 2022-11-22 | 一种信息处理方法及装置、存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024109262A1 true WO2024109262A1 (zh) | 2024-05-30 |
Family
ID=85760648
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/117536 WO2024109262A1 (zh) | 2022-11-22 | 2023-09-07 | 一种信息处理方法及装置、存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115883644A (zh) |
WO (1) | WO2024109262A1 (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115883644A (zh) * | 2022-11-22 | 2023-03-31 | 京东科技信息技术有限公司 | 一种信息处理方法及装置、存储介质 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009062504A1 (en) * | 2007-11-13 | 2009-05-22 | Tnm Farmguard Aps | Secure communication between a client and devices on different private local networks using the same subnet addresses |
CN108449282A (zh) * | 2018-05-29 | 2018-08-24 | 华为技术有限公司 | 一种负载均衡方法及其装置 |
CN113806091A (zh) * | 2021-09-17 | 2021-12-17 | 中国联合网络通信集团有限公司 | 一种数据处理方法、装置及设备 |
CN115883644A (zh) * | 2022-11-22 | 2023-03-31 | 京东科技信息技术有限公司 | 一种信息处理方法及装置、存储介质 |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20210051132A1 (en) * | 2019-08-16 | 2021-02-18 | Forcepoint Llc | System and method for service aliasing and pooled load balancing |
CN113472831B (zh) * | 2020-03-31 | 2022-12-06 | 北京金山云网络技术有限公司 | 一种服务访问方法、装置、网关设备及存储介质 |
CN111464648B (zh) * | 2020-04-02 | 2021-11-05 | 聚好看科技股份有限公司 | 一种分布式本地dns系统及域名查询方法 |
CN112860375B (zh) * | 2021-02-01 | 2021-09-24 | 上海道客网络科技有限公司 | 基于Kubernetes的容器化应用请求复制方法、系统、介质和设备 |
CN113676564B (zh) * | 2021-09-28 | 2022-11-22 | 深信服科技股份有限公司 | 数据传输方法、装置及存储介质 |
-
2022
- 2022-11-22 CN CN202211474087.7A patent/CN115883644A/zh active Pending
-
2023
- 2023-09-07 WO PCT/CN2023/117536 patent/WO2024109262A1/zh unknown
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009062504A1 (en) * | 2007-11-13 | 2009-05-22 | Tnm Farmguard Aps | Secure communication between a client and devices on different private local networks using the same subnet addresses |
CN108449282A (zh) * | 2018-05-29 | 2018-08-24 | 华为技术有限公司 | 一种负载均衡方法及其装置 |
CN113806091A (zh) * | 2021-09-17 | 2021-12-17 | 中国联合网络通信集团有限公司 | 一种数据处理方法、装置及设备 |
CN115883644A (zh) * | 2022-11-22 | 2023-03-31 | 京东科技信息技术有限公司 | 一种信息处理方法及装置、存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN115883644A (zh) | 2023-03-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8694675B2 (en) | Generalized dual-mode data forwarding plane for information-centric network | |
EP2381647B1 (en) | Session migration in content-centric networks | |
US8737210B2 (en) | Load balancing SCTP associations using VTAG mediation | |
US8458250B2 (en) | Request routing using network computing components | |
CA2968964C (en) | Source ip address transparency systems and methods | |
WO2023005773A1 (zh) | 基于远程直接数据存储的报文转发方法、装置、网卡及设备 | |
US20220078120A1 (en) | Method and apparatus for processing data packet | |
WO2019237594A1 (zh) | 会话保持方法、装置、计算机设备及存储介质 | |
US11064021B2 (en) | Method, device and computer program product for managing network system | |
CN112583618B (zh) | 为业务提供网络服务的方法、装置和计算设备 | |
WO2013029569A1 (en) | A Generalized Dual-Mode Data Forwarding Plane for Information-Centric Network | |
WO2024109262A1 (zh) | 一种信息处理方法及装置、存储介质 | |
WO2021057348A1 (zh) | 一种服务器安全防御方法及系统、通信设备、存储介质 | |
WO2019242638A1 (zh) | 一种负载均衡方法和装置 | |
CN106797384B (zh) | 以不同的协议将请求路由到集群中的相同端点 | |
CN112804223B (zh) | 一种报文处理方法和装置 | |
US20180227230A1 (en) | Stateless information centric forwarding using dynamic filters | |
CN112968965B (zh) | Nfv网络节点的元数据服务方法、服务器及存储介质 | |
US20240259316A1 (en) | Network load balancing method and apparatus, electronic device, medium, and program product | |
WO2012120474A1 (en) | Sctp association endpoint relocation in a load balancing system | |
CN102932269A (zh) | 负载均衡的实现方法和装置 | |
CN115242882A (zh) | 一种基于传输层路由访问k8s容器环境的方法及装置 | |
US10341292B2 (en) | Increased port address space | |
CN113452778B (zh) | 会话保持方法、装置、设备、系统及存储介质 | |
WO2017097092A1 (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: 23893355 Country of ref document: EP Kind code of ref document: A1 |