WO2023284626A1 - 优化数据访问性能的方法和中间设备 - Google Patents

优化数据访问性能的方法和中间设备 Download PDF

Info

Publication number
WO2023284626A1
WO2023284626A1 PCT/CN2022/104446 CN2022104446W WO2023284626A1 WO 2023284626 A1 WO2023284626 A1 WO 2023284626A1 CN 2022104446 W CN2022104446 W CN 2022104446W WO 2023284626 A1 WO2023284626 A1 WO 2023284626A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
data
intermediate device
packet
requested
Prior art date
Application number
PCT/CN2022/104446
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 华为技术有限公司
Priority to EP22841262.3A priority Critical patent/EP4361837A1/en
Publication of WO2023284626A1 publication Critical patent/WO2023284626A1/zh
Priority to US18/411,645 priority patent/US20240155029A1/en

Links

Images

Classifications

    • 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/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/541Client-server

Definitions

  • the present application relates to the technical field of data access, and more specifically, relates to a method and an intermediate device for optimizing data access performance.
  • the storage device After the storage device receives the message from the client, if the data requested by the message is in another storage device, the current storage device needs to go to another storage device to obtain the data requested by the message, which increases the storage capacity.
  • the network overhead of the device when the data requested by a message received by a certain database node in the database cluster is in another database node, the database node needs to redirect the message to forward it to another database node, which also increases the Network overhead for this database node.
  • the present application provides a method and an intermediate device for optimizing data access performance.
  • the technical solution can reduce the network overhead of the server, so as to improve the overall performance of data access.
  • a method for optimizing data access performance is provided, the method is applied to an intermediate device of a communication network, the intermediate device is a network device between a client and a server, and the client is one or more There are one or more servers, and the method includes: the intermediate device parses the received first message to obtain the characteristics of the first message, and the first message comes from the client The terminal where one of the terminals is located, the first message is used to request data from one of the server terminals, the feature is used to indicate the data requested by the first message, and the feature is carried in the second A message corresponds to the part of the application layer data; if the intermediate device stores the data requested by the first message, the intermediate device sends the data requested by the first message to the terminal.
  • the client can be located in the terminal device
  • the server can be a storage device, a storage device cluster, a database or a database cluster, etc.
  • the intermediate device can be a programmable network device, or a P4 switch, a network processor, a field programmable gate array, etc. .
  • the intermediate device, the client and the server may be in the same trust zone, for example, may be in the same trusted communication network, then the data in the first message may not need to be encrypted, therefore, the intermediate The device may directly extract the data part of the application layer in the first packet.
  • the intermediate device located between the server and the client can analyze the received first message to obtain the feature corresponding to the application layer in the message, and the feature is used to indicate the data requested by the first message, that is to say , the intermediate device can understand the information of the requested data indicated by the first message by parsing the first message, and on the other hand, the intermediate device itself stores a part of the data, so that the intermediate device can perform Inquiry, if the intermediate device stores the data requested by the first message, the intermediate device may send the data requested by the first message to the terminal.
  • This technical solution can avoid obtaining data from a remote server, thereby reducing the network overhead of the server and improving the overall performance of data access.
  • the characteristics of the first packet include values of multiple fields arranged according to rules, and the rule indicates that the multiple fields are in the first packet The corresponding order in the features of the text.
  • the characteristic of the first packet may also include the value of a single field.
  • the multiple fields include a scatter aggregation table SGL field and a start logical block address start LBA field.
  • the server includes one or more, and the intermediate device stores the mapping relationship between the feature of the first message and the identifier of the server, The method further includes: when the intermediate device does not store the data requested by the first message, the intermediate device according to the characteristics of the first message and the characteristics of the first message The mapping relationship with the server identifier is to send a second message to the server corresponding to the characteristics of the first message in a redirection manner, and the data requested by the second message is consistent with the first The messages are the same.
  • the server identifier may be an address or an ID
  • the address may be a network address, such as an IP address, or a media access control address, etc.
  • the ID may also be a tag ID when tag technology is used.
  • the redirection means that the intermediate device can modify the header of the first message to obtain the second message, and the second message can access the corresponding server according to the header , wherein the data requested by the second message is the same as the data requested by the first message.
  • the first message is specifically used to request data from the storage device, and the data specifically requested by the first message is block data of the storage device.
  • the first packet carries the address of the block data and the length of the block data.
  • the first message is specifically used to request data from a database, and the data specifically requested by the first message is a record in the database.
  • the data requested by the first message is a certain record in the database.
  • the method further includes: the intermediate device receives a third message, and the third message is used to request data from one of the servers , the third message comes from the terminal where one of the clients is located; when the number of times the data requested by the third message is requested is greater than a threshold, the intermediate device sends the data requested by the third message Data is stored in the intermediate device.
  • the third message may come from the same terminal as the first message, or may be a different terminal.
  • the intermediate device when the number of times the data requested by the third message is requested is greater than the threshold, it means that the data requested by the third message is frequently requested by the terminal or other terminals, that is, the data can be understood as hot data, and the intermediate device The data can be cached in the intermediate device, so that the intermediate device can directly send the data to the terminal without requesting the data from a remote server, thereby improving the efficiency of data access.
  • the data requested by the third message stored by the intermediate device is requested by the intermediate device from the storage device; or stored by the intermediate device
  • the data requested by the third message is obtained by the intermediate device from a message sent from the storage device to the client.
  • the intermediate device may actively request the data requested by the third message from the storage device, or obtain the data requested by the third message from the response message sent by the storage device to the terminal, and store the data.
  • the intermediate device may send a request message to the storage device to request the data requested by the third message and store the data.
  • the intermediate device can intercept the message sent by the storage device to the client to obtain the data requested by the third message and store the data stand up.
  • the message sent by the storage device to the client is sent in response to the request message of the client, that is, the message is a response message to the client after the storage device receives the request message from the client. .
  • the intermediate device saves the data requested by the first packet in a cache.
  • the intermediate device saves the data requested by the first message in the cache, and when other messages also request the data, the intermediate device can directly send the data to the terminal, which improves the efficiency of data access efficiency.
  • the application layer field included in the characteristic of the first packet is a key-value string.
  • an intermediate device in a communication network is provided, the intermediate device is a network device between a client and a server, the client is one or more, and the server is one or more , including: a processing unit, configured to parse the received first message to obtain the characteristics of the first message, the first message comes from a device where one of the clients is located, and the first message The text is used to request data from one of the servers, the feature is used to indicate the data requested by the first message, and the feature is carried in the part of the first message corresponding to the application layer data; the transceiver unit , configured to send the data requested by the first message to the terminal when the intermediate device stores the data requested by the first message.
  • the characteristics of the first packet include values of multiple fields arranged according to a rule, and the rule indicates that the multiple fields in the first packet The corresponding order in the features of the text.
  • the multiple fields include a scatter aggregation table SGL field and a start logical block address start LBA field.
  • the server includes one or more, and the intermediate device stores the mapping relationship between the feature of the first message and the identifier of the server,
  • the transceiver unit is further configured to: in the case that the intermediate device does not store the data requested by the first message, the intermediate device according to the characteristics of the first message and the first message The mapping relationship between the features of the first message and the server identifier, and send a second message to the server corresponding to the feature of the first message in a redirection manner, and the data requested by the second message is the same as that of the first message.
  • a message is the same.
  • the first message is specifically used to request data from the storage device, and the data specifically requested by the first message is block data of the storage device.
  • the first message is specifically used to request data from a database, and the data specifically requested by the first message is a record in the database.
  • the transceiver unit is further configured to: receive a third message, the third message is used to request data from one of the servers, and the The third message is from the terminal where one of the clients is located; the processing unit is further configured to send the third message to the The requested data is stored in the intermediate device.
  • the data requested by the third message stored by the intermediate device is requested by the intermediate device from the storage device; or stored by the intermediate device
  • the data requested by the third message is obtained by the intermediate device from a message sent from the storage device to the client.
  • the intermediate device saves the data requested by the first packet in a cache.
  • the application layer field included in the characteristic of the first packet is a key-value string.
  • an intermediate device in a communication network including one or more processors; one or more memories; one or more computer programs are stored in the one or more memories, and the one or more computer programs Instructions are included, and when the instructions are executed by one or more processors, the method for optimizing data access performance as described in the above first aspect and any possible implementation manner thereof is executed.
  • a chip in a fourth aspect, includes a processor and a communication interface, the communication interface is used to receive a signal, and transmit the signal to the processor, and the processor processes the signal, The method for optimizing data access performance as described in the above first aspect and any possible implementation manner thereof is executed.
  • a computer-readable storage medium is provided.
  • Computer instructions are stored in the computer-readable storage medium.
  • the above-mentioned first aspect and any possible The method for optimizing data access performance described in the implementation manner is executed.
  • a computer program product including computer instructions.
  • the computer instructions When the computer instructions are run on an intermediate device, the optimized data access as described in the above first aspect and any possible implementation thereof is provided. The performance method is implemented.
  • FIG. 1 is a schematic diagram of a client accessing a database provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a storage device accessed by a client provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a solution for optimizing database performance provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of another solution for optimizing database performance provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a network forwarding device provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a method for optimizing data access performance provided by an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of a method for optimizing data access performance provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a storage device accessed by a client provided in an embodiment of the present application.
  • FIG. 9 is a schematic diagram of optimizing data access performance provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a client accessing a database provided by an embodiment of the present application.
  • FIG. 11 is a schematic diagram of an optimized data access performance provided by an embodiment of the present application.
  • FIG. 12 is a schematic diagram of a client accessing a storage device provided by an embodiment of the present application.
  • FIG. 13 is a schematic diagram of a method for optimizing data access performance provided by an embodiment of the present application.
  • FIG. 14 is a schematic diagram of a client accessing a database provided by an embodiment of the present application.
  • FIG. 15 is a schematic diagram of a solution for optimizing database performance provided by an embodiment of the present application.
  • Fig. 16 is a schematic block diagram of an intermediate device in a communication network provided by an embodiment of the present application.
  • the network device in the embodiments introduced in this application may be a device for communicating with terminal devices.
  • the network device may be a network switch, a router, etc., or a cloud radio access network (cloud radio access network, CRAN ) scenario, or the network device can be a relay station, an access point, a vehicle-mounted device, a wearable device, and a network device in a future 5G network or a network device in a future evolved PLMN network.
  • CRAN cloud radio access network
  • FIG. 1 is a schematic diagram of a client accessing a database provided by an embodiment of the present application.
  • the database is generally deployed in a cluster.
  • the cluster nodes may be distributed in multiple host servers in the form of virtual machines or containers, or may run directly on the server host.
  • the nodes distributed on different servers are connected through the Ethernet network.
  • the virtual serves as a whole.
  • the server 2 in FIG. 1 includes a database node 1, a database node 2, and a database node 3, that is, the server 2 includes multiple DBs.
  • a process for a client (client) 110 to access a database may include steps 101 to 105 .
  • the client 110 may also be called a user, and there may be one client or multiple clients.
  • Step 101 the client 110 sends a message to the cluster 130 to access some data, wherein the message first passes through the network forwarding device 120 .
  • the packet requesting data will be forwarded to the cluster 130 through the network forwarding device 120 .
  • Step 102 the network forwarding device 120 forwards the packet to the database node 1 in the server 1 .
  • the cluster computing module in the database node 1 can calculate the database node where the data actually accessed by the message is located through a cluster algorithm. location, and then redirect the message, for example, modify the five-tuple information of the message, etc.
  • the network forwarding device 120 randomly sends the message to the database node 1 in the server 1, and in other embodiments, the network forwarding device 120 may also send the message to the server 2 Database node 2 in .
  • Step 103 the database node 1 sends the redirected message to the network forwarding device 120 .
  • Step 104 the network forwarding device 120 sends the redirected message to the target database node n.
  • step 104 the target database node of the redirected message is database node n in server N.
  • Step 105 the database node n encapsulates the data accessed by the message, and then modifies the message to obtain a reply message, and sends the reply message to the network forwarding device 120 .
  • Step 106 the network forwarding message 120 sends the reply message to the client.
  • the current node will calculate the location of the database node where the data is located according to the cluster algorithm, and then send a redirection message. Redirect to the target database node where the data is actually located through the network to obtain the data, and the target database node feeds the data back to the client.
  • the server may need to redirect.
  • the redirected traffic is redundant traffic in the entire network, which additionally occupies the network input/output of the network forwarding device and the server.
  • FIG. 2 is a schematic diagram of a storage device accessed by a client provided by an embodiment of the present application.
  • Storage area network (storage area network, SAN) is a high-speed network dedicated to storage operations. SAN connects hosts and storage devices together, and can provide any host and any storage device on it. Dedicated communication channels, SAN separates storage devices from servers, and realizes storage resource sharing at the server level.
  • IP SAN internet protocol SAN
  • IP SAN carries the SAN on the IP network, and the above four layers of the IP network carry the storage protocol.
  • the storage device may include a controller and a physical storage medium, and the controller and the physical storage medium may be connected through a bus.
  • the controller can abstract multiple logical unit numbers (LUNs) that map to physical storage media.
  • LUNs logical unit numbers
  • the front-end interface of the storage device can receive the IP SAN message, and the controller analyzes the storage protocol carried by the IP SAN message to resolve the operation of the target LUN corresponding to the message, and deliver it to the physical storage corresponding to the target LUN through the bus medium.
  • the client uses IP SAN packets to operate the physical storage medium of the remote storage device through the IP network.
  • Storage devices can be deployed in clusters, so the data requested by the message received by the front-end interface of the storage device may not be the data contained in the storage device. At this time, the storage device needs to pull the data requested by the message to the storage device. device, and form a reply message.
  • the storage device may send a synchronization message of a data synchronization request to another storage device where the data requested by the message actually exists, and the other storage device sends the data requested by the message to the storage device,
  • the storage device encapsulates the data requested by the message to form a reply message.
  • the synchronization message can be sent or received through an external network or an internal connection.
  • the client 210 or the process for the client to access the storage device may include steps 201 to 206 .
  • the client 210 sends a message for performing storage services to the storage device cluster 230 , where the message first passes through the network forwarding device 220 . .
  • the client when the client sends a packet for storage service to the storage device cluster 230 , the packet will be forwarded to the storage device cluster 230 through the network forwarding device 220 .
  • the client 210 may also be called a user, and there may be one client or multiple clients.
  • the network forwarding device 220 accesses data in the storage device through the front-end interface of the storage device 2.
  • the storage device 2 sends a synchronization message for data synchronization to the storage device 1.
  • the storage device 1 sends the data requested by the packet to the storage device 2.
  • the storage device 2 encapsulates the data requested by the message to form a reply message, and sends the reply message to the network forwarding device 220 through the front-end interface.
  • the network forwarding device forwards the reply packet to the client 210.
  • DPDK data plane development kit
  • smart network cards smart network cards
  • hot data caching hot data caching
  • FIG. 3 is a schematic diagram of a solution for optimizing database performance provided by an embodiment of the present application.
  • the storage device may include a dedicated device for storing services, or a general server running storage service software.
  • the technical solution uses DPDK to improve data processing performance and throughput of data access.
  • the client 310 sends a message to the network switching device 320 to access some data; the network forwarding device 320 sends the message to the storage device 330 .
  • the storage device 330 can reduce context switching and other mechanisms to improve network performance.
  • problems such as large network traffic jitter and uneven allocation of traffic hash to central processing unit (CPU) cores.
  • the technical solution utilizes the smart network card to improve the performance of the storage device.
  • the client 310 sends a message to the network switching device 320 to access some data; the network forwarding device 320 sends the message to the storage device 340 .
  • the smart network card is installed in the storage device 340 to replace the traditional network card, so as to improve the network performance of the storage device, but often needs to install multiple smart network cards, which has problems such as high cost, high power consumption, and incompatible frame size.
  • FIG. 4 is a schematic diagram of another solution for optimizing data access performance provided by an embodiment of the present application.
  • the storage device may include a dedicated device for storing services, or a general server running storage service software.
  • this technical solution uses hot data caching technology to improve the speed and efficiency of user access to storage devices or databases, thereby improving the performance of storage devices or databases.
  • the client 410 sends a message to the storage device 430 to access certain data, wherein the message first passes through the network forwarding device 420; the network forwarding device 420 sends the message to the server 430, and there is a part of the area in the server 430 Deployed as a hot data cache area 431, the hot data cache area stores hot data frequently accessed by clients.
  • the client 410 accesses hot data, it can directly access the hot data cache area 431, thereby improving the performance of the client.
  • the speed of 410 accessing storage devices or databases, and the real-time performance of hot data are high.
  • the server needs to deploy agents or use other technologies to process hot data. Operations such as hot data statistics and hot data display are still additional overhead for the server.
  • a hot data cache area 411 is deployed in the user client 410 , and the client can access it nearby, with high speed and no network bandwidth limitation.
  • the hot data is also synchronized from the server to the client through the Ethernet.
  • the inconsistency of the hot data takes a long time. If the hot data changes quickly, the hot data on the user client will always be synchronized.
  • Fig. 5 is a schematic diagram of an intermediate device provided by an embodiment of the present application.
  • the intermediate device 200a can be the network forwarding device in FIG. 1, and the network forwarding device can be a black-box device such as a switch or a router.
  • the space has been occupied by various services.
  • the internal resources of the device can be divided into resource 1 to resource N, and each resource has been occupied by a corresponding service. Therefore, the traditional network forwarding device has a complex and cumbersome process for implementing new functional requirements.
  • the services of the programmable network device 200b are not fixed, and can be flexibly created and loaded according to its own needs. New services such as service 4 can be developed and launched quickly, and the space resources occupied by service 4 can be flexibly defined . Therefore, programmable network devices can flexibly implement required functions.
  • the present application provides a method for optimizing data access performance and an intermediate device in a communication network.
  • the method can improve the performance of a storage device or a database, thereby improving the efficiency of a client accessing a storage device or a database.
  • FIG. 6 is a schematic diagram of a method for optimizing data access performance provided by an embodiment of the present application.
  • the intermediate device between the client and the server may be a network device, such as a programmable network device, and the client and the server may be one or multiple.
  • the intermediate device 520 may receive the first message sent from the terminal where the client is located, and if the intermediate device 520 determines that the data requested by the first message exists in the intermediate device, then The intermediate device 520 may send the data requested by the first packet to the terminal where the client is located. Therefore, there is no need to obtain the data requested by the first message from a remote server (eg, a database or a storage device), thereby improving the efficiency of data access. Further, the performance consumption of the server is reduced.
  • a remote server eg, a database or a storage device
  • the intermediate device 520 can determine the target server where the data requested by the first message is located, so that the data requested by the first message can be redirected to The packet is forwarded to the corresponding target server 530 in a manner, thereby avoiding redirection of the first packet between servers, thereby reducing redundant traffic overhead of the server, and improving performance of the server.
  • FIG. 7 is a schematic flowchart of a method for optimizing data access performance provided by an embodiment of the present application.
  • the method can be applied to an intermediate device of a communication network, the intermediate device can be a network device between a client and a server, the client can be one or more, and the server can be one or more, and the method can Including: step 401 to step 402.
  • the client can be carried in a terminal device, such as a mobile phone, a personal computer, etc.
  • the server can include a storage device or a database, etc.
  • the intermediate device can be a programmable network between the terminal device and the storage device equipment, or P4 switch, network processor (network processor, NP), router, field-programmable gate array (field-programmable gate array, FPGA), etc.
  • the intermediate device parses the received first packet to obtain the characteristics of the first packet, the first packet is from a terminal where one of the clients is located, and the first packet is used to send A request data in the server, the characteristic is used to indicate the data requested by the first packet, and the characteristic is carried in the part of the first packet corresponding to the application layer data.
  • the intermediate device receives the first message sent by the terminal where the client is located.
  • the first message may be a message for requesting a storage service.
  • the first message may request data from the storage device, or It may be to request data from a database, and the intermediate device may parse the first packet to obtain the characteristics of the first packet.
  • the message parsing module in the intermediate device can extract the feature in the first message according to the parsing rules, and the feature can be used to indicate the data requested by the first message, and the feature can be carried in the first message Corresponds to the part of the application layer data. Therefore, the intermediate device can extract the part of the application layer data in the first packet, so as to obtain the feature of the first packet.
  • the intermediate device, the client and the server may be in the same trusted area, for example, may be in the same trusted communication network, then the data in the first message may not need to be encrypted, therefore, the intermediate device The data part of the application layer in the first packet may be directly extracted.
  • the parsing rule may be pre-cached by the intermediate device, or the parsing rule may be sent to the intermediate device through the control plane by the server, or may be self-learned by the intermediate device.
  • the characteristics of the first packet include values of a plurality of fields arranged according to rules, and the rules indicate the corresponding order of the plurality of fields in the characteristics of the first packet.
  • the multiple fields may include a scatter aggregation table SGL field and a start logical block address start LBA field.
  • the server uses a non-volatile memory standard (non-volatile memory express over fabrics, NOF) carried on the network
  • the multiple fields are SGL and the initial logical block address
  • the feature of the first message may be that it has sequential SGL and start logical block address, for example, SGL comes first and start logical block address follows, or the start logical block address comes first and SGL follows.
  • the multiple fields may also be SGL, start logical block address start LBA field and other available fields in the NOF protocol.
  • the application layer field included in the characteristic of the first packet is a key-value string.
  • the application layer field included in the characteristic of the first message is a key-value string.
  • the first message is specifically used to request data from the storage device, and the data specifically requested by the first message is block data of the storage device.
  • the data requested by the first message may be block data in the storage device, for example, the first message carries the address of the block data and the length of the block data.
  • the first message is specifically used to request data from the database, and the data specifically requested by the first message is a record in the database.
  • the data requested by the first message may be a certain record in the database.
  • the server includes one or more, the intermediate device stores the mapping relationship between the characteristics of the first message and the server identifier, and the method further includes: the intermediate device does not store the first message In the case of requested data, the intermediate device redirects the first message to the first message according to the feature of the first message and the mapping relationship between the feature of the first message and the server identifier
  • the server corresponding to the file feature sends a second message, and the data requested by the second message is the same as that of the first message.
  • the server identifier can be an address or an identity document (ID, ID), etc., and the address can be a network address, such as an IP address, or a media access control address (MAC) address, etc., and the ID can also be It can be the tag ID when tag technology is used.
  • ID an identity document
  • MAC media access control address
  • the server identification can be in one-to-one correspondence with the server, that is, each server corresponds to a server identification, and there can also be a one-to-one correspondence between the characteristics of the first message and the server identification, that is, the first A feature in a message may correspond to a server identifier, so that the corresponding server can be found through the feature in the first message.
  • mapping relationship between the feature of the first packet and the server identifier may be pre-stored in the intermediate device, or the mapping relationship is sent by the server to the intermediate device through the control plane, and so on.
  • redirection means that the intermediate device can modify the header of the first message to obtain the second message, and the second message can access the corresponding server according to the header, wherein the first The data requested by the second message is the same as the data requested by the first message.
  • the intermediate device may modify the quintuple information of the first packet to obtain a modified second packet, but the data requested to be accessed by the second packet is the same as that of the first packet.
  • the corresponding server node can be obtained according to the mapping relationship between the characteristics of the first message and the server identifier, so that the modified second A message is accurately sent to the corresponding server node, thereby reducing the redirection of the first message between internal nodes of the server, reducing redundant traffic between server nodes, and improving the performance of the server.
  • the intermediate device when the server node accessible by the first packet is consistent with the server node corresponding to the characteristics of the first packet, the intermediate device directly sends the first packet The text is sent to the corresponding server node.
  • the intermediate device when the data requested by the first message is not stored in the intermediate device, and the server node that the first message can access is the service corresponding to the feature of the first message
  • the intermediate device does not need to modify the header of the first packet, and can directly send the first packet to the corresponding server node.
  • the intermediate device In a case where the intermediate device stores the data requested by the first message, the intermediate device sends the data requested by the first message to the terminal.
  • step 401 the intermediate device has obtained the data requested by the first message by parsing the first message, and if the intermediate device stores the data requested by the first message, the intermediate device The device may send the data requested by the first packet to the terminal device.
  • the intermediate device is provided with a cache, and the cache stores data frequently accessed by the terminal device.
  • the data requested by the message is encapsulated to form a new reply message, and the reply message is sent to the terminal device.
  • the intermediate device may encapsulate the message according to the reply rule to form a reply message.
  • the message reply rule may also be pre-cached, or the reply rule may also be sent to the intermediate device through the control plane by the server, or may be self-learned by the intermediate device, and so on.
  • the intermediate device may also be a network forwarding device integrated with the above functions.
  • the network forwarding device may not have programmability, which is not limited in this embodiment of the present application.
  • the intermediate device can analyze the message sent by the terminal device to obtain the feature corresponding to the application layer in the message, which can indicate the data requested by the message, that is to say, the intermediate device can analyze the first Message, understand the information of the data to be requested indicated by the first message, and on the other hand, the intermediate device itself can store a part of the data, so that the intermediate device can query at the local end, when the intermediate device determines that it saves If there is data requested by the message, the intermediate device may directly send the data requested by the message to the terminal device.
  • This technical solution can avoid the redirection of messages between server nodes, thereby reducing the performance consumption of the server and improving the efficiency of the client accessing the server.
  • the method may further include: the intermediate device receiving a third message, the third message is used to request data from one of the servers, and the third message comes from the server where one of the clients is located. terminal;
  • the intermediate device stores the data requested by the third message in the intermediate device.
  • the third message is the same as the first message, and is used to request data from one of the servers.
  • the intermediate device can use the third message
  • the data requested by the text is stored in the intermediate device.
  • the threshold value can be dynamically configured by the control plane, and the specific value is not limited in this embodiment of the present application.
  • the third message and the first message may come from the same client or the same terminal, or may come from different terminals or clients, which is not limited in this embodiment of the present application.
  • the data requested by the third message stored by the intermediate device is requested by the intermediate device from the storage device; or the data requested by the third message stored by the intermediate device is the data requested by the intermediate device.
  • the above-mentioned intermediate device obtains it from the message sent by the storage device to the client.
  • the intermediate device may send a request message to the storage device to request the data requested by the third message and store the data.
  • the intermediate device may intercept the message sent by the storage device to the client, to obtain the data requested by the third message, and store the data.
  • the message sent by the storage device to the client is sent in response to the request message of the client, that is, the message is a response message to the client after the storage device receives the request message from the client. .
  • the data requested by the third message may be stored in the cache of the intermediate device.
  • the intermediate device saves the data requested by the first packet in a cache.
  • the intermediate device when the intermediate device does not have the data requested by the first message, the intermediate device can obtain the data requested by the first message from the reply message sent by the storage device or the database to the client, then the intermediate The device may save the data requested by the first packet in the cache of the intermediate device.
  • FIG. 7 may be further introduced below in conjunction with FIGS. 8-15 .
  • FIG. 8 is a schematic diagram of a storage device accessed by a client provided in an embodiment of the present application.
  • the step where the terminal 710 where the client is located accesses the storage device through the intermediate device 720 may include steps 701 to 703a.
  • the intermediate device may be a network device between the client and the storage device, such as a network switch.
  • the intermediate device receives a message sent by the terminal where the client is located, and the traffic analysis module in the intermediate device can determine whether the message accesses hot data according to the feature data in the message.
  • the intermediate device is provided with a hot data area for caching hot data.
  • the hot data may be pre-stored by the storage device in the intermediate device, or sent by the storage device to the intermediate device in real time through the control plane.
  • the message when it is determined that the data requested by the message is stored in the intermediate device, the message is sent to the data cache.
  • the hot data area encapsulates the hot data accessed by the message to form a proxy message, and sends the proxy message to the terminal.
  • the intermediate device when the intermediate device determines that the terminal's message accesses hot data, it can directly encapsulate the hot data to form a reply message, so that it does not need to access the storage device remotely, thereby improving the speed and efficiency of data access. Further, The performance consumption of the storage device is reduced.
  • the step of the client 710 accessing the storage device through the intermediate device 720 may include steps 701 to 704b.
  • the intermediate device receives the packet sent by the terminal, and the traffic analysis module in the intermediate device can determine whether the packet accesses hot data according to the feature data in the packet.
  • the message when the data requested by the message does not exist in the intermediate device, the message is sent to the corresponding storage device 1 .
  • the storage device 1 encapsulates the data requested by the message, obtains a reply message, and sends the reply message to the intermediate device 720.
  • the intermediate device 720 sends the reply packet to the client 710.
  • the intermediate device when the intermediate device determines that the client's message does not access hot data, or the data accessed by the message does not exist in the intermediate device, the intermediate device can determine according to the characteristics of the message The storage device where the data requested by the message is located, and the message is directly sent to the corresponding storage device, thereby improving the efficiency of data access.
  • this technical solution will be introduced in conjunction with FIGS. 12-13. It should be understood that the technical solution in FIGS. 12-13 can be implemented on the basis of FIG. The technical solution is combined with the technical solution in Fig. 12 or Fig. 13 .
  • FIG. 9 is a schematic diagram of optimizing data access performance provided by an embodiment of the present application.
  • a storage device cluster 1 may include a storage array 1 , a storage array 2 . . . a storage array n.
  • the intermediate device 820 receives the first packet sent by the client 810 .
  • the message matching module 821 in the intermediate device 820 filters the first message according to the message matching rule, and when it is determined that the first message belongs to a message for accessing the storage service, the first message is Send to the message parsing module 822; when it is determined that the first message is not a message for accessing the storage service, forward the first message to the original message forwarding module.
  • the message matching module 821 sending the first message to the message parsing module 822 is only illustrative, and in other embodiments, the message matching module 821 can also send the first message to the message parsing module 822
  • the first packet is sent to other packet parsing modules, such as the packet parsing module 825 .
  • the content included in the packet matching rule may at least include at least one of the following content: source address; destination address; source port; destination port; application layer protocol fields.
  • the packet matching rule may be sent by the storage device cluster to the intermediate device through the configuration interface through the control plane.
  • the packet matching rule may be sent by the storage device cluster 1 to the intermediate device 820 through the configuration interface 824 through the control plane 1, or may be pre-cached in the intermediate device 820.
  • the packet matching rule may also be stored What the control plane 2 of the device cluster 2 sends to the intermediate device 820 is not limited in this embodiment of the present application.
  • the packet parsing module 822 can parse the first packet according to the parsing rules to obtain the characteristics of the first packet.
  • the characteristics of the first packet can include the values of a plurality of fields arranged according to rules, and the rules can indicate that the A corresponding sequence of multiple fields in the characteristics of the first packet.
  • the multiple fields include the SGL field of the scatter aggregation table and the startLBA field of the start logical block address.
  • the rule may be that the SGL field comes first and the startLBA field follows; or, the rule may be that the SGL field comes after the startLBA field.
  • the multiple fields are the SGL field and the startLBA field.
  • the application layer field included in the characteristic of the first packet is a key-value string.
  • the message parsing module 822 sends the feature of the parsed first message to the traffic analysis module 823, and the traffic analysis module 823 determines whether the message requests heat according to the number of times the data requested by the first message is counted. data. In other embodiments, if the packet parsing module 822 fails to parse the characteristics of the first packet, it forwards the first packet to the original packet forwarding module.
  • the first message may be transferred to the hot data module 829. If the number of counts of the data requested by the first message is less than or equal to the first preset value, it is determined that the data requested by the first message does not belong to hot data, and the first message is forwarded to the original message forwarding module.
  • the hot data module 829 can obtain the data value of the hot data according to the feature value in the first message, and the data requested by the first message according to the message proxy rule The data is encapsulated to obtain a reply message.
  • the message pickup rule may include: address modification of the second and third layers of the message; status field modification of the business layer; verification field modification and other rules.
  • the packet reply rule may be sent by the storage device cluster 1 to the intermediate device 820 via the control plane 1 through the configuration interface 824 , or may be pre-cached in the intermediate device 820 .
  • the hot data contained in the hot data module may be sent by the storage device cluster to the intermediate device through the control plane.
  • the thermal data contained in the thermal data module 829 may be sent by the storage device cluster 1 to the intermediate device through the control plane 1 .
  • the hot data contained in the hot data module may be pre-stored in the intermediate device, or the hot data contained in the hot data module may also be in the message sent by the intermediate device from the storage device cluster 1 to the client acquired.
  • the intermediate device can send a hot data synchronization request to the storage device cluster 1, receive a message with hot data replied by the storage device cluster 1, and update the hot data in the message to the hot data module.
  • the hot data module 829 sends the reply message to the client 810 .
  • the intermediate device located between the client and the storage device can parse the received message and determine whether the message requests hot data.
  • the intermediate device can directly send the message The requested data is sent to the client.
  • This technical solution does not need to obtain the data requested by the message from the remote storage device, and the intermediate device can directly answer the message, thereby improving the efficiency of data access and reducing the performance consumption of the storage device.
  • FIG. 8 is a schematic diagram of a client accessing a database provided by an embodiment of the present application.
  • each server may include multiple database container nodes, and the multiple servers may form a database cluster 930 .
  • the intermediate device 920 refer to the relevant description in FIG. 7 .
  • steps 901 to 903a reference may be made to related descriptions of steps 701 to 703a, and details are not repeated for brevity.
  • the database node encapsulates the data requested by the message to form a reply message, and sends the reply message to the intermediate device 920.
  • the intermediate device 920 sends the reply packet to the client 910.
  • the intermediate device determines that the client's message requests hot data, it can directly encapsulate the hot data to form a proxy message, so that it is not necessary to access the database node remotely, thereby improving the speed and efficiency of data access. Further, The performance consumption of the database is reduced.
  • the intermediate device determines that the client's message does not request hot data, or the data requested by the message does not exist in the intermediate device, the intermediate device can determine the data requested by the message according to the characteristics of the message The database node where it is located, and the message is directly sent to the corresponding database node, thereby improving the efficiency of data access.
  • this technical solution will be introduced in conjunction with Figures 14-15. It should be understood that the technical solutions in Figures 14-15 can be implemented on the basis of Figure 10, for example, in other embodiments, the The technical solution is combined with the technical solution in Fig. 14 or Fig. 15 .
  • FIG. 11 is a schematic diagram of an optimized data access performance provided by an embodiment of the present application.
  • each database cluster may include server 1 to server n in FIG. 10 .
  • the intermediate device between the client and the database can parse the received message and determine whether the message requests hot data.
  • the intermediate device can directly request the message data is sent to the client.
  • This technical solution does not need to obtain the data requested by the message from the remote database node, and the intermediate device can directly answer the message, thereby improving the efficiency of data access and reducing the performance consumption of the database.
  • FIG. 11 may include the technical solution in FIG. 10 .
  • the technical solution in FIG. 11 may also be combined with the technical solution in FIG. 14 or FIG. 15 .
  • FIG. 12 is a schematic diagram of a client accessing a storage device provided by an embodiment of the present application.
  • the process for the terminal where the client resides to access the storage device may include steps 1101 to 1104 .
  • the intermediate device 1120 receives a first packet sent by the client 1110.
  • the path calculation module 1121 in the intermediate device 1120 may determine the target storage device where the data requested by the first message is located according to the characteristics of the first message.
  • the path calculation module 1121 determines the target where the data requested by the first message resides according to the feature of the first message and the mapping relationship between the feature of the first message and the storage device identifier storage device.
  • the path calculation module 1121 may calculate the feature of the first packet according to the path calculation algorithm, and determine the first packet according to the calculation result and the mapping relationship between the feature of the first packet and the storage device identifier.
  • a target storage device where the data requested by the message resides.
  • the path calculation module 1121 performs a modulo operation on the characteristics of the first message according to a hash (hash) algorithm (such as CRC16, CRC32, or other hash polynomial parameters), and the path calculation module 1121 can also use other
  • the algorithm calculates the feature of the first packet, which is not limited in this embodiment of the present application.
  • the intermediate device 1120 forwards the packet to the target storage device.
  • the intermediate device sends a second packet to the target storage device in a redirection manner, and the data requested by the second packet is the same as that requested by the first packet.
  • the second message can be obtained by the intermediate device modifying the quintuple information of the message header of the first message according to the location of the target storage device, so that the intermediate device can forward the second message to target storage device.
  • the intermediate device can directly forward the first message to the target storage device without redirection. storage device.
  • the target storage device encapsulates the data requested by the first message to form a reply message, and sends the reply message to the intermediate device 1120.
  • the intermediate device 1120 forwards the reply packet to the client 1110.
  • the intermediate device shares the function of message path orientation for the storage device, thereby reducing the performance consumption of the storage device. Furthermore, this solution avoids the redirection of packets between storage devices, thereby reducing redundant traffic inside the storage devices and increasing throughput.
  • FIG. 13 is a schematic diagram of a method for optimizing data access performance provided by an embodiment of the present application.
  • a storage device cluster 1 may include a storage array 1 , a storage array 2 . . . a storage array n.
  • the intermediate device 1220 receives the first packet sent by the client 1210 .
  • the packet matching module 1221 in the intermediate device 1220 filters the first packet according to the packet matching rules, and when it is determined that the first packet belongs to a packet for accessing the storage service, it determines that the first packet The corresponding storage device cluster 1, and then forward the first message to the message parsing module 1222; when it is determined that the first message does not belong to the message for accessing the storage service, forward the first message to the original message In the text forwarding module.
  • the message matching module 1221 filters the first message according to the message matching rule, and when it is determined that the first message belongs to a message for accessing the storage service, it determines that the first message
  • the storage device cluster 1 corresponding to a message, and then forwarding the first message to the message analysis module 1222 is only illustrative, and in other embodiments, it may also be the message analysis module 2 in the intermediate device 1220
  • the message matching rule filters the first message, and when it is determined that the first message belongs to a message for accessing the storage service, determine the storage device cluster 2 corresponding to the first message, and then forward the first message Go to message parsing module 2.
  • the content included in the packet matching rule may at least include at least one of the following content: source address; destination address; source port; destination port; application layer protocol fields.
  • the packet parsing module 1222 can parse the first packet according to the parsing rules to obtain the characteristics of the first packet.
  • the characteristics of the first packet can include the values of multiple fields arranged according to rules, and the rules can indicate that the A corresponding sequence of multiple fields in the characteristics of the first packet.
  • the multiple fields include the SGL field of the decentralized aggregation table and the start LBA field of the starting logical block address.
  • the rule may be that the SGL field is in front, and the start LBA field is in the back; or, the rule may be that the SGL field is in the back, and the start LBA field in front.
  • the fields included in the first feature are different.
  • the characteristics of the first packet include multiple fields, and the multiple fields are the SGL field and the start LBA field.
  • the application layer field included in the characteristic of the first message is a key-value string.
  • the message parsing module 1222 sends the parsed features of the first message to the path calculation module 1223, and the path calculation module 1222 uses the features of the first message, and the features of the first message and the storage device identifier The mapping relationship among them determines the target storage device where the data requested by the first message resides.
  • the path calculation module 1123 may calculate the feature of the first packet according to the path calculation algorithm, and determine the first packet according to the calculation result and the mapping relationship between the feature of the first packet and the storage device identifier.
  • a target storage device where the data requested by the message resides.
  • the path calculation module 1123 performs a modulo operation on the features of the first message according to a hash algorithm (such as CRC16, CRC32, or other hash polynomial parameters), and the path calculation module 1123 can also use other algorithms to determine the The feature of the first packet is calculated, which is not limited in this embodiment of the present application.
  • the storage device identifier may be an address or an ID, and the address may be a network address, such as an IP address, a MAC address, etc., and the ID may also be a tag ID using tag technology.
  • the path calculation module 1223 sends a second message to the target storage device in a redirection manner, and the data requested by the second message is the same as that of the first message The requested data is the same.
  • the second message can be obtained by the intermediate device modifying the quintuple information of the message header of the first message according to the location of the target storage device, so that the intermediate device can forward the second message to the target storage device.
  • the intermediate device can directly send the second message without redirection. A message is forwarded to the target storage device.
  • the packet matching rules, packet parsing rules, the mapping relationship between the characteristics of the first packet and the storage device identifier, the path calculation algorithm, etc. may be sent by the storage device cluster through the control plane through the configuration interface 1224 to the intermediate device 1220; or, the above rules may also be pre-stored in the intermediate device 1220.
  • the intermediate device can obtain the target storage device corresponding to the first message according to the mapping relationship between the characteristics of the first message and the storage device identifier, so that the modified first message can be accurately sent to the corresponding storage devices, thereby reducing the redirection of the first message between storage devices, reducing redundant traffic between storage devices, thereby improving the performance of storage devices.
  • FIG. 14 is a schematic diagram of a client accessing a database provided by an embodiment of the present application.
  • a single server includes one or more DB container nodes, and multiple servers form a DB cluster.
  • the intermediate device 1320 has a path calculation module 1321, and the intermediate device 520 may be a programmable network forwarding device, or a P4 switch, a network processor, a field programmable gate array, and the like.
  • the process for the client to access the database in this embodiment may include Step 1301 to Step 1304 .
  • the intermediate device 1320 receives a first packet sent by the client 1310.
  • the path calculation module 1321 in the intermediate device 1320 determines the target database node where the data requested to be accessed by the first message resides according to the characteristics of the first message.
  • the path calculation module 1321 determines the target database where the data requested by the first message is located according to the feature of the first message and the mapping relationship between the feature of the first message and the database identifier node.
  • the path calculation module 1321 may calculate the features of the first packet according to the path calculation algorithm, and determine the first The target database node where the data requested by the message resides. For example, the path calculation module 1321 performs a modulo operation on the features of the first message according to a hash algorithm (such as CRC16, CRC32, or other hash polynomial parameters), and the path calculation module 1321 can also use other algorithms to determine the The feature of the first packet is calculated, which is not limited in this embodiment of the present application.
  • a hash algorithm such as CRC16, CRC32, or other hash polynomial parameters
  • the intermediate device 1320 forwards the message to the target database node.
  • the intermediate device sends a second packet to the target database node in a redirection manner, and the data requested by the second packet is the same as that of the first packet.
  • the second message can be obtained by the intermediate device modifying the quintuple information of the message header of the first message according to the location of the target database node, so that the intermediate device can forward the second message to Target database node.
  • the intermediate device can directly forward the first message to the target database node without redirection. database node.
  • the target database node encapsulates the data requested by the first message to form a reply message, and sends the reply message to the intermediate device 1320 .
  • the intermediate device 1320 forwards the reply packet to the client 1310.
  • the intermediate device has a path calculation module, which can calculate the target database node where the data actually accessed by the message is located, so that the message can be directly forwarded to the target database node, thereby reducing the number of messages.
  • FIG. 15 is a schematic diagram of a solution for optimizing database performance provided by an embodiment of the present application.
  • each database cluster may include server 1 to server n in FIG. 14 .
  • the intermediate device located between the client and the database can parse the received message and calculate the target database node where the data actually accessed by the message is located, so that the message can be directly forwarded or redirected Forwarding the message to the target database node in the same way avoids the process of redirecting the message between the internal nodes of the database cluster, thereby improving the performance of the database.
  • Fig. 16 is a schematic block diagram of an intermediate device in a communication network provided by an embodiment of the present application.
  • the intermediate device 1500 is a network device between the client and the server, the client is one or more, the server is one or more, the intermediate device 1500 may include a processing unit 1510 and transceiver unit 1520 .
  • the processing unit 1510 is configured to parse the received first message to obtain the characteristics of the first message, the first message is from a device where one of the clients is located, and the first message is It is used to request data from one of the servers, the feature is used to indicate the data requested by the first message, and the feature is carried in the part of the first message corresponding to the application layer data;
  • the transceiving unit 1520 is configured to send the data requested by the first message to the terminal when the intermediate device stores the data requested by the first message.
  • the processing unit 1510 may be the packet matching module, packet parsing module, traffic analysis module, path calculation module, etc. in the above embodiments.
  • the transceiver unit 1520 may be a unit responsible for sending and receiving messages in the above embodiments.
  • the feature of the first packet includes values of multiple fields arranged according to a rule, and the rule indicates a corresponding sequence of the multiple fields in the feature of the first packet.
  • the multiple fields include a scatter aggregation table SGL field and a start logical block address start LBA field.
  • the server includes one or more, the intermediate device stores the mapping relationship between the characteristics of the first message and the server identifier, and the transceiver unit 1520 is further configured to:
  • the intermediate device In the case that the intermediate device does not store the data requested by the first message, the intermediate device according to the characteristics of the first message and the relationship between the characteristics of the first message and the server identifier The mapping relationship of the first packet is used to send a second packet to the server corresponding to the feature of the first packet in a redirection manner, and the data requested by the second packet is the same as that of the first packet.
  • the first message is specifically used to request data from the storage device, and the data specifically requested by the first message is block data of the storage device.
  • the first message is specifically used to request data from a database, and the data specifically requested by the first message is a record in the database.
  • the transceiver unit 1520 is further configured to: receive a third message, the third message is used to request data from one of the servers, and the third message is from the client one of;
  • the processing unit 1510 is further configured to store the data requested by the third packet in the intermediate device when the number of times the data requested by the third packet is requested is greater than a threshold.
  • the data requested by the third message stored by the intermediate device is requested by the intermediate device from the storage device; or the data requested by the third message stored by the intermediate device is the data requested by the intermediate device.
  • the above-mentioned intermediate device obtains it from the message sent by the storage device to the client.
  • the intermediate device saves the data requested by the first packet in a cache.
  • the application layer field included in the characteristic of the first packet is a key-value string.
  • the embodiment of the present application also provides an intermediate device in a communication network, including one or more processors; one or more memories; the one or more memories store one or more computer programs, and the one or more computers
  • the program includes instructions, and when the instructions are executed by one or more processors, the method for optimizing data access performance as described in any one of the above embodiments is executed.
  • the embodiment of the present application also provides a chip, the chip includes a processor and a communication interface, the communication interface is used to receive a signal, and transmit the signal to the processor, and the processor processes the signal, The method for optimizing data access performance as described in any one of the above embodiments is executed.
  • the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores computer instructions, and when the computer instructions are run on a computer, as described in any one of the above embodiments, A method for optimizing data access performance is implemented.
  • Embodiments of the present application provide a computer program product, which, when running on a computer, causes the computer to execute the above-mentioned related steps, so as to implement the method for optimizing data access performance in the above-mentioned embodiments.
  • an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, The processor can execute the computer-executable instructions stored in the memory, so that the chip executes the methods for optimizing data access performance in the above method embodiments.
  • the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment is all used to execute the corresponding method provided above, therefore, the beneficial effects it can achieve can refer to the above-mentioned The beneficial effects of the corresponding method will not be repeated here.
  • the disclosed systems, devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disc and other media that can store program codes. .

Abstract

一种优化数据访问性能的方法和中间设备,所述方法应用于通信网络的中间设备,所述中间设备为客户端与服务端之间的网络设备,所述客户端为一个或多个,所述服务端为一个或多个,所述方法包括:中间设备解析接收到的第一报文以得到所述第一报文的特征,第一报文来自客户端中的一个所在的终端,第一报文用于向服务端中的一个请求数据,特征用于指示第一报文所请求的数据,特征承载于第一报文对应于应用层数据的部分(401);在所述中间设备保存有所述第一报文请求的数据的情况下,所述中间设备向所述终端发送所述第一报文请求的数据(402)。该方法可以减小服务端的网络开销,提升数据访问的整体性能。

Description

优化数据访问性能的方法和中间设备
本申请要求于2021年07月15日提交中国专利局、申请号为202110799865.9、申请名称为“优化数据访问性能的方法和中间设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据访问技术领域,并且更具体地,涉及一种优化数据访问性能的方法和中间设备。
背景技术
现代互联网需要处理大量数据,因此,对服务端的性能要求越来越高,如,数据库(database,DB)或存储设备,数据库或存储设备一般以集群方式部署。
例如,当存储设备接收到客户端的报文之后,如果该报文请求的数据在另一存储设备中,则当前存储设备需要去另一存储设备中获取该报文请求的数据,增加了该存储设备的网络开销。同样的,当数据库集群中的某一数据库节点接收的报文请求的数据在另一数据库节点中时,该数据库节点需要对报文进行重定向,以转发至另一数据库节点中,也增加了该数据库节点的网络开销。
发明内容
本申请提供一种优化数据访问性能的方法和中间设备,该技术方案可以减小服务端的网络开销,以期提升数据访问的整体性能。
第一方面,提供了一种优化数据访问性能的方法,所述方法应用于通信网络的中间设备,所述中间设备为客户端与服务端之间的网络设备,所述客户端为一个或多个,所述服务端为一个或多个,所述方法包括:所述中间设备解析接收到的第一报文以得到所述第一报文的特征,所述第一报文来自所述客户端中的一个所在的终端,所述第一报文用于向所述服务端中的一个请求数据,所述特征用于指示所述第一报文所请求的数据,所述特征承载于第一报文对应于应用层数据的部分;在所述中间设备保存有所述第一报文请求的数据的情况下,所述中间设备向所述终端发送所述第一报文请求的数据。
其中,客户端可以位于终端设备中,服务端可以是存储设备、存储设备集群、数据库或数据库集群等,中间设备可以是可编程网络设备,或者P4交换机、网络处理器、现场可编程门阵列等。
应理解,中间设备、客户端和服务端可以是处于同一个信任区域内,例如,可以是处于同一个可信通信网络中,则该第一报文中的数据可以无需加密,因此,该中间设备可以直接提取该第一报文中的应用层的数据部分。
这样,位于服务端与客户端之间的中间设备可以解析接收到的第一报文得到报文中对 应于应用层的特征,该特征用于指示该第一报文请求的数据,也就是说,中间设备可以通过解析第一报文,了解到该第一报文指示的要请求的数据的信息,而另一个方面,中间设备本身存储有一部分数据,这样,中间设备就可以在本端进行查询,在该中间设备保存有该第一报文请求的数据的情况下,该中间设备可以向终端发送第一报文请求的数据。该技术方案可以避免去远端的服务端获取数据,从而可以减小服务端的网络开销,提升了数据访问的整体性能。
结合第一方面,在第一方面的某些实现方式中,所述第一报文的特征包括按规则排列的多个字段的值,所述规则指示所述多个字段在所述第一报文的特征中对应的顺序。
在另一些实施例中,该第一报文的特征也可以包括单个字段的值。
结合第一方面,在第一方面的某些实现方式中,所述多个字段包括分散聚合表SGL字段和起始逻辑区块地址start LBA字段。
结合第一方面,在第一方面的某些实现方式中,所述服务端包括一个或者多个,所述中间设备保存有所述第一报文的特征与服务端标识之间的映射关系,所述方法还包括:在所述中间设备未存有所述第一报文请求的数据的情况下,所述中间设备根据所述第一报文的特征,以及所述第一报文的特征与服务端标识之间的映射关系,以重定向的方式,向与所述第一报文的特征对应的服务端发送第二报文,所述第二报文请求的数据与所述第一报文相同。
其中,服务端标识可以是地址或身份标识号ID等,该地址可以是网络地址,如IP地址,或者媒体存取控制地址等等,该ID还可以是采用标签技术时的标签ID。
本申请的一个实施例中,该重定向指的是中间设备可以对第一报文的报文头进行修改,得到第二报文,该第二报文可以按照报文头访问对应的服务端,其中,该第二报文请求的数据与第一报文请求的数据是相同的。
结合第一方面,在第一方面的某些实现方式中,所述第一报文具体用于向存储设备请求数据,所述第一报文具体请求的数据为存储设备的块数据。
示例性地,该第一报文中携带有该块数据的地址和块数据的长度。
结合第一方面,在第一方面的某些实现方式中,所述第一报文具体用于向数据库请求数据,所述第一报文具体请求的数据为数据库中的记录。
示例性地,该第一报文请求的数据为数据库中的某条记录。
结合第一方面,在第一方面的某些实现方式中,所述方法还包括:所述中间设备接收第三报文,所述第三报文用于向所述服务端中的一个请求数据,所述第三报文来自所述客户端中的一个所在的终端;当所述第三报文请求的数据的被请求次数大于阈值时,所述中间设备将所述第三报文请求的数据存储于所述中间设备中。
其中,第三报文可以与第一报文来自同一个终端,也可以是不同的终端。
应理解,当第三报文请求的数据的被请求次数大于阈值时,说明该第三报文请求的数据被该终端或其他终端经常请求,即该数据可以理解为热数据,则该中间设备可以将该数据缓存在中间设备中,从而该中间设备可以直接将该数据发送至终端,而无需到远端的服务端去请求该数据,从而可以提升数据访问的效率。
结合第一方面,在第一方面的某些实现方式中,所述中间设备存储的所述第三报文请求的数据,是所述中间设备向存储设备请求的;或所述中间设备存储的所述第三报文请求 的数据,是所述中间设备从存储设备向客户端发送的报文中获取的。
应理解,中间设备可以主动向存储设备请求该第三报文请求的数据,也可以从存储设备向终端发送的回应报文中获取该第三报文请求的数据,并将该数据存储起来。
该示例中,当第三报文请求的数据的被请求此时次数大于阈值时,中间设备可以向存储设备发送请求消息,以请求该第三报文请求的数据,并将该数据存储起来。
或者,当第三报文请求的数据的被请求此时次数大于阈值时,该中间设备可以拦截存储设备发送给客户端的报文,以获取该第三报文请求的数据,并将该数据存储起来。
其中,存储设备发送给客户端的报文,是响应于客户端的请求报文而发送的,也就是说,该报文是在存储设备接收到客户端的请求报文之后,回应给客户端的回应报文。
结合第一方面,在第一方面的某些实现方式中,所述中间设备将所述第一报文请求的数据保存在缓存中。
基于本申请的一个实施例,中间设备将第一报文请求的数据保存在缓存中,当其他报文也请求该数据时,从而中间设备可以直接将该数据发送至终端,提升了数据访问的效率。
结合第一方面,在第一方面的某些实现方式中,所述第一报文的特征包括的应用层字段为键值字符串。
第二方面,提供了一种通信网络中的中间设备,所述中间设备为客户端与服务端之间的网络设备,所述客户端为一个或多个,所述服务端为一个或多个,包括:处理单元,用于解析接收到的第一报文以得到所述第一报文的特征,所述第一报文来自所述客户端中的一个所在的设备,所述第一报文用于向所述服务端中的一个请求数据,所述特征用于指示所述第一报文所请求的数据,所述特征承载于第一报文对应于应用层数据的部分;收发单元,用于在所述中间设备保存有所述第一报文请求的数据的情况下,向所述终端发送所述第一报文请求的数据。
结合第二方面,在第二方面的某些实现方式中,所述第一报文的特征包括按规则排列的多个字段的值,所述规则指示所述多个字段在所述第一报文的特征中对应的顺序。
结合第二方面,在第二方面的某些实现方式中,所述多个字段包括分散聚合表SGL字段和起始逻辑区块地址start LBA字段。
结合第二方面,在第二方面的某些实现方式中,所述服务端包括一个或者多个,所述中间设备保存有所述第一报文的特征与服务端标识之间的映射关系,所述收发单元还用于:在所述中间设备未存有所述第一报文请求的数据的情况下,所述中间设备根据所述第一报文的特征,以及所述第一报文的特征与服务端标识之间的映射关系,以重定向的方式,向与所述第一报文特征对应的服务端发送第二报文,所述第二报文请求的数据与所述第一报文相同。
结合第二方面,在第二方面的某些实现方式中,所述第一报文具体用于向存储设备请求数据,所述第一报文具体请求的数据为存储设备的块数据。
结合第二方面,在第二方面的某些实现方式中,所述第一报文具体用于向数据库请求数据,所述第一报文具体请求的数据为数据库中的记录。
结合第二方面,在第二方面的某些实现方式中,所述收发单元还用于:接收第三报文,所述第三报文用于向所述服务端中的一个请求数据,所述第三报文来自所述客户端中的一个所在的终端;所述处理单元还用于,当所述第三报文请求的数据的被请求次数大于阈值 时,将所述第三报文请求的数据存储于所述中间设备中。
结合第二方面,在第二方面的某些实现方式中,所述中间设备存储的所述第三报文请求的数据,是所述中间设备向存储设备请求的;或所述中间设备存储的所述第三报文请求的数据,是所述中间设备从存储设备向客户端发送的报文中获取的。
结合第二方面,在第二方面的某些实现方式中,所述中间设备将所述第一报文请求的数据保存在缓存中。
结合第二方面,在第二方面的某些实现方式中,所述第一报文的特征包括的应用层字段为键值字符串。
第三方面,提供一种通信网络中的中间设备,包括一个或多个处理器;一个或多个存储器;该一个或多个存储器存储有一个或多个计算机程序,该一个或多个计算机程序包括指令,当该指令被一个或多个处理器执行时,使得如上述第一方面及其任一种可能的实现方式中所述的优化数据访问性能的方法被执行。
第四方面,提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口用于接收信号,并将所述信号传输至所述处理器,所述处理器处理所述信号,使得如上述第一方面及其任一种可能的实现方式中所述的优化数据访问性能的方法被执行。
第五方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机指令,当所述计算机指令在计算机上运行时,使得如上述第一方面及其任一种可能的实现方式中所述的优化数据访问性能的方法被执行。
第六方面,提供了一种计算机程序产品,包括计算机指令,当所述计算机指令在中间设备上运行时,使得如上述第一方面及其任一种可能的实现方式中所述的优化数据访问性能的方法被执行。
附图说明
图1是本申请实施例提供的一种客户端访问数据库的示意图。
图2是本申请实施例提供的一种客户端访问存储设备的示意图。
图3是本申请实施例提供的一种优化数据库性能的方案的示意图。
图4是本申请实施例提供的另一种优化数据库性能的方案的示意图。
图5是本申请实施例提供的网络转发设备的示意图。
图6是本申请实施例提供的一种优化数据访问性能的方法的示意图。
图7是本申请实施例提供的一种优化数据访问性能的方法的示意性流程图。
图8是本申请实施例提供的一种客户端访问存储设备的示意图。
图9是本申请实施例提供的一种优化数据访问性能的示意图。
图10是本申请实施例提供的一种客户端访问数据库的示意图。
图11是本申请实施例提供的一种优化数据访问性能的示意图。
图12是本申请实施例提供一种客户端访问存储设备的示意图。
图13是本申请实施例提供的一种优化数据访问性能的方法的示意图。
图14是本申请实施例提供的一种客户端访问数据库的示意图。
图15是本申请实施例提供的一种优化数据库性能的方案的示意图。
图16是本申请实施例提供的一种通信网络中的中间设备的示意图框图。
具体实施方式
下面将结合附图,对本申请中的技术方案进行描述。
本申请中介绍的实施例中的网络设备可以是用于与终端设备通信的设备,例如,该网络设备可以是网络交换机、路由器等,还可以是云无线接入网络(cloud radio access network,CRAN)场景下的无线控制器,或者该网络设备可以为中继站、接入点、车载设备、可穿戴设备以及未来5G网络中的网络设备或者未来演进的PLMN网络中的网络设备等,本申请实施例并不限定。
图1是本申请实施例提供的一种客户端访问数据库的示意图。
参见图1,数据库一般是集群部署的,集群节点可能是以虚拟机或者容器的形式分布在多个宿主服务器中,也可能直接运行在服务器主机中,通过以太网络将分布在不同服务器上的节点虚拟为一个整体服务。
示例性地,图1中的服务器2中包括数据库节点1、数据库节点2、和数据库节点3,即服务器2中包括多个DB。
具体地,如图1所示,客户端(client)110访问数据库的过程可以包括步骤101至步骤105。
应理解,该客户端110也可以称为用户,该客户端可以为一个、也可以为多个。
步骤101,客户端110向集群130发送报文,以访问某些数据等,其中,该报文首先会经过网络转发设备120。
应理解,当客户端向集群130请求数据时,该请求数据的报文会经过网络转发设备120转发至集群130中。
步骤102,网络转发设备120将该报文转发至服务器1中的数据库节点1。
应理解,该步骤102中,该报文实际访问的数据可能不在数据库节点1中,此时,数据库节点1中的集群计算模块可以通过集群算法计算出该报文实际访问的数据所在的数据库节点位置,然后重定向该报文,例如,修改该报文的五元组信息等。
还应理解,该步骤102中,网络转发设备120随机将该报文发送至服务器1中的数据库节点1,在其他的实施例中,该网络转发设备120也可以将该报文发送至服务器2中的数据库节点2。
步骤103,数据库节点1将该重定向的报文发送至网络转发设备120。
步骤104,网络转发设备120将该重定向的报文发送至目标数据库节点n。
该步骤104中,该重定向的报文的目标数据库节点为服务器N中的数据库节点n。
步骤105,数据库节点n将该报文访问的数据封装,然后对报文进行修改,得到答复报文,并将该答复报文发送至网络转发设备120。
步骤106,网络转发报文120将该答复报文发送至客户端。
可见,当客户端访问某节点时,如果客户端访问的数据在另外的集群节点上,则当前的节点会根据集群算法,计算出该数据所处的数据库节点位置,然后发起重定向报文,通过网络重定向到该数据实际所在的目标数据库节点以获取数据,该目标数据库节点将数据反馈至客户端。在这个过程中,服务器可能需要重定向操作,重定向的流量在整个组网中属于冗余流量,额外占用了网络转发设备和服务器的网络输入/输出。
图2是本申请实施例提供的一种客户端访问存储设备的示意图。
存储区域网络(storage area network,SAN)是一种高速的、专门用于存储操作的网络,SAN将主机和存储设备连接在一起,能够为其上的任意一台主机和任意一台存储设备提供专用的通信通道,SAN将存储设备从服务器中独立出来,实现了服务器层面上的存储资源共享。
网际互连协议SAN(internet protocol SAN,IP SAN)是将SAN承载在IP网络上,IP网络四层以上承载的是存储协议。
参见图2,存储设备可以包括控制器和物理存储介质,该控制器和物理存储介质可以通过总线连接。控制器可以抽象出映射到物理存储介质的多个逻辑单元号(logical unit number,LUN)。存储设备的前端接口,可以接收IP SAN报文,控制器解析IP SAN报文承载的存储协议,以解析出该报文对应的目标LUN的操作,并通过总线送达至目标LUN对应的物理存储介质。客户端使用IP SAN报文可以通过IP网络操作远端存储设备的物理存储介质。
存储设备可以以集群部署,所以存储设备的前端接口接收到的报文请求的数据可能不是该存储设备中包含的数据,此时,该存储设备需要将该报文请求的数据拉取到该存储设备中,并形成答复报文。
示例性地,该存储设备可以向该报文请求的数据实际存在的另一存储设备发送数据同步请求的同步报文,该另一存储设备将该报文请求的数据发送至该存储设备中,该存储设备将该报文请求的数据封装,形成答复报文。该同步报文可以通过外部网络或内部连接的方式发送或接收。
如图2所示,客户端210或客户端访问存储设备的过程可以包括步骤201至步骤206。
201,客户端210向存储设备集群230发送进行存储服务的报文,其中,该报文首先会经过网络转发设备220。。
应理解,当客户端向存储设备集群230发送进行存储服务的报文,该报文会经过网络转发设备220转发至存储设备集群230中。
该客户端210也可以称为用户,该客户端可以为一个、也可以为多个。
202,网络转发设备220通过存储设备2的前端接口,以访问存储设备中的数据。
203,若客户端的报文请求的数据不在存储设备2中,而是在存储设备1中,则存储设备2向存储设备1发送数据同步的同步报文。
204,存储设备1将该报文请求的数据发送至存储设备2中。
205,存储设备2将该报文请求的数据封装,形成答复报文,并通过前端接口将答复报文发送至网络转发设备220。
206,网络转发设备将答复报文转发至客户端210。
从上述步骤可知,当客户端访问存储服务时,若最终访问的数据不在当前的存储设备中,该存储设备需要从其他存储设备中将该数据进行搬迁,然后进行报文应答,该过程额外占用了存储设备的性能。
为了提升数据访问数据库或存储设备的性能,一种方案是采用数据平面开发套件(data plane development kit,DPDK),一种是采用智能网卡,还有一种方案是采用热数据缓存,下面将结合图2和图3分别介绍上述几种技术方案。
图3是本申请实施例提供的一种优化数据库性能的方案的示意图。
其中,存储设备可以包括用于存储业务的专用设备,或者运行存储服务软件的通用服务器。
参见图3中的(a),该技术方案采用DPDK以提升数据访问的数据处理性能和吞吐量。客户端310向网络交换设备320发送报文,以访问某些数据;网络转发设备320将该报文发送存储设备330。存储设备330通过采用DPDK技术,可以减少上下文切换等机制提升网络性能。但存在网络流量抖动大,流量散列到中央处理器(central processing unit,CPU)核分配不均等问题。
参见图3中的(b),该技术方案利用智能网卡以提升存储设备的性能。客户端310向网络交换设备320发送报文,以访问某些数据;网络转发设备320将该报文发送至存储设备340。该技术方案将智能网卡安装在存储设备340中以替代传统网卡,从而提升存储设备的网络性能,但往往需要安装多个智能网卡,存在成本高,耗电高以及机框大小不兼容等问题。
图4是本申请实施例提供的另一种优化数据访问性能的方案的示意图。
其中,存储设备可以包括用于存储业务的专用设备,或者运行存储服务软件的通用服务器。
参见图4中的(a),该技术方案采用热数据缓存技术提升用户访问存储设备或数据库的速度和效率,进而提升存储设备或数据库的性能。客户端410向存储设备430发送报文,以访问某些数据,其中,该报文首先会经过网络转发设备420;网络转发设备420将该报文发送至服务器430,在服务器430中有一部分区域被部署为热数据缓存区431,该热数据缓存区存储有客户端经常访问的热数据,当客户端410访问的是热数据时,可以直接访问该热数据缓存区431,从而可以提升客户端410访问存储设备或数据库的速度,热数据的实时性高。但是服务器需要部署代理或使用其他技术处理热点数据,热数据的统计、热数据的数显等操作对服务器来说依然属于额外的开销。
参见图4中的(b),在用户客户端410中部署有热数据缓存区411,客户端可以就近访问,速度较快,且没有网络带宽限制。
但是客户端需要提前获知哪些是热数据,该热数据也是服务器通过以太网同步到客户端的,热数据的不一致时间较长,如果热数据变化较快,会导致用户客户端的热数据一直在同步。
图5是本申请实施例提供的中间设备的示意图。
参见图5中的(a),该中间设备200a可以是图1中的网络转发设备,该网络转发设备例如可以是交换机或路由器等黑盒设备,其特点是业务功能已经固定,设备内部的资源空间已经被各种业务占用,例如,该设备内部的资源可以被划分为资源1至资源N,且每个资源都已经被相应的业务所占用。因此,传统的网络转发设备实现新的功能需求流程复杂,比较繁琐。
参见图5中的(b),可编程网络设备200b的业务不固定,可以根据自身需求灵活创建和加载业务,新的业务如业务4可以迅速研发上线,且业务4占用的空间资源可以灵活定义。因此,可编程网络设备可以灵活的实现所需功能。
有鉴于此,本申请提供一种优化数据访问性能的方法和通信网络中的中间设备,该方 法可以提升存储设备或数据库的性能,从而提高了客户端访问存储设备或数据库的效率。
图6是本申请实施例提供的一种优化数据访问性能的方法的示意图。
如图6所示,位于客户端与服务端之间的中间设备,可以是网络设备,如可编程网络设备,该客户端与服务端可以是一个,也可以是多个。
在一种可能的实现方式中,该中间设备520可以接收来自客户端所在的终端发送的第一报文,若该中间设备520确定该第一报文请求的数据存在于该中间设备中,则该中间设备520可以将该第一报文请求的数据发送给该客户端所在的终端。从而无需到远端的服务端(如,数据库或存储设备)中获取该第一报文请求的数据,从而可以提升数据访问的效率。进一步地,减少了服务端的性能消耗。
在另一些可能的实现方式中,若中间设备520未存储有该第一报文请求的数据,则该中间设备可以确定该第一报文请求的数据所在的目标服务端,从而可以以重定向的方式将该报文转发至对应的目标服务端530,从而可以避免该第一报文在服务端之间重定向,进而减少了服务端的冗余流量的开销,提升了服务端的性能。
下文将结合具体实施例详细本申请中的优化数据访问性能的方法,此处暂不详述。
图7是本申请实施例提供的一种优化数据访问性能的方法的示意性流程图。该方法可以应用于通信网络的中间设备中,该中间设备可以为客户端与服务端之间的网络设备,该客户端为一个或多个,该服务端可以为一个或多个,该方法可以包括:步骤401至步骤402。
该客户端可以承载在终端设备中,例如,手机、个人电脑等,该服务端可以包括存储设备或数据库等,示例性地,该中间设备可以是位于终端设备与存储设备之间的可编程网络设备,或者P4交换机、网络处理器(network processor,NP)、路由器、现场可编程门阵列(field-programmable gate array,FPGA)等。
401,中间设备解析接收到的第一报文以得到所述第一报文的特征,所述第一报文来自所述客户端中的一个所在的终端,所述第一报文用于向所述服务端中的一个请求数据,所述特征用于指示所述第一报文所请求的数据,所述特征承载于第一报文对应于应用层数据的部分。
该步骤中,中间设备接收客户端所在的终端发送的第一报文,该第一报文可以是用于请求存储服务的报文,例如,该第一报文可以向存储设备请求数据,也可以是向数据库请求数据,该中间设备可以解析该第一报文,以得到该第一报文的特征。
示例性地,中间设备中的报文解析模块可以根据解析规则提取该第一报文中的特征,该特征可以用于指示该第一报文请求的数据,该特征可以携带在第一报文中对应于应用层数据的部分。因此,该中间设备可以提取该第一报文中的应用层数据的部分,以获取该第一报文的特征。
其中,中间设备、客户端和服务端可以是处于同一个信任区域内,例如,可以是处于同一个可信通信网络中,则该第一报文中的数据可以无需加密,因此,该中间设备可以直接提取该第一报文中的应用层的数据部分。
该解析规则可以是中间设备预先缓存的,或者,该解析规则也可以是服务端通过控制面发送至中间设备的,也可以是中间设备自我学习的。
可选地,该第一报文的特征包括按规则排列的多个字段的值,所述规则指示所述多个 字段在所述第一报文的特征中对应的顺序。
可选地,该多个字段可以包括分散聚合表SGL字段和起始逻辑区块地址start LBA字段。
在一些实施例中,当服务端使用承载于网络的非易失性存储器标准(non-volatile memory express over fabrics,NOF)的情况下,该多个字段为SGL和起始逻辑区块地址,则该第一报文的特征可以是具有顺序的SGL和起始逻辑区块地址,例如,SGL在前,起始逻辑区块地址在后,或者起始逻辑区块地址在前,SGL在后。
在另一些实施例中,该多个字段还可以为SGL和起始逻辑区块地址start LBA字段以及NOF协议中其他可用的字段。
可选地,该第一报文的特征包括的应用层字段为键值字符串。
在一些实施例中,当服务端在使用数据结构服务器序列化通讯协定(redis serialization protocol,RESP)的情况下,该第一报文的特征包括的应用层字段为键值字符串。
可选地,第一报文具体用于向存储设备请求数据,该第一报文具体请求的数据为存储设备的块数据。
示例性地,当第一报文用于向存储设备请求数据时,该第一报文请求的数据可以是存储设备中的块数据,例如,该第一报文中携带有该块数据的地址和块数据的长度。
可选地,第一报文具体用于向数据库请求数据,该第一报文具体请求的数据为数据库中的记录。
示例性地,当第一报文用于向数据库请求数据时,该第一报文请求的数据可以为数据库中的某一条记录。
可选地,该服务端包括一个或者多个,该中间设备保存有第一报文的特征与服务端标识之间的映射关系,该方法还包括:在该中间设备未存有第一报文请求的数据的情况下,该中间设备根据所述第一报文的特征,以及该第一报文的特征与服务端标识之间的映射关系,以重定向的方式,向与该第一报文特征对应的服务端发送第二报文,该第二报文请求的数据与第一报文相同。
该服务端标识可以是地址或身份标识号(identity document,ID)等,该地址可以是网络地址,如IP地址,或者媒体存取控制(media access control address,MAC)地址等等,该ID还可以是采用标签技术时的标签ID。
该服务端标识可以与服务端一一对应,即每个服务端对应一个个服务端标识,该第一报文的特征与该服务端标识之间也可以具有一一对应的关系,即该第一报文中的特征可以对应一个服务端标识,从而可以通过该第一报文中的特征找到对应的服务端。
应理解,该第一报文的特征与服务端标识之间的映射关系可以是预先保存在中间设备中的,或者,该映射关系是服务端通过控制面下发到中间设备的等等。
应理解,该重定向指的是中间设备可以对第一报文的报文头进行修改,得到第二报文,该第二报文可以按照报文头访问对应的服务端,其中,该第二报文请求的数据与第一报文请求的数据是相同的。
示例性地,中间设备可以修改第一报文的五元组信息,以得到修改的第二报文,但该第二报文请求访问的数据与第一报文是相同的。
这样,当中间设备中不存在有第一报文请求的数据时,可以根据第一报文的特征与服 务端标识之间的映射关系,得到对应的服务端节点,从而可以将修改后的第一报文精准地发送至对应的服务端节点,从而减少了第一报文在服务端内部节点之间的重定向,减少了服务端节点之间的冗余流量,从而提升了服务端的性能。
可选地,根据该第一报文的报文头,该第一报文可以访问的服务端节点与第一报文的特征对应的服务端节点一致时,该中间设备直接将该第一报文发送至对应的服务端节点中。
在本申请的一个实施例中,当中间设备中未存有第一报文请求的数据的情况下,且该第一报文能够访问的服务端节点与该第一报文的特征对应的服务端节点相同时,中间设备无需对该第一报文的报文头进行修改,可以直接将该第一报文发送至对应的服务端节点中。
402,在所述中间设备保存有所述第一报文请求的数据的情况下,所述中间设备向所述终端发送所述第一报文请求的数据。
中间设备在步骤401中,已经通过解析该第一报文获取了该第一报文请求的数据是什么,则在该中间设备中保存有该第一报文请求的数据的情况下,该中间设备可以向终端设备发送该第一报文请求的数据。
示例性地,该中间设备中设置有缓存,该缓存中保存有终端设备经常访问的数据,该中间设备在确定第一报文请求的数据属于该部分数据时,该中间设备可以将该第一报文请求的数据进行封装,形成新的答复报文,并将该答复报文发送至终端设备。
具体地,该中间设备可以根据答复规则封装报文,以形成答复报文。该报文答复规则也可以是预先缓存的,或者,该答复规则也可以是服务端通过控制面发送至中间设备的,也可以是中间设备自我学习的等等。
应理解,该中间设备也可以是集成了上述功能的网络转发设备,这种情况下,该网络转发设备可以不具有可编程性,本申请实施例对此不予限定。
这样,中间设备可以对终端设备发送的报文进行解析,得到该报文中对应于应用层的特征,该特征可以指示该报文请求的数据,也就是说,中间设备可以通过解析该第一报文,了解到第一报文指示的要请求的数据的信息,而另一方面,中间设备本身可以存储有一部分数据,这样,中间设备就可以在本端进行查询,当中间设备确定其保存有该报文请求的数据的情况下,该中间设备可以直接将该报文请求的数据发送至终端设备。该技术方案可以避免报文在服务端节点之间重定向,从而可以降低服务端的性能消耗,提升了客户端访问服务端的效率。
可选地,该方法还可以包括:该中间设备接收第三报文,该第三报文用于向服务端中的一个请求数据,该第三报文来自所述客户端中的一个所在的终端;
当该第三报文请求的数据的被请求次数大于阈值时,该中间设备将该第三报文请求的数据存储于中间设备中。
该第三报文和第一报文一样,用于向服务端中的一个请求数据,当该第三报文请求的数据的被请求此时大于阈值时,则中间设备可以将该第三报文请求的数据存储在中间设备中。
示例性地,该阈值为可以由控制面动态配置,对于具体取值本申请实施例不予限定。
应理解,该第三报文可以与第一报文来自同一客户端,或者同一终端,也可以来自不同的终端或客户端,本申请实施例对此不予限定。
可选地,所述中间设备存储的所述第三报文请求的数据,是所述中间设备向存储设备 请求的;或所述中间设备存储的所述第三报文请求的数据,是所述中间设备从存储设备向客户端发送的报文中获取的。
该示例中,当第三报文请求的数据的被请求次数大于阈值时,中间设备可以向存储设备发送请求消息,以请求该第三报文请求的数据,并将该数据存储起来。
或者,当第三报文请求的数据的被请求次数大于阈值时,该中间设备可以拦截存储设备发送给客户端的报文,以获取该第三报文请求的数据,并将该数据存储起来。
其中,存储设备发送给客户端的报文,是响应于客户端的请求报文而发送的,也就是说,该报文是在存储设备接收到客户端的请求报文之后,回应给客户端的回应报文。
该第三报文请求的数据可以存储在中间设备的缓存中。
可选地,所述中间设备将所述第一报文请求的数据保存在缓存中。
在一些实施例中,当该中间设备不存在第一报文请求的数据时,中间设备可以在存储设备或数据库发送给客户端的答复报文中获取该第一报文请求的数据,则该中间设备可以将第一报文请求的数据保存在该中间设备的缓存中。
应理解,下文可以结合图8-图15进一步介绍图7中的各个技术方案。
图8是本申请实施例提供的一种客户端访问存储设备的示意图。
如图8所示,在一种可能的实现方式中,该客户端所在的终端710通过中间设备720访问存储设备的步骤可以包括步骤701至步骤703a。该中间设备可以是客户端与存储设备之间的网络设备,如网络交换机等。
701,中间设备接收客户端所在的终端发送的报文,中间设备中的流量分析模块可以根据该报文中的特征数据确定该报文是否访问热数据。
该中间设备中设置有热数据区,用于缓存热数据,该热数据可以是存储设备预先存储在中间设备中的,也可以是存储设备通过控制面实时发送至中间设备的等。
702a,在确定该报文访问热数据的情况下,将该报文送达至中间设备的热数据区处理。
在另一些实施例中,在确定该报文请求的数据存储于中间设备中时,将该报文送达至数据缓存区。
703a,该热数据区将该报文访问的热数据封装,形成代答报文,并将该代答报文发送至终端。
其中,当中间设备确定终端的报文访问热数据时,可以直接进行热数据封装,形成代答报文,从而不用去远端访问存储设备,从而提升了数据访问的速度和效率,进一步地,减小了存储设备的性能消耗。
在另一种可能的实现方式中,该客户端710通过中间设备720访问存储设备的步骤可以包括步骤701至步骤704b。
701,中间设备接收终端发送的报文,中间设备中的流量分析模块可以根据该报文中的特征数据确定该报文是否访问热数据。
702b,在确定该报文不是访问热数据的情况下,将该报文发送至对应的存储设备1。
在另一些实施例中,当该报文请求的数据不存在中间设备中时,将该报文发送至对应的存储设备1。
703b,存储设备1将该报文请求的数据封装,得到答复报文,并将该答复报文发送至中间设备720。
704b,该中间设备720将该答复报文发送至客户端710。
在本申请的一个实施例中,当中间设备确定客户端的报文未访问热数据时,或该报文访问的数据不存在该中间设备中时,该中间设备可以根据该报文中的特征确定该报文请求的数据所在的存储设备,并将该报文直接发送至对应的存储设备,从而提升了数据访问的效率。在下文中,将结合图12-图13介绍该技术方案,应理解,图12-图13中的技术方案可以在图8的基础上进行,例如,在其他的实施例中,可以将图8的技术方案与图12或图13中的技术方案相结合。
图9是本申请实施例提供的一种优化数据访问性能的示意图。
参见图9,存储设备集群1可以包括存储阵列1、存储阵列2……存储阵列n。
在本申请的一个实施例中,中间设备820接收客户端810发送的第一报文。
具体地,该中间设备820中的报文匹配模块821根据报文匹配规则对该第一报文进行过滤,当确定该第一报文属于访问存储服务的报文时,将该第一报文发送至报文解析模块822;当确定该第一报文不属于访问存储服务的报文时,将该第一报文转发至原始的报文转发模块中。
应理解,本申请实施例中,报文匹配模块821将该第一报文发送至报文解析模块822仅仅是示意性的,在其他的实施例中,该报文匹配模块821也可以将该第一报文发送至其他的报文解析模块中,如报文解析模块825。
该报文匹配规则包括的内容至少可以包括如下内容中的至少一种:源地址;目标地址;源端口;目标端口;应用层协议的字段。
应理解,该报文匹配规则可以是存储设备集群经过控制面通过配置接口发送至中间设备的。例如,该报文匹配规则可以是存储设备集群1经过控制面1通过配置接口824发送至中间设备820中的,也可以是预先缓存在中间设备820中的,该报文匹配规则还可以是存储设备集群2控制面2发送至中间设备820中的,本申请实施例对此不予限定。
该报文解析模块822可以根据解析规则解析该第一报文以得到该第一报文的特征,该第一报文的特征可以包括按规则排列的多个字段的值,该规则可以指示该多个字段在第一报文的特征中对应的顺序。
该多个字段包括分散聚合表SGL字段和起始逻辑区块地址startLBA字段,该规则可以是SGL字段在前,startLBA字段在后;或者,该规则可以是SGL字段在后,startLBA字段在前。
在一些实施例中,当使用承载于网络的非易失性存储器标准NOF的情况下,该多个字段为SGL字段和startLBA字段。
在一些实施例中,当在使用数据结构服务器序列化通讯协定RESP的情况下,该第一报文的特征包括的应用层字段为键值字符串。
该报文解析模块822将解析到的该第一报文的特征发送至流量分析模块823,该流量分析模块823根据该第一报文请求的数据的被统计次数,确定该报文是否请求热数据。在另一些实施例中,若报文解析模块822未成功解析到第一报文的特征,则将该第一报文转发至原始的报文转发模块。
若第一报文请求的数据的被统计次数大于第一预设值,则确定该第一报文请求的数据属于热数据。当确定该第一报文请求的数据属于热数据时,可以将该第一报文转移至热数 据模块829。若第一报文请求的数据的被统计次数小于或等于第一预设值,则确定该第一报文请求的数据不属于热数据,则将该第一报文转发至原始的报文转发模块。
当第一报文请求的数据属于热数据时,该热数据模块829可以根据第一报文中的特征值获取热数据的数据值,并根据报文代答规则将该第一报文请求的数据进行封装,得到代答报文。
该报文代答规则可以包括:报文二三层的地址修改;业务层的状态字段修改;校验字段修正等规则。该报文代答规则可以是存储设备集群1经过控制面1通过配置接口824发送至中间设备820中的,也可以是预先缓存在中间设备820中的。
应理解,该热数据模块中包含的热数据可以是存储设备集群通过控制面发送至中间设备的。例如,该热数据模块829中包含的热数据可以是存储设备集群1通过控制面1发送至中间设备的。
或者,该热数据模块中包含的热数据可以是预先存储在中间设备中的,或者,该热数据模块中包含的热数据还可以是中间设备从存储设备集群1向客户端发送的报文中获取的。
当热数据发生变化时,中间设备可以向存储设备集群1发送热数据同步请求,并接收存储设备集群1回复的带有热数据的报文,并将该报文中的热数据更新至热数据模块中。
该热数据模块829将代答报文发送至客户端810。
这样,位于客户端和存储设备之间的中间设备,可以解析接收到的报文,并判断该报文是否请求热数据,当该报文请求热数据时,该中间设备可以直接将该报文请求的数据发送至客户端。该技术方案无需去远端的存储设备中获取报文请求的数据,中间设备可以直接代答该报文,从而可以提升数据访问的效率,以及可以降低存储设备的性能消耗。
应理解,图8的技术方案可以作为图9中的一部分。在其他的实施例中,也可以将图9的技术方案与图12或图13中的技术方案相结合。图10是本申请实施例提供的一种客户端访问数据库的示意图。
参见图10,每个服务器中可以包括多个数据库容器节点,该多个服务器可以组成一个数据库集群930。该中间设备920可以参见图7中的相关描述。
应理解,步骤901至步骤903a可以参见步骤701至步骤703a的相关描述,为了简洁,不再赘述。
902b,当流量分析模块确定该报文不是请求热数据时,将该报文发送至对应的数据库节点中。
903b,该数据库节点将该报文请求的数据封装,形成答复报文,并将该答复报文发送至中间设备920。
904b,该中间设备920将该答复报文发送至客户端910。
这样,当中间设备确定客户端的报文请求热数据时,可以直接进行热数据封装,形成代答报文,从而不用去远端访问数据库节点,从而提升了数据访问的速度和效率,进一步地,减小了数据库的性能消耗。
进一步地,当中间设备确定客户端的报文未请求热数据时,或该报文请求的数据不存在该中间设备中时,该中间设备可以根据该报文中的特征确定该报文请求的数据所在的数据库节点,并将该报文直接发送至对应的数据库节点,从而提升了数据访问的效率。在下 文中,将结合图14-图15介绍该技术方案,应理解,图14-图15中的技术方案可以在图10的基础上进行,例如,在其他的实施例中,可以将图10的技术方案与图14或图15中的技术方案相结合。
图11是本申请实施例提供的一种优化数据访问性能的示意图。
参见图11,每个数据库集群可以包括图10中的服务器1至服务器n。
应理解,本申请实施例中的针对中间设备820的报文匹配模块、报文解析模块、流量分析模块、热数据模块以及配置接口的相关描述,可以参见图8中的描述,为了简洁,不再赘述。
这样,位于客户端和数据库之间的中间设备,可以解析接收到的报文,并判断该报文是否请求热数据,当该报文请求热数据时,该中间设备可以直接将该报文请求的数据发送至客户端。该技术方案无需去远端的数据库节点中获取报文请求的数据,中间设备可以直接代答该报文,从而可以提升数据访问的效率,以及可以降低数据库的性能消耗。
应理解,图11的技术方案可以包括图10的技术方案。在其他的实施例中,也可以将图11的技术方案与图14或图15中的技术方案相结合。
图12是本申请实施例提供一种客户端访问存储设备的示意图。
如图12所示,该客户端所在的终端访问存储设备的过程可以包括步骤1101至步骤1104。
1101,中间设备1120接收客户端1110发送的第一报文。
其中,该中间设备1120中的路径计算模块1121可以根据第一报文的特征,确定该第一报文请求访问的数据所在的目标存储设备。
在一些实施例中,该路径计算模块1121根据该第一报文的特征,以及该第一报文的特征与存储设备标识之间的映射关系,确定该第一报文请求的数据所在的目标存储设备。
具体地,该路径计算模块1121可以根据路径计算算法对该第一报文的特征进行计算,并根据计算的结果以及该第一报文的特征与存储设备标识之间的映射关系,确定该第一报文请求的数据所在的目标存储设备。例如,该路径计算模块1121根据哈希(hash)算法(如,CRC16、CRC32,或其他的哈希多项式参数)对第一报文的特征进行取模运算,该路径计算模块1121还可以采用其他算法对该第一报文的特征进行计算,本申请实施例对此不予限定。
1102,中间设备1120将该报文转发至目标存储设备。
在一种可能的实现方式中,中间设备以重定向的方式,向该目标存储设备发送第二报文,该第二报文请求的数据与第一报文相同。
应理解,该第二报文可以是中间设备根据目标存储设备的位置对第一报文的报文头的五元组信息进行修改得到的,从而使得中间设备可以将该第二报文转发至目标存储设备。
在另一种可能的实现方式中,若第一报文的报文头的五元组信息本就对应该目标存储设备,则中间设备无需重定向,可以直接将该第一报文转发至目标存储设备。
1103,目标存储设备将该第一报文请求的数据封装,形成答复报文,并将该答复报文发送至中间设备1120。
1104,中间设备1120将该答复报文转发至客户端1110。
应理解,中间设备为存储设备分摊了报文路径定向的功能,从而可以降低存储设备的 性能消耗。进一步地,该方案避免了报文在存储设备之间重定向,从而减少了存储设备内部的冗余流量,增加吞吐量。
图13是本申请实施例提供的一种优化数据访问性能的方法的示意图。
参见图13,存储设备集群1可以包括存储阵列1、存储阵列2……存储阵列n。
在本申请的一个实施例中,中间设备1220接收客户端1210发送的第一报文。
具体地,该中间设备1220中的报文匹配模块1221根据报文匹配规则对该第一报文进行过滤,当确定该第一报文属于访问存储服务的报文时,确定该第一报文对应的存储设备集群1,然后将该第一报文转发至报文解析模块1222;当确定该第一报文不属于访问存储服务的报文时,将该第一报文转发至原始的报文转发模块中。
应理解,在本申请的一个实施例中,报文匹配模块1221根据报文匹配规则对该第一报文进行过滤,当确定该第一报文属于访问存储服务的报文时,确定该第一报文对应的存储设备集群1,然后将该第一报文转发至报文解析模块1222仅仅是示意性的,在其他的实施例中,也可以是中间设备1220中的报文解析模块2报文匹配规则对该第一报文进行过滤,当确定该第一报文属于访问存储服务的报文时,确定该第一报文对应的存储设备集群2,然后将该第一报文转发至报文解析模块2。
该报文匹配规则包括的内容至少可以包括如下内容中的至少一种:源地址;目标地址;源端口;目标端口;应用层协议的字段。
该报文解析模块1222可以根据解析规则解析该第一报文以得到该第一报文的特征,该第一报文的特征可以包括按规则排列的多个字段的值,该规则可以指示该多个字段在第一报文的特征中对应的顺序。
该多个字段包括分散聚合表SGL字段和起始逻辑区块地址start LBA字段,该规则可以是SGL字段在前,start LBA字段在后;或者,该规则可以是SGL字段在后,start LBA字段在前。
应理解,在不同协议下,该第一特征包括的字段是不同的。例如,当使用承载于网络的非易失性存储器标准NOF的情况下,第一报文的特征包括多个字段,该多个字段为SGL字段和start LBA字段。当使用数据结构服务器序列化通讯协定RESP的情况下,该第一报文的特征包括的应用层字段为键值字符串。
该报文解析模块1222将解析到的该第一报文的特征发送至路径计算模块1223,该路径计算模块1222根据该第一报文的特征,以及该第一报文的特征与存储设备标识之间的映射关系,确定该第一报文请求的数据所在的目标存储设备。
具体地,该路径计算模块1123可以根据路径计算算法对该第一报文的特征进行计算,并根据计算的结果以及该第一报文的特征与存储设备标识之间的映射关系,确定该第一报文请求的数据所在的目标存储设备。例如,该路径计算模块1123根据哈希算法(如,CRC16、CRC32,或其他的哈希多项式参数)对第一报文的特征进行取模运算,该路径计算模块1123还可以采用其他算法对该第一报文的特征进行计算,本申请实施例对此不予限定。
该存储设备标识可以是地址或ID,该地址可以是网络地址,如IP地址、MAC地址等,该ID还可以是采用标签技术的标签ID。
在一些实施例中,当确定了该目标存储设备之后,该路径计算模块1223以重定向的方式,向该目标存储设备发送第二报文,该第二报文请求的数据与第一报文请求的数据相 同。其中,该第二报文可以是中间设备根据目标存储设备的位置对第一报文的报文头的五元组信息进行修改得到的,从而使得中间设备可以将该第二报文转发至目标存储设备。
在另一些实施例中,当确定了该目标存储设备之后,若第一报文的报文头的五元组信息本就对应该目标存储设备,则中间设备无需重定向,可以直接将该第一报文转发至目标存储设备。
应理解,该报文匹配规则、报文解析规则、第一报文的特征与存储设备标识之间的映射关系、路径计算算法等,可以是存储设备集群经控制面通过配置接口1224发送至中间设备1220的;或者,上述规则也可以是预先存储在中间设备1220中的。
应理解,中间设备可以根据第一报文的特征与存储设备标识之间的映射关系,得到第一报文对应的目标存储设备,从而可以将修改后的第一报文精准地发送至对应的存储设备,从而减少了第一报文在存储设备之间的重定向,减少了存储设备之间的冗余流量,从而提升了存储设备的性能。
图14是本申请实施例提供的一种客户端访问数据库的示意图。
如图14所示,单台服务器中包括一个或多个DB容器节点,多台服务器构成DB集群。中间设备1320中具有路径计算模块1321,该中间设备520可以是可编程网络转发设备,或者P4交换机、网络处理器、现场可编程门阵列等。该实施例中客户端访问数据库的过程可以包括步骤1301至步骤1304。
1301,中间设备1320接收客户端1310发送的第一报文。
具体地,该中间设备1320中的路径计算模块1321根据第一报文的特征,确定该第一报文请求访问的数据所在的目标数据库节点。
在一些实施例中,该路径计算模块1321根据该第一报文的特征,以及该第一报文的特征与数据库标识之间的映射关系,确定该第一报文请求的数据所在的目标数据库节点。
具体地,该路径计算模块1321可以根据路径计算算法对该第一报文的特征进行计算,并根据计算的结果以及该第一报文的特征与数据库标识之间的映射关系,确定该第一报文请求的数据所在的目标数据库节点。例如,该路径计算模块1321根据哈希算法(如,CRC16、CRC32,或其他的哈希多项式参数)对第一报文的特征进行取模运算,该路径计算模块1321还可以采用其他算法对该第一报文的特征进行计算,本申请实施例对此不予限定。
1302,中间设备1320将该报文转发至目标数据库节点。
在一种可能的实现方式中,中间设备以重定向的方式,向该目标数据库节点发送第二报文,该第二报文请求的数据与第一报文相同。
应理解,该第二报文可以是中间设备根据目标数据库节点的位置对第一报文的报文头的五元组信息进行修改得到的,从而使得中间设备可以将该第二报文转发至目标数据库节点。
在另一种可能的实现方式中,若第一报文的报文头的五元组信息本就对应该目标数据库节点,则中间设备无需重定向,可以直接将该第一报文转发至目标数据库节点。
1303,目标数据库节点将该第一报文请求的数据封装,形成答复报文,并将该答复报文发送至中间设备1320。
1304,中间设备1320将该答复报文转发至客户端1310。
在本申请的一个实施例中,中间设备中具有路径计算模块,可以计算出报文实际访问 的数据所在的目标数据库节点,从而可以直接将该报文转发至目标数据库节点,从而减少了报文在数据库集群内部节点之间重定向的过程,从而提升了数据库的性能。
图15是本申请实施例提供的一种优化数据库性能的方案的示意图。
参见图15,每个数据库集群可以包括图14中的服务器1至服务器n。
应理解,本申请实施例中的针对中间设备1420的报文匹配模块、报文解析模块、路径计算模块以及配置接口的相关描述,可以参见图12中的描述,为了简洁,不再赘述。
这样,位于客户端和数据库之间的中间设备,可以解析接收到的报文,并可以计算出报文实际访问的数据所在的目标数据库节点,从而可以直接将该报文转发或以重定向的方式转发至目标数据库节点,从而避免了报文在数据库集群内部节点之间重定向的过程,从而提升了数据库的性能。
上文结合图1-图15,详细描述了本申请中的优化数据访问性能的方法实施例,下面将结合图16介绍本申请的装置实施例,装置实施例与方法实施例相互对应,因此未详细描述的部分可参见前文中各部分方法实施例中的相关描述。
图16是本申请实施例提供的一种通信网络中的中间设备的示意图框图。
如图16所示,该中间设备1500为客户端与服务端之间的网络设备,所述客户端为一个或多个,所述服务端为一个或多个,该中间设备1500可以包括处理单元1510和收发单元1520。
该处理单元1510,用于解析接收到的第一报文以得到所述第一报文的特征,所述第一报文来自所述客户端中的一个所在的设备,所述第一报文用于向所述服务端中的一个请求数据,所述特征用于指示所述第一报文所请求的数据,所述特征承载于第一报文对应于应用层数据的部分;
该收发单元1520,用于在所述中间设备保存有所述第一报文请求的数据的情况下,向所述终端发送所述第一报文请求的数据。
该处理单元1510可以是上文实施例中的报文匹配模块、报文解析模块、流量分析模块、路径计算模块等等。
该收发单元1520可以是负责上文实施例中收发报文的单元。
可选地,所述第一报文的特征包括按规则排列的多个字段的值,所述规则指示所述多个字段在所述第一报文的特征中对应的顺序。
可选地,所述多个字段包括分散聚合表SGL字段和起始逻辑区块地址start LBA字段。
可选地,所述服务端包括一个或者多个,所述中间设备保存有所述第一报文的特征与服务端标识之间的映射关系,所述收发单元1520还用于:
在所述中间设备未存有所述第一报文请求的数据的情况下,所述中间设备根据所述第一报文的特征,以及所述第一报文的特征与服务端标识之间的映射关系,以重定向的方式,向与所述第一报文特征对应的服务端发送第二报文,所述第二报文请求的数据与所述第一报文相同。
可选地,所述第一报文具体用于向存储设备请求数据,所述第一报文具体请求的数据为存储设备的块数据。
可选地,所述第一报文具体用于向数据库请求数据,所述第一报文具体请求的数据为数据库中的记录。
可选地,所述收发单元1520还用于:接收第三报文,所述第三报文用于向所述服务端中的一个请求数据,所述第三报文来自所述客户端中的一个;
所述处理单元1510还用于,当所述第三报文请求的数据的被请求次数大于阈值时,将所述第三报文请求的数据存储于所述中间设备中。
可选地,所述中间设备存储的所述第三报文请求的数据,是所述中间设备向存储设备请求的;或所述中间设备存储的所述第三报文请求的数据,是所述中间设备从存储设备向客户端发送的报文中获取的。
可选地,所述中间设备将所述第一报文请求的数据保存在缓存中。
可选地,所述第一报文的特征包括的应用层字段为键值字符串。
本申请实施例还提供一种通信网络中的中间设备,包括一个或多个处理器;一个或多个存储器;该一个或多个存储器存储有一个或多个计算机程序,该一个或多个计算机程序包括指令,当该指令被一个或多个处理器执行时,使得如上文实施例中任一项所述的优化数据访问性能的方法被执行。
本申请实施例还提供一种芯片,所述芯片包括处理器和通信接口,所述通信接口用于接收信号,并将所述信号传输至所述处理器,所述处理器处理所述信号,使得如上文实施例中任一项所述的优化数据访问性能的方法被执行。
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机指令,当所述计算机指令在计算机上运行时,使得如上文实施例中任一项所述的优化数据访问性能的方法被执行。
本申请实施例该提供一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的优化数据访问性能的方法。
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的优化数据访问性能的方法。
其中,本实施例提供的电子设备、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显 示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (23)

  1. 一种优化数据访问性能的方法,其特征在于,所述方法应用于通信网络的中间设备,所述中间设备为客户端与服务端之间的网络设备,所述客户端为一个或多个,所述服务端为一个或多个,所述方法包括:
    所述中间设备解析接收到的第一报文以得到所述第一报文的特征,所述第一报文来自所述客户端中的一个所在的终端,所述第一报文用于向所述服务端中的一个请求数据,所述特征用于指示所述第一报文所请求的数据,所述特征承载于第一报文对应于应用层数据的部分;
    在所述中间设备保存有所述第一报文请求的数据的情况下,所述中间设备向所述终端发送所述第一报文请求的数据。
  2. 根据权利要求1所述的方法,其特征在于,所述第一报文的特征包括按规则排列的多个字段的值,所述规则指示所述多个字段在所述第一报文的特征中对应的顺序。
  3. 根据权利要求2所述的方法,其特征在于,所述多个字段包括分散聚合表SGL字段和起始逻辑区块地址start LBA字段。
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述服务端包括一个或者多个,所述中间设备保存有所述第一报文的特征与服务端标识之间的映射关系,所述方法还包括:
    在所述中间设备未存有所述第一报文请求的数据的情况下,所述中间设备根据所述第一报文的特征,以及所述第一报文的特征与服务端标识之间的映射关系,以重定向的方式,向与所述第一报文的特征对应的服务端发送第二报文,所述第二报文请求的数据与所述第一报文相同。
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,所述第一报文具体用于向存储设备请求数据,所述第一报文具体请求的数据为存储设备的块数据。
  6. 根据权利要求1-4中任一项所述的方法,其特征在于,所述第一报文具体用于向数据库请求数据,所述第一报文具体请求的数据为数据库中的记录。
  7. 根据权利要求1-4中任一项所述的方法,其特征在于,所述方法还包括:
    所述中间设备接收第三报文,所述第三报文用于向所述服务端中的一个请求数据,所述第三报文来自所述客户端中的一个所在的终端;
    当所述第三报文请求的数据的被请求次数大于阈值时,所述中间设备将所述第三报文请求的数据存储于所述中间设备中。
  8. 根据权利要求7所述的方法,其特征在于,所述中间设备存储的所述第三报文请求的数据,是所述中间设备向存储设备请求的;或
    所述中间设备存储的所述第三报文请求的数据,是所述中间设备从存储设备向客户端发送的报文中获取的。
  9. 根据权利要求1-8中任一项所述的方法,其特征在于,所述中间设备将所述第一报文请求的数据保存在缓存中。
  10. 根据权利要求1所述的方法,其特征在于,所述第一报文的特征包括的应用层字 段为键值字符串。
  11. 一种通信网络中的中间设备,其特征在于,所述中间设备为客户端与服务端之间的网络设备,所述客户端为一个或多个,所述服务端为一个或多个,包括:
    处理单元,用于解析接收到的第一报文以得到所述第一报文的特征,所述第一报文来自所述客户端中的一个所在的设备,所述第一报文用于向所述服务端中的一个请求数据,所述特征用于指示所述第一报文所请求的数据,所述特征承载于第一报文对应于应用层数据的部分;
    收发单元,用于在所述中间设备保存有所述第一报文请求的数据的情况下,向所述终端发送所述第一报文请求的数据。
  12. 根据权利要求11所述的设备,其特征在于,所述第一报文的特征包括按规则排列的多个字段的值,所述规则指示所述多个字段在所述第一报文的特征中对应的顺序。
  13. 根据权利要求12所述的设备,其特征在于,所述多个字段包括分散聚合表SGL字段和起始逻辑区块地址start LBA字段。
  14. 根据权利要求11-13中任一项所述的设备,其特征在于,所述服务端包括一个或者多个,所述中间设备保存有所述第一报文的特征与服务端标识之间的映射关系,所述收发单元还用于:
    在所述中间设备未存有所述第一报文请求的数据的情况下,所述中间设备根据所述第一报文的特征,以及所述第一报文的特征与服务端标识之间的映射关系,以重定向的方式,向与所述第一报文特征对应的服务端发送第二报文,所述第二报文请求的数据与所述第一报文相同。
  15. 根据权利要求11-14中任一项所述的设备,其特征在于,所述第一报文具体用于向存储设备请求数据,所述第一报文具体请求的数据为存储设备的块数据。
  16. 根据权利要求11-14中任一项所述的设备,其特征在于,所述第一报文具体用于向数据库请求数据,所述第一报文具体请求的数据为数据库中的记录。
  17. 根据权利要求11-14中任一项所述的设备,其特征在于,所述收发单元还用于:
    接收第三报文,所述第三报文用于向所述服务端中的一个请求数据,所述第三报文来自所述客户端中的一个所在的终端;
    所述处理单元还用于,当所述第三报文请求的数据的被请求次数大于阈值时,将所述第三报文请求的数据存储于所述中间设备中。
  18. 根据权利要求17所述的设备,其特征在于,所述中间设备存储的所述第三报文请求的数据,是所述中间设备向存储设备请求的;或
    所述中间设备存储的所述第三报文请求的数据,是所述中间设备从存储设备向客户端发送的报文中获取的。
  19. 根据权利要求11-18中任一项所述的设备,其特征在于,所述中间设备将所述第一报文请求的数据保存在缓存中。
  20. 根据权利要求11-19中任一项所述的设备,其特征在于,所述第一报文的特征包括的应用层字段为键值字符串。
  21. 一种通信网络中的中间设备,其特征在于,包括一个或多个处理器;一个或多个存储器;所述一个或多个存储器存储有一个或多个计算机程序,所述一个或多个计算机程 序包括指令,当所述指令被一个或多个处理器执行时,使得如权利要求1-10中任一项所述的优化数据访问性能的方法被执行。
  22. 一种芯片,其特征在于,所述芯片包括处理器和通信接口,所述通信接口用于接收信号,并将所述信号传输至所述处理器,所述处理器处理所述信号,使得如权利要求1-10中任一项所述的优化数据访问性能的方法被执行。
  23. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机指令,当所述计算机指令在计算机上运行时,使得如权利要求1-10中任一项所述的优化数据访问性能的方法被执行。
PCT/CN2022/104446 2021-07-15 2022-07-07 优化数据访问性能的方法和中间设备 WO2023284626A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP22841262.3A EP4361837A1 (en) 2021-07-15 2022-07-07 Method for optimizing data access performance, and intermediate device
US18/411,645 US20240155029A1 (en) 2021-07-15 2024-01-12 Method for optimizing data access performance and intermediate device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110799865.9 2021-07-15
CN202110799865.9A CN115617862A (zh) 2021-07-15 2021-07-15 优化数据访问性能的方法和中间设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/411,645 Continuation US20240155029A1 (en) 2021-07-15 2024-01-12 Method for optimizing data access performance and intermediate device

Publications (1)

Publication Number Publication Date
WO2023284626A1 true WO2023284626A1 (zh) 2023-01-19

Family

ID=84856119

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/104446 WO2023284626A1 (zh) 2021-07-15 2022-07-07 优化数据访问性能的方法和中间设备

Country Status (4)

Country Link
US (1) US20240155029A1 (zh)
EP (1) EP4361837A1 (zh)
CN (1) CN115617862A (zh)
WO (1) WO2023284626A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103891237A (zh) * 2012-09-29 2014-06-25 华为技术有限公司 一种网络存储的方法、交换设备和控制器
CN105812137A (zh) * 2014-12-29 2016-07-27 中兴通讯股份有限公司 签名方法和装置
CN110011973A (zh) * 2019-03-06 2019-07-12 浙江国利网安科技有限公司 工业控制网络访问规则构建方法及训练系统
CN110474922A (zh) * 2019-09-02 2019-11-19 锐捷网络股份有限公司 一种通信方法、pc系统及接入控制路由器
US20210168049A1 (en) * 2018-09-12 2021-06-03 Wangsu Science & Technology Co., Ltd. Quality of service monitoring method, device, and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103891237A (zh) * 2012-09-29 2014-06-25 华为技术有限公司 一种网络存储的方法、交换设备和控制器
CN105812137A (zh) * 2014-12-29 2016-07-27 中兴通讯股份有限公司 签名方法和装置
US20210168049A1 (en) * 2018-09-12 2021-06-03 Wangsu Science & Technology Co., Ltd. Quality of service monitoring method, device, and system
CN110011973A (zh) * 2019-03-06 2019-07-12 浙江国利网安科技有限公司 工业控制网络访问规则构建方法及训练系统
CN110474922A (zh) * 2019-09-02 2019-11-19 锐捷网络股份有限公司 一种通信方法、pc系统及接入控制路由器

Also Published As

Publication number Publication date
EP4361837A1 (en) 2024-05-01
CN115617862A (zh) 2023-01-17
US20240155029A1 (en) 2024-05-09

Similar Documents

Publication Publication Date Title
US11487690B2 (en) Universal host and non-volatile memory express storage domain discovery for non-volatile memory express over fabrics
US11489919B2 (en) Method, apparatus, and data processing system including controller to manage storage nodes and host operations
US11275530B2 (en) Method, system, and related device for NAS data access
WO2021135471A1 (zh) 数据传输方法、装置、网卡及存储介质
US7953881B1 (en) Network characteristic-based compression of network traffic
CN113326228B (zh) 基于远程直接数据存储的报文转发方法、装置及设备
AU2019391798B2 (en) Detecting attacks using handshake requests systems and methods
CA2867585A1 (en) Methods, devices and systems for coordinating network-based communication in distributed server systems with sdn switching
AU2018330053B2 (en) RDP proxy support in presence of RDP server farm with session directory or broker
US9264495B2 (en) Apparatus and methods for handling network file operations over a fibre channel network
US20220244861A1 (en) Data Access Method and Apparatus, and First Computing Device
WO2023005747A1 (zh) 数据传输方法、装置及分布式存储系统
US11102171B2 (en) Virtual distributed domain name server
US11343185B2 (en) Network traffic steering with programmatically generated proxy auto-configuration files
EP3973668A1 (en) Network traffic steering with programmatically generated proxy auto-configuration files
JP2017500679A (ja) メディアリソースフィードバック方法、装置、プログラム及び記録媒体
WO2023284626A1 (zh) 优化数据访问性能的方法和中间设备
WO2023125380A1 (zh) 一种数据管理的方法及相应装置
CN109413142B (zh) 一种Linux下的iSCSI虚拟代理实现方法
US10791088B1 (en) Methods for disaggregating subscribers via DHCP address translation and devices thereof
US11647083B2 (en) Cluster-aware multipath transmission control protocol (MPTCP) session load balancing
US11588924B2 (en) Storage interface command packets over fibre channel with transport and network headers as payloads
Shimano et al. An information propagation scheme for an autonomous distributed storage system in iSCSI environment
CN116566933A (zh) 报文处理方法、网关设备及存储系统
CN116567082A (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: 22841262

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2022841262

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2022841262

Country of ref document: EP

Effective date: 20240125

NENP Non-entry into the national phase

Ref country code: DE