CN116938946A - Method for responding to acquisition request, electronic device, electronic equipment and medium - Google Patents

Method for responding to acquisition request, electronic device, electronic equipment and medium Download PDF

Info

Publication number
CN116938946A
CN116938946A CN202210367230.6A CN202210367230A CN116938946A CN 116938946 A CN116938946 A CN 116938946A CN 202210367230 A CN202210367230 A CN 202210367230A CN 116938946 A CN116938946 A CN 116938946A
Authority
CN
China
Prior art keywords
edge device
acquisition request
client
edge
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210367230.6A
Other languages
Chinese (zh)
Inventor
杨金玉
王少阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guizhou Baishancloud Technology Co Ltd
Original Assignee
Guizhou Baishancloud Technology Co Ltd
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 Guizhou Baishancloud Technology Co Ltd filed Critical Guizhou Baishancloud Technology Co Ltd
Priority to CN202210367230.6A priority Critical patent/CN116938946A/en
Publication of CN116938946A publication Critical patent/CN116938946A/en
Pending legal-status Critical Current

Links

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/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1012Server selection for load balancing based on compliance of requirements or conditions with available server resources
    • 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/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a method for responding to an acquisition request, an electronic device, electronic equipment and a medium. In the application, first edge equipment receives a first acquisition request sent by a client; transmitting a response message containing the effective identifier and the address of the second edge device to the client; the effective identifier is used for indicating that when the client sends a second acquisition request to the second edge device, the client directly sends the second acquisition request to the second edge device in a subsequent preset time and/or a preset number of times, wherein the second edge device is an edge device capable of processing the second acquisition request, and a target domain name requested by the second acquisition request is the same as a target domain name requested by the first acquisition request.

Description

Method for responding to acquisition request, electronic device, electronic equipment and medium
Technical Field
The present application relates to data processing technologies, and in particular, to a method, an electronic device, an electronic apparatus, and a medium for responding to an acquisition request.
Background
In a CDN system, in order to improve the file hit rate, the scheduling device may query and provide an edge device capable of processing or buffering a target resource, so as to ensure that a client may access and acquire a resource that the client wants to acquire by using the edge device, and if the client accesses an edge device that does not buffer the target resource, a 302 scheduling manner is often adopted to implement accurate scheduling.
However, the scheme in the related art has a problem in that: in either the scheduling request or the 302 scheduling mode, the HTTP interaction process is more than one time, which can increase the overall time consumption of each resource access process, reduce the service quality, for example, in the on-demand application, the 301/302 jump may negatively affect a plurality of indexes such as the first screen time, the click-through rate, and the like, thereby reducing the access experience of the user.
Disclosure of Invention
The embodiment of the application provides a method, an electronic device, electronic equipment and a medium for responding to an acquisition request, and the technical scheme of the application can solve the problems that the whole time consumption of each resource access process is increased, the service quality is reduced and the access experience of a user is further reduced in the process of determining an access address or acquiring a content resource in the related technology.
According to an aspect of an embodiment of the present application, a method for responding to an acquisition request is provided, which is applied to a first edge device, and includes:
receiving a first acquisition request sent by a client;
transmitting a response message containing the effective identifier and the address of the second edge device to the client;
the effective identifier is used for indicating that when the client sends a second acquisition request to a second edge device, the client directly sends the second acquisition request to the second edge device in a subsequent preset time and/or a preset number of times, wherein the second edge device is an edge device capable of processing the second acquisition request.
Optionally, in another embodiment of the above method according to the present application, the sending, to the client, a response message including a valid identifier and a second edge device address includes:
acquiring service parameters for representing the service load state of the second edge equipment;
taking the service parameter as the effective identifier; or alternatively, the first and second heat exchangers may be,
and calculating and generating the effective identification based on the service parameters.
Optionally, in another embodiment of the above method according to the present application, after the receiving the acquisition request sent by the client, the method further includes:
and determining whether the acquisition request contains an indication identifier or not, wherein the indication identifier is used for indicating the first edge equipment to acquire the valid identifier.
Optionally, in another embodiment of the above method according to the present application, before the sending, to the client, a response message including a valid identifier and a second edge device address, the method further includes:
if the number of the edge devices which can process the second acquisition request is determined to be a plurality of;
selecting one of the edge devices as the second edge device; or alternatively, the first and second heat exchangers may be,
and selecting a plurality of edge devices as the second edge device, determining high-priority edge devices according to the operation parameters of the second edge device, and marking priority identifiers for indicating the client to send acquisition requests to the high-priority edge devices preferentially.
Optionally, in another embodiment of the above method according to the present application, the second edge device is an edge device that caches the first resource data.
Optionally, in another embodiment of the above method according to the present application, the effective identifier includes all or part of information of a response header of the response message; or alternatively, the first and second heat exchangers may be,
the valid identification is contained in a response body of the response message.
According to one aspect of the embodiment of the present application, a method for responding to an acquisition request is provided, which is applied to a client, and includes:
sending a first acquisition request to a first edge device;
receiving a response message which is sent by the first edge device and contains an effective identifier and a second edge device address, wherein the effective identifier is used for indicating that when the client sends a second acquisition request to the second edge device, the client sends the acquisition request to the second edge device in the subsequent preset time and/or in preset times;
and sending a second acquisition request to the second edge device within the preset time and/or within preset times represented by the effective identifier, wherein the second edge device is an edge device capable of processing the second acquisition request, and the domain name corresponding to the resource requested by the second acquisition request is the same as the domain name corresponding to the resource requested by the first acquisition request.
Optionally, in another embodiment of the above method according to the present application, the receiving the response message sent by the first edge device includes:
acquiring an effective identifier in the response message;
determining the preset time and/or preset times corresponding to the effective identifier; or alternatively, the first and second heat exchangers may be,
and if the service parameters of the service load state of the second edge equipment corresponding to the effective identification are determined, calculating and generating the preset time and/or the preset times based on the service parameters.
Optionally, in another embodiment of the above method according to the present application, the sending a second acquisition request to the second edge device includes:
and adding an indication identifier for indicating the first edge equipment to acquire the effective identifier in the first acquisition request.
Optionally, in another embodiment of the above method according to the present application, the sending the acquisition request to the second edge device includes:
if the number of the second edge devices is determined to be multiple, sending the second acquisition request to one of the second edge devices based on a preset selection strategy;
And if the response is abnormal, sending the second acquisition request to another second edge device.
According to still another aspect of the embodiment of the present application, an electronic apparatus for responding to an acquisition request is provided, which is applied to a first edge device, and includes:
the first acquisition module is configured to receive a first acquisition request sent by the client;
a first sending module configured to send a response message including a valid identifier and a second edge device address to the client;
the effective identifier is used for indicating that when the client sends a second acquisition request to a second edge device, the client directly sends the second acquisition request to the second edge device in a subsequent preset time and/or a preset number of times, wherein the second edge device is an edge device capable of processing the second acquisition request, and a target domain name requested by the second acquisition request is the same as a target domain name requested by the first acquisition request.
According to still another aspect of the embodiment of the present application, an electronic device for responding to an acquisition request is provided, which is applied to a client, and includes:
a second acquisition module configured to send a first acquisition request to a first edge device, the first acquisition request being used to acquire first resource data corresponding to a target domain name;
The receiving module is configured to receive a response message which is sent by the first edge device and contains an effective identifier and a second edge device address, wherein the effective identifier is used for indicating that when the client sends a second acquisition request to the second edge device, the client sends the acquisition request to the second edge device in the subsequent preset time and/or in preset times;
and the second sending module is configured to send a second acquisition request to the second edge device within the preset time and/or within the preset times represented by the effective identifier, wherein the second edge device is an edge device capable of processing the second acquisition request, and the domain name corresponding to the resource requested by the second acquisition request is the same as the domain name corresponding to the resource requested by the first acquisition request.
According to still another aspect of an embodiment of the present application, there is provided an electronic apparatus including:
a memory for storing executable instructions; and
a processor for processing with the memory to execute the executable instructions to perform any of the operations described above for the method of responding to a fetch request.
According to still another aspect of an embodiment of the present application, there is provided a computer-readable storage medium storing computer-readable instructions that, when executed, perform the operations of any of the above-described methods of responding to a fetch request.
In the application, first edge equipment receives a first acquisition request sent by a client; transmitting a response message containing the effective identifier and the address of the second edge device to the client; the effective identifier is used for indicating that when the client sends a second acquisition request to the second edge device, the client directly sends the second acquisition request to the second edge device in a subsequent preset time and/or a preset number of times, wherein the second edge device is an edge device capable of processing the second acquisition request, and a target domain name requested by the second acquisition request is the same as a target domain name requested by the first acquisition request. By applying the technical scheme of the application, the edge device can carry an effective identifier for indicating that the edge device can directly send the acquisition request to the target edge device within preset time or preset times when the edge device accesses the same acquisition request subsequently in response messages sent to the client. Therefore, the client side can not generate delay consumption caused by the fact that the client side can initiate the access request to the target edge equipment after one time of scheduling when the request is initiated by the resource content as in the prior art.
The technical scheme of the application is further described in detail through the drawings and the embodiments.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description, serve to explain the principles of the application.
The application may be more clearly understood from the following detailed description taken in conjunction with the accompanying drawings, in which:
fig. 1 is a schematic diagram of a method for a first edge device in a response acquisition request according to the present application;
FIG. 2 is a schematic diagram of a method for a client in a response acquisition request according to the present application;
FIG. 3 is a flow chart of a method for responding to an acquisition request according to the present application;
fig. 4-5 are schematic diagrams of an electronic device responding to an acquisition request according to the present application;
fig. 6 is a schematic diagram of an electronic device responding to an acquisition request according to the present application.
Detailed Description
Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present application unless it is specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective parts shown in the drawings are not drawn in actual scale for convenience of description.
The following description of at least one exemplary embodiment is merely exemplary in nature and is in no way intended to limit the application, its application, or uses.
Techniques, methods, and apparatus known to one of ordinary skill in the relevant art may not be discussed in detail, but are intended to be part of the specification where appropriate.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further discussion thereof is necessary in subsequent figures.
In addition, the technical solutions of the embodiments of the present application may be combined with each other, but it is necessary to be based on the fact that those skilled in the art can implement the technical solutions, and when the technical solutions are contradictory or cannot be implemented, the combination of the technical solutions should be considered as not existing, and not falling within the scope of protection claimed by the present application.
It is noted that other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the application is not limited to the precise construction herein after described and illustrated in the accompanying drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.
A method for making a response acquisition request according to an exemplary embodiment of the present application is described below with reference to fig. 1-3. It should be noted that the following application scenarios are only shown for facilitating understanding of the spirit and principles of the present application, and embodiments of the present application are not limited in this respect. Rather, embodiments of the application may be applied to any scenario where applicable.
In one embodiment, the application further provides a method for responding to the acquisition request. Fig. 1 schematically shows a flow diagram of a method of responding to a fetch request according to an embodiment of the application. As shown in fig. 1, the method is applied to a first edge device, and includes:
s101, receiving a first acquisition request sent by a client.
In the related art, in order to improve the file hit rate in the CDN system, the scheduling device may query and provide an edge device capable of processing or buffering the target resource, so as to ensure that the client may access and acquire the resource that the client wants to acquire from the edge device, and if the client accesses an edge device that does not buffer the target resource, a 302 scheduling manner is often adopted to implement accurate scheduling.
For example, when a client accesses an edge device that is not capable of handling an acquisition request (e.g., is in a high load state), the edge device may redirect the access request to another target edge device that is capable of handling the acquisition request (the target edge device may be the edge device that stores the resource content requested by the client itself or may be the edge device that is currently under a lower load and may process the access request). Thereby ensuring that the client can acquire the resources that the client wants to acquire by sending an access request to the target edge device.
However, under the scheme in the related art, each time the client initiates a request for the resource content, it needs to schedule once, and then initiate an access request to the target edge device (i.e., the client needs to access an edge device nearby even if receiving the redirected edge server address, and the edge device returns the address of the target edge device, and then can initiate an access request to the target edge device). It will be appreciated that such a manner may cause an additional data interaction between the client and the edge device, which may further cause problems of response delay and consumption of device resources.
In one manner, the acquisition request (i.e., the first acquisition request and the second acquisition request) sent by the client may be a resource acquisition request for acquiring resource data corresponding to the target domain name, or may be an address acquisition request for acquiring an edge device address capable of processing the acquisition request (e.g., the edge device stores the resource data of the target domain name, or may obtain the resource data from an upper server).
S102, sending a response message containing an effective identifier and a second edge device address to the client; the effective identifier is used for indicating that when the client sends a second acquisition request to the second edge device, the client directly sends the second acquisition request to the second edge device in a subsequent preset time and/or a preset number of times, wherein the second edge device is an edge device capable of processing the second acquisition request, and a target domain name requested by the second acquisition request is the same as a target domain name requested by the first acquisition request.
In view of the above problem, in the embodiment of the present application, after the first edge device receives the first acquisition request sent by the client, not only a response message carrying the address of the second edge device is returned to the first edge device, but also an effective identifier for indicating that the client subsequently sends the acquisition request directly to the second edge device under the condition that a certain time (i.e. within a preset time) and a certain number of times (i.e. within a preset time) are met is carried in the response message.
For example, the first obtaining request is taken as a resource obtaining request (i.e. is used for obtaining the resource data corresponding to the target domain name), after receiving the valid identifier, the client terminal can initiate an access request to the target edge device after obtaining 302 a redirection response without sending the resource obtaining request to the first edge device as in the prior art when subsequently requesting all the resources under the domain name to which the resource belongs. When accessing the resource under the same domain name, the resource acquisition request can be directly sent to the second edge device when the condition is met (within the preset time and/or within the preset times), so that the defect that delay consumption is generated because the client always needs to access one edge device nearby and return 302 the address of the target edge device for redirecting the response to the target edge device before the client can initiate the access request to the target edge device is avoided. Thereby saving the waiting time for acquiring the resource data.
Specifically, for example, the preset time corresponding to the valid identifier is 10 minutes, and the preset number of times is 5. After receiving the response message including the address of the second edge device and the valid identifier of the request for the target domain name, the client may send the second acquisition request directly to the second edge device within 10 minutes after the time point (e.g. 8:00) when the client subsequently needs to acquire other resources for the target domain name, that is, before 10 minutes at 8 points when the response message is received. Or, when the client needs to acquire the resource data under the same domain name within the subsequent preset times (for example, 5 times), the client can also directly send an acquisition request to the second edge device; in order to distinguish the first request for accessing the resource under the domain name and the subsequent request for accessing the resource under the domain name again, the first request for obtaining is used for representing the first request for accessing the first resource under the domain name, and the second request for obtaining is used for representing the subsequent request for accessing the same resource or different resources under the domain name within the preset time or the preset times.
For another example, the first fetch request is described as an address fetch request (i.e., an edge device address for fetching an edge device capable of handling the fetch request). In one manner, the address acquisition request may be an API request, or may be another request for acquiring an address of an edge device, where the first edge device is an edge scheduling device capable of processing the API request. At this time, the first edge server sends a response message including the valid identifier and the address of the second edge device to the client, so that the client sends a second acquisition request to the second edge device, where the second acquisition request may be a resource acquisition request, and is used to acquire resource data corresponding to the target domain name requested by the client.
It should be noted that, when the valid identifier corresponds to the instruction that the client directly sends the second acquisition request to the second edge device within the subsequent preset time and within the preset times, the client needs to consider the two sending conditions at the same time. That is, when any one of the conditions (within the preset time and the preset times) is not satisfied, the acquisition request cannot be directly sent to the second edge device.
In one mode, the effective mark in the application can be directly carried in the preset time and/or preset times. It can be understood that in this case, the first edge device calculates a preset time according to the service parameter (the service parameter is a parameter for representing the service load state of the second edge device), and/or adds the value of the preset number of times to the effective identifier.
In another manner, the valid identifier may also carry a service parameter for characterizing a service load status of the second edge device. The condition is to instruct the client to calculate the preset time and/or the preset times based on the service parameter after receiving the service parameter.
Alternatively, in the two modes, the first edge device may be determined according to the current own traffic load state. For example, when the current traffic load state of the first edge device corresponds to idle, the preset time is calculated by the first edge device, and/or after the preset number of times of value is added to the effective identifier. And when the current traffic load state of the first edge device corresponds to busy, the client calculates a preset time and/or a value of a preset number of times.
In one mode, the preset time value and the preset secondary value are not specifically limited, for example, the preset time value may be 5 minutes or 1 hour. The preset number of times may be 5 times, 1 time, etc.
It may be appreciated that, in the embodiment of the present application, the preset time is set by effectively identifying the representative value, and/or the preset secondary value is aimed at indicating that the client may directly send the second acquisition request to the second edge device at a later time under a certain condition. Therefore, when the client initiates the acquisition request aiming at the resource of the same domain name, the client does not need to go through address inquiry or jump, the whole time consumption of the resource access process is reduced, meanwhile, the effective condition of directly accessing the second edge equipment is limited, and the defect that the second edge equipment is in a high-load state after long-term processing of the acquisition request of the client can be further avoided.
In one embodiment, the number of the second edge devices is not specifically limited, and may be one or more.
In one manner, the first fetch request in the present application may be a client request for fetching resource data corresponding to a target domain name (or for fetching an edge server address capable of handling the fetch request).
It will be appreciated that when the first acquisition request is for acquiring first resource data corresponding to the target domain name, the second acquisition request may be a client request for acquiring second resource data corresponding to the target domain name. The second resource may be the same as the first resource, or may be another resource different from the first resource. In this case, the second edge device may be an edge device that stores the first resource data requested by the client itself, or may be an edge device that does not store the first resource data itself, but has a low current load, and may process the acquisition request. When the second edge device is an edge device which does not store the resource data requested by the client, the second edge device can acquire the resource data requested by the client to the upper server.
The upper server in the present application may be any one of other edge servers, parent servers, central servers and source servers.
It should be noted that, the first edge device and the second edge device in the present application are devices capable of providing Web services, including, but not limited to, edge node devices of a CDN network, home node devices, edge servers of an edge cloud network, edge gateways, edge controllers, edge routers, or network set-top boxes, which are not limited herein, and any other types of edge devices that are present in the present application or in the future are included in the scope of the present application if applicable.
In the application, first edge equipment receives a first acquisition request sent by a client; transmitting a response message containing the effective identifier and the address of the second edge device to the client; the effective identifier is used for indicating that when the client sends a second acquisition request to the second edge device, the client directly sends the second acquisition request to the second edge device in a subsequent preset time and/or a preset number of times, wherein the second edge device is an edge device capable of processing the second acquisition request, and a target domain name requested by the second acquisition request is the same as a target domain name requested by the first acquisition request. By applying the technical scheme of the application, the edge device can carry a valid identifier for indicating that the edge device directly sends the acquisition request to the target edge device within the preset time or the preset times when the edge device accesses the resource of the same domain name. Therefore, the client side can not generate delay consumption caused by the fact that the client side can initiate the access request to the target edge equipment after one time of scheduling when the request is initiated by the resource content as in the prior art.
Alternatively, in another embodiment of the above method according to the present application, in S102 (sending a response message to the client containing the valid identification and the second edge device address), the following steps may be implemented:
acquiring service parameters for representing the service load state of the second edge equipment;
taking the service parameter as an effective identifier; or alternatively, the first and second heat exchangers may be,
based on the service parameters, the effective identification is calculated and generated.
In one manner, in the process of generating the effective identifier by the first edge device, the service parameter for representing the service load state of the second edge device may be acquired through interaction with the second edge device, and the service parameter is used as the effective identifier. Or calculating and generating an effective mark containing the preset time and/or preset secondary value based on the service parameters.
In one manner, the embodiment of the present application may send, by the first edge device, a probe message to the second edge device, where the probe message is used to obtain a service parameter of a current processing traffic volume, a remaining processing traffic volume, a service processing type, and the like of the second edge device, where the service parameter is used to characterize a service load state of the second edge device. And after the detection reply information carrying the service parameter and sent by the second edge equipment is subsequently received, selecting whether the service parameter is directly used as an effective identifier or the effective identifier containing the preset time and/or a preset secondary value is generated based on service parameter calculation based on a preset strategy.
In one manner, the preset policy may be determined by the first edge device according to a current traffic load state of the first edge device. For example, when the current traffic load state of the first edge device corresponds to idle, the preset time can be calculated by the first edge device, and/or after the preset number of times of values, the preset time can be added into the effective identifier. And when the current business load state of the first edge equipment corresponds to busy, the client can be handed to calculate the preset time and/or the value of the preset times.
It may be appreciated that, for example, the first edge device calculates the preset time by itself, and/or the preset number of times is taken as an example, the first edge device may determine whether the second edge device corresponds to the high load state according to the current processing traffic, the remaining processing traffic, the service processing type, and other parameters of the second edge device that are characterized by the service parameter, and if so, a preset time with a relatively small value may be generated, and/or a preset secondary value may be generated. If not, a preset time with a relatively large value and/or a preset secondary value may be generated.
Furthermore, according to the technical scheme of the application, the condition that the acquisition request is directly sent to the second edge equipment can be indicated for the client according to the service load state of the second edge equipment, so that the defect that the second edge equipment is in a high load state caused by long-term processing of the acquisition request of the client is avoided.
Alternatively, in another embodiment of the above method according to the present application, after S101 (receiving the acquisition request sent by the client), the following steps may be implemented:
and determining whether the acquisition request contains an indication identifier or not, wherein the indication identifier is used for indicating the first edge equipment to acquire a valid identifier.
In one manner, in the first acquisition request sent by the client to the first edge device, an indication identifier may be added by the client, where the indication identifier is used to instruct the first edge device to acquire a valid identifier and send the valid identifier to the client.
It can be understood that after the first edge device finds the indication identifier from the acquisition request, a subsequent operation of acquiring a service parameter for representing a service load state of the second edge device is started, and based on a preset calculation policy, the operation of directly taking the service parameter as an effective identifier or generating an effective identifier containing a value within the preset time and/or a preset time based on service parameter calculation is selected.
It can be appreciated that the above embodiment of the present application may be selected by the client according to its own load or service processing situation, whether to add the indication identifier to the acquisition request. In one approach, if the client is currently loaded higher or traffic handling is greater. In order to avoid the problem of further increasing the load of the acquisition request when the acquisition request is sent subsequently, the client adds the indication identifier in the first acquisition request, so that the purpose of quickly acquiring the corresponding data is achieved. Conversely, if the client is currently idle, it may not add the indication identifier to the first acquisition request.
In another manner, whether the client performs the operation of adding the indication identifier to the first acquisition request may also be determined by the client according to the traffic load state of the first edge device. The operation of adding the indication identifier in the first acquisition request may be performed, for example, when the client determines that the traffic load status of the first edge device corresponds to idle. And if the client determines that the traffic load state of the first edge device corresponds to busy, in order to avoid the problem that the first edge device repeatedly performs HTTP data interaction with the client multiple times to further apply operation pressure to the first edge device, the client does not perform an operation of adding the indication identifier in the first acquisition request.
The manner in which the client determines the traffic load status of the first edge device may be obtained by sending probe data to the first edge device.
Optionally, in another embodiment of the above method according to the present application, before S102 (sending a response message to the client containing the valid identification and the second edge device address), the following steps may be implemented:
if the number of the edge devices capable of processing the second acquisition request is determined to be a plurality of;
Selecting one of the edge devices as a second edge device; or alternatively, the first and second heat exchangers may be,
and selecting a plurality of edge devices as the second edge device, determining high-priority edge devices according to the operation parameters of the second edge device, and marking priority identifiers for indicating the client to send the acquisition request to the high-priority edge devices preferentially.
In one embodiment, the present application does not specifically limit the number of second edge devices capable of processing the second acquisition request, and for example, one or a plurality of second edge devices may be used.
When the number of the second edge devices is multiple, one of the second edge devices may be selected as the second edge device at random or based on a preset selection policy. In one manner, the selection policy may be to select, from a plurality of edge devices, an edge device with highest communication efficiency as the second edge device. Or selecting an edge device which has data interaction with the client from a plurality of edge devices as a second edge device.
In addition, when the number of the second edge devices is plural, all or part of the second edge devices can be used as the second edge devices, and the corresponding service processing performance can be determined according to the operation parameters of each second edge device. It can be understood that the second edge device with high service processing performance is the high priority edge device. And vice versa is a low priority device.
In one approach, the first edge device needs to mark the high priority edge device therein with a priority identification. It will be appreciated that the priority identification is used to instruct the client to send the acquisition request to the high priority edge device preferentially.
It will be appreciated that after receiving a response message having a plurality of second edge device addresses, the client sends a second acquisition request directly thereto, preferably according to the second edge device having the priority identification therein (i.e. the high priority edge device). In one manner, if the high priority edge device responds to an exception (e.g., a timeout does not occur or a response error code is returned, etc.), the client sends a second acquisition request to the other standby second edge device.
It can be understood that, in the above manner of the embodiment of the present application, the corresponding service processing performance may be determined according to the operation parameters of the plurality of second edge devices, and the second edge device corresponding to the high service processing performance therein may be used as the high priority edge device. Therefore, the client side can obtain the resource data from the edge equipment with highest communication efficiency preferentially, and the time for responding to the user request is saved.
Optionally, in another embodiment of the above method according to the present application, the second edge device is an edge device cached with the first resource data.
In one mode, since the first obtaining request in the present application may be a request from a client, the first obtaining request is used to obtain the first resource data corresponding to the target domain name. In this case, the second obtaining request is a client request, and is used to obtain the second resource data corresponding to the target domain name. The second resource may be the same as the first resource, or may be another resource different from the first resource.
For example, the target domain name is a.com, i.e. the first resource data may be all the resource data corresponding to a.com. Further, the second resource data may be all resource data corresponding to a.com. Alternatively, the second resource data may be all or part of the resource data corresponding to the subzone name of a.com. In other words, in the embodiment of the present application, the second resource data and the first resource data only belong to the same resource data under the same destination domain name.
Optionally, in another embodiment of the above method according to the present application, all or part of the information contained in the response header of the response message is effectively identified; or, the effective identification is contained in a response body of the response message.
When the first obtaining request is a resource obtaining request for obtaining a target domain name, the first edge device in the present application may include the valid identifier in the response header of the response message. In one manner, when the valid identifier is all the information of the response header of the response message, the response header is a custom response header specially used for storing the valid identifier. In another way, when part of the information of the response header is effectively identified as a response message, the effective identification may be stored in url parameters of the response header, such as https:// 2.2.2/www.test.com/test1.datamation-expiration-time = 300s & location-expiration-period = 5.
When the first fetch request is an address fetch request, the response body is effectively identified as being included in the response message, and in one manner, the response body includes "ip" of "2.2.2.2", "expires_times" of "5" of "expires_period" of "60, wherein the effective identification is" expires_times "of" 5 of "expires_period" of "60. "expire_times" 5, representing that the preset number of times may be 5 times. "expiration_period" 60 represents a preset time value of 60 minutes.
By applying the technical scheme of the application, the edge device can carry an effective identifier for indicating the acquisition request corresponding to the target domain name to the target edge device directly when the response message sent to the client side is satisfied for a certain time and a certain number of times. Therefore, the client side can not generate delay consumption caused by the fact that the client side can initiate the access request to the target edge equipment after one time of scheduling when the request is initiated by the resource content as in the prior art.
In another embodiment, the application further provides a method for responding to the acquisition request. Fig. 2 schematically shows a flow diagram of a method of responding to a fetch request according to an embodiment of the application. As shown in fig. 2, the method is applied to a client, and includes:
S201, a first acquisition request is sent to a first edge device.
In the related art, a 302 scheduling manner is often adopted in a CDN system to ensure that a client may acquire resource data requested by the client.
For example, when a client accesses an edge device that is not capable of handling an acquisition request (e.g., is in a high load state), the edge device may redirect the access request to another target edge device that is capable of handling the acquisition request (the target edge device may be the edge device that stores the resource content requested by the client itself or may be the edge device that is currently under a lower load and may process the access request). Thereby ensuring that the client can acquire the resources that the client wants to acquire by sending an access request to the target edge device.
However, under the scheme in the related art, each time the client initiates a request for the resource content, it needs to schedule once, and then initiate an access request to the target edge device (i.e., when the client receives the redirected edge server address and then sends the acquisition request, it needs to send the acquisition request to one edge device nearby first to send the request to the redirected edge server). It will be appreciated that such a manner may cause an additional data interaction between the client and the edge device, which may further cause problems of response delay and consumption of device resources.
In one manner, the acquisition request (i.e., the first acquisition request and the second acquisition request) sent by the client may be a resource acquisition request for acquiring resource data corresponding to the target domain name, or may be an address acquisition request for acquiring an edge device address capable of processing the acquisition request (e.g., the edge device stores the resource data of the target domain name, or may obtain the resource data from an upper server).
For example, describing the acquisition request as a resource acquisition request (i.e. for acquiring the resource data corresponding to the target domain name), after receiving the valid identifier, the client may not need to send the resource acquisition request to the first edge device as in the prior art when subsequently requesting all the resources under the domain name to which the resource belongs, and may initiate the access request to the target edge device when obtaining 302 the redirect response. When accessing the resource under the same domain name, the condition (within the preset time and/or within the preset times) can be met, and then the resource acquisition request can be directly sent to the second edge device, so that the defect that delay consumption is generated because the client always needs to access one edge device nearby in the process of redirecting response at 302, and the edge device returns the address of the target edge device before initiating the access request to the target edge device is avoided. Thereby saving the waiting time for acquiring the resource data.
For another example, the fetch request is illustrated as an address fetch request (i.e., an edge device address used to fetch the capability to handle the fetch request). In one manner, the address obtaining request may be an API request, or may be another request having an address of an edge device, where the first edge device is an edge scheduling device.
S202, receiving a response message which is sent by the first edge device and contains an effective identifier and a second edge device address, wherein the effective identifier is used for indicating that when the client sends a second acquisition request to the second edge device, the client sends the acquisition request to the second edge device in a subsequent preset time and/or in a preset time.
In view of the above problem, in the embodiment of the present application, after the first edge device receives the first acquisition request sent by the client, not only a response message of the address of the second edge device is returned to the first edge device. The response message includes an effective identifier for indicating that the client end directly sends the acquisition request to the second edge device when a certain time (i.e. within a preset time) and a certain number of times (i.e. within a preset number of times) are met.
S203, sending a second acquisition request to a second edge device within a preset time and/or a preset number of times, wherein the second edge device is an edge device capable of processing the second acquisition request, and the domain name corresponding to the resource requested by the second acquisition request is the same as the domain name corresponding to the resource requested by the first acquisition request.
It will be appreciated that after receiving the valid identifier, the client may not need to send the acquisition request to the first edge device and initiate the acquisition request to the target edge device after obtaining 302 the redirect response, as in the prior art, when the acquisition request is subsequently sent again. But directly sends the acquisition request to the second edge device under the limitation of the condition (within a preset time and/or within a preset number of times). Therefore, the defect that in the prior art, a client always needs to visit an edge device nearby, and after the edge device returns the address of the target edge device, the client can initiate an access request to the target edge device again to cause delay consumption is avoided. Thereby saving the waiting time for acquiring the resource data.
Specifically, for example, the preset time corresponding to the valid identifier is 10 minutes, and the preset number of times is 5. After receiving the response message including the address of the second edge device and the valid identifier of the request for the target domain name, when the client needs to acquire the second resource for the target domain name later, the client may send the second acquisition request directly to the second edge device within 10 minutes after the time point (e.g. 8:00) when the response message is received, that is, before 10 minutes at 8 points. Or, when the client needs to acquire the resource data under the same domain name within a preset number of times (for example, 5 times), the client may also directly send a second acquisition request to the second edge device.
It should be noted that, when the valid identifier corresponds to the instruction that the client directly sends the second acquisition request to the second edge device within the subsequent preset time and within the preset times, the client needs to consider the two sending conditions at the same time. That is, when any one of the conditions (within the preset time and the preset times) is not satisfied, the acquisition request cannot be directly sent to the second edge device.
In one mode, the effective mark in the application can be directly carried in the preset time and/or preset times. It can be understood that in this case, the first edge device calculates a preset time according to the service parameter (the service parameter is a parameter for representing the service load state of the second edge device), and/or adds the value of the preset number of times to the effective identifier.
In another manner, the valid identifier may also carry a service parameter for characterizing a service load status of the second edge device. The condition is to instruct the client to calculate the preset time and/or the preset times based on the service parameter after receiving the service parameter.
In one mode, the preset time value and the preset secondary value are not specifically limited, for example, the preset time value may be 5 minutes or 1 hour. The preset number of times may be 5 times, 1 time, etc.
It may be appreciated that in the embodiment of the present application, the preset time is set, and/or the preset secondary value is used to indicate that the client may directly send the second acquisition request to the second edge device after a certain condition is limited. Therefore, the defect that the second edge equipment is in a high-load state soon caused by long-term processing of the acquisition request of the client can be avoided.
In one embodiment, the number of the second edge devices is not specifically limited, and may be one or more. When the number of the second edge devices is multiple, the client can randomly select one of the second edge device addresses to send a second acquisition request. And selecting one of the second edge device addresses according to a preset selection strategy to send a second acquisition request.
In one manner, the acquisition request (i.e., the first acquisition request and the second acquisition request) sent by the client may be a resource acquisition request for acquiring resource data corresponding to the target domain name, or may be an address acquisition request for acquiring an edge device address capable of processing the acquisition request (e.g., the edge device stores the resource data of the target domain name, or may obtain the resource data from an upper server).
It will be appreciated that when the first acquisition request is for acquiring first resource data corresponding to the target domain name, the second acquisition request may be a client request for acquiring second resource data corresponding to the target domain name. The second resource may be the same as the first resource, or may be another resource different from the first resource.
In the application, a client sends a first acquisition request of first resource data corresponding to a target domain name to first edge equipment; receiving a response message which is sent by the first edge device and contains an effective identifier and a second edge device address, wherein the effective identifier is used for indicating that when the client sends a second acquisition request to the second edge device, the client sends the acquisition request to the second edge device in a subsequent preset time and/or in a preset number of times; and in the preset time represented by the effective identifier and/or in the preset times, if the second resource corresponding to the target domain name needs to be acquired, a second acquisition request can be directly sent to a second edge device, wherein the second edge device is an edge device capable of processing the second acquisition request, and the target domain name requested by the second acquisition request is the same as the target domain name requested by the first acquisition request. By applying the technical scheme of the application, after the client side determines that the response message sent by the first edge device carries the effective identifier, the operation that in the prior art, the first edge device needs to be accessed first and the request for acquiring is initiated to the target edge device after the response message is redirected 302 when the request for acquiring is sent again based on the same target edge device later can be unnecessary to be executed. But may send the acquisition request directly to the second edge device in case the valid identification is characterized for a certain time or for a certain number of times. Therefore, the problem of response delay caused by the fact that HTTP data interaction needs to be additionally generated with the first edge equipment every time resource data are requested is avoided.
Optionally, in another embodiment of the above method according to the present application, in S202 (the receiving first edge device sends a response message containing the valid identifier and the address of the second edge device), the following steps may be implemented:
acquiring an effective identifier in the response message;
determining the preset time corresponding to the effective mark and/or the preset times; or alternatively, the first and second heat exchangers may be,
if the service parameters of the service load state corresponding to the second edge device are determined to be effectively identified, calculating and generating preset time and/or preset times based on the service parameters.
In one mode, the valid identifier received by the client may be directly carried for the preset time and/or for a preset number of times. It can be understood that in this case, the first edge device calculates a preset time according to the service parameter (the service parameter is a parameter for representing the service load state of the second edge device), and/or adds the value of the preset number of times to the effective identifier.
In another manner, the valid identifier may also carry a service parameter for characterizing a service load status of the second edge device. In this case, the client may calculate the preset time and/or the preset number of times based on the service parameter.
Further, the client may determine whether the second edge device corresponds to the high load state according to the current processing traffic, the remaining processing traffic, the service processing type, and other parameters of the second edge device that are characterized by the service parameter, and if so, may generate a preset time with a relatively smaller value and/or a preset secondary value. If not, a preset time with a relatively large value and/or a preset secondary value may be generated.
Furthermore, according to the technical scheme of the application, the client can pertinently calculate the condition of directly sending the acquisition request to the second edge device according to the service load state of the second edge device. Therefore, the defect that the second edge equipment is in a high-load state due to long-term processing of the acquisition request of the client side is avoided.
Alternatively, in another embodiment of the above method according to the present application, in S201 (the first acquisition request is sent to the first edge device), the following steps may be implemented:
an indication identifier for indicating the first edge device to acquire a valid identifier is added in the first acquisition request.
In one manner, in the acquisition request sent by the client to the first edge device, an indication identifier may be added by the client, where the indication identifier is used to instruct the first edge device to acquire a valid identifier and send the valid identifier to the client.
In one manner, whether the client performs the operation of adding the indication identifier to the first acquisition request may depend on the traffic load status of the client itself. For example, when the current traffic load state of the client corresponds to idle, the operation of adding the indication identifier in the first acquisition request may not be performed. If the current traffic load state of the client corresponds to busy, the client may execute the operation of adding the indication identifier in the first acquisition request in order to avoid the problem that the client repeatedly interacts with the first edge device with redundant data to further apply the operation pressure to the client.
In another manner, whether the client performs the operation of adding the indication identifier to the first acquisition request may also be determined by the client according to the traffic load state of the first edge device. The operation of adding the indication identifier in the first acquisition request may be performed, for example, when the client determines that the traffic load status of the first edge device corresponds to idle. If the client determines that the traffic load state of the first edge device corresponds to busy, in order to avoid the problem that the first edge device repeatedly interacts with the client with invalid data to further apply operation pressure to the first edge device, the client may not perform the operation of adding the indication identifier in the first acquisition request.
The manner in which the client determines the traffic load status of the first edge device may be obtained by sending probe data to the first edge device.
Alternatively, in another embodiment of the above method according to the present application, in S201 (the first acquisition request is sent to the first edge device), the following steps may be implemented:
if the number of the second edge devices is determined to be a plurality of, sending an acquisition request to one of the second edge devices based on a preset selection strategy;
and if the response is abnormal, sending an acquisition request to another second edge device in the follow-up process.
In one manner, it may be appreciated that after the client receives the response message including the plurality of second edge device addresses, one of the second edge devices may be selected based on the preset selection policy to send the acquisition request thereto.
For example, the client may choose one at random, or may send the second acquisition request directly to the second edge device with the priority identification therein (i.e., the high priority edge device). In one manner, if the high priority edge device responds to an exception (e.g., a timeout does not occur or a response error code is returned, etc.), the client sends a second acquisition request to the other standby second edge device.
It can be appreciated that the foregoing manner of the embodiment of the present application may be based on determining that one of the second edge devices cannot respond, and may also rely on other edge device addresses to send the acquisition request. Thereby ensuring the timeliness of the client to acquire the resource data.
In one mode, as shown in fig. 3, a flowchart of a method for responding to an acquisition request according to the present application includes:
step 1: the client sends a first acquisition request to the first edge device, where the acquisition request may be a resource acquisition request for acquiring resource data corresponding to the target domain name, or may be an address acquisition request for acquiring an address of the edge device capable of processing the acquisition request.
Step 2: the first edge device sends a response message to the client containing the valid identification and the address of the second edge device. The valid identifier is used for indicating that when the client sends a second acquisition request to the second edge device, the client directly sends the second acquisition request to the second edge device in a subsequent preset time and/or a preset number of times, wherein the second edge device is an edge device capable of processing the second acquisition request.
Step 3: and in the preset time represented by the effective identifier and/or in the preset times, the client sends a second acquisition request to the second edge device, wherein the second edge device is an edge device capable of processing the second acquisition request, and the target domain name requested by the second acquisition request is the same as the target domain name requested by the first acquisition request.
Step 4: and the second edge equipment returns response information corresponding to the second acquisition request to the client.
By applying the technical scheme of the application, the edge device can carry an effective identifier for indicating that the edge device can directly send the acquisition request to the target edge device within preset time or preset times when the edge device accesses the same acquisition request subsequently in response messages sent to the client. Therefore, the client side can not generate delay consumption caused by the fact that the client side can initiate the access request to the target edge equipment after one time of scheduling when the request is initiated by the resource content as in the prior art.
In another embodiment, as shown in fig. 4, the present application further provides an electronic device that responds to the acquisition request. Wherein, be applied to first edge device, include:
a first obtaining module 301 configured to receive a first obtaining request sent by a client;
a first sending module 302 configured to send a response message including a valid identifier and a second edge device address to the client;
the effective identifier is used for indicating that when the client sends a second acquisition request to a second edge device, the client directly sends the second acquisition request to the second edge device in a subsequent preset time and/or a preset number of times, wherein the second edge device is an edge device capable of processing the second acquisition request, and a target domain name requested by the second acquisition request is the same as a target domain name requested by the first acquisition request.
In the application, first edge equipment receives a first acquisition request sent by a client; transmitting a response message containing the effective identifier and the address of the second edge device to the client; the effective identifier is used for indicating that when the client sends a second acquisition request to the second edge device, the client directly sends the second acquisition request to the second edge device in a subsequent preset time and/or a preset number of times, wherein the second edge device is an edge device capable of processing the second acquisition request, and a target domain name requested by the second acquisition request is the same as a target domain name requested by the first acquisition request. By applying the technical scheme of the application, the edge device can carry a valid identifier for indicating that the edge device directly sends the acquisition request to the target edge device within the preset time or the preset times when the edge device accesses the resource of the same domain name. Therefore, the client side can not generate delay consumption caused by the fact that the client side can initiate the access request to the target edge equipment after one time of scheduling when the request is initiated by the resource content as in the prior art.
In another embodiment of the present application, the first obtaining module 301 is configured to:
acquiring service parameters for representing the service load state of the second edge equipment;
taking the service parameter as the effective identifier; or alternatively, the first and second heat exchangers may be,
and calculating and generating the effective identification based on the service parameters.
In another embodiment of the present application, the first obtaining module 301 is configured to:
and determining whether the acquisition request contains an indication identifier or not, wherein the indication identifier is used for indicating the first edge equipment to acquire the valid identifier.
In another embodiment of the present application, the first transmitting module 302 is configured to:
if the number of the edge devices which can process the second acquisition request is determined to be a plurality of;
selecting one of the edge devices as the second edge device; or alternatively, the first and second heat exchangers may be,
and selecting a plurality of edge devices as the second edge device, determining high-priority edge devices according to the operation parameters of the second edge device, and marking priority identifiers for indicating the client to send acquisition requests to the high-priority edge devices preferentially.
In another embodiment of the present application, the first transmitting module 302 is configured to:
The second edge device is an edge device cached with the first resource data.
In another embodiment of the present application, the first transmitting module 302 is configured to:
the effective identification contains all or part of the information of the response head of the response message; or, the effective identifier is contained in a response body of the response message.
In another embodiment of the present application, as shown in fig. 5, the present application further provides an electronic device that responds to the acquisition request. Wherein, be applied to the customer end, include:
the second acquisition module is configured to send a first acquisition request to the first edge equipment;
the receiving module is configured to receive a response message which is sent by the first edge device and contains an effective identifier and a second edge device address, wherein the effective identifier is used for indicating that when the client sends a second acquisition request to the second edge device, the client sends the acquisition request to the second edge device in the subsequent preset time and/or in preset times;
and the second sending module is configured to send a second acquisition request to the second edge device within the preset time and/or within the preset times represented by the effective identifier, wherein the second edge device is an edge device capable of processing the second acquisition request, and the domain name corresponding to the resource requested by the second acquisition request is the same as the domain name corresponding to the resource requested by the first acquisition request.
In the application, a client sends a first acquisition request to first edge equipment; receiving a response message which is sent by the first edge device and contains an effective identifier and a second edge device address, wherein the effective identifier is used for indicating that when the client sends a second acquisition request to the second edge device, the client sends the acquisition request to the second edge device in a subsequent preset time and/or in a preset number of times; and sending a second acquisition request to the second edge device within the preset time represented by the effective identifier and/or within the preset times, wherein the second edge device is an edge device capable of processing the second acquisition request, and the domain name corresponding to the resource requested by the second acquisition request is the same as the domain name corresponding to the resource requested by the first acquisition request. By applying the technical scheme of the application, after the client side determines that the response message sent by the first edge device carries the effective identifier, the client side does not need to execute the operation in the prior art when sending the acquisition request again based on the same access purpose, and the operation of firstly accessing the first edge device, obtaining 302 a redirection response and then initiating the acquisition request to the target edge device is required. But directly sends an acquisition request to the second edge device in case of a certain time and a certain number of times characterized by the valid identification. Therefore, the problem of response delay caused by the fact that HTTP data interaction needs to be additionally generated with the first edge equipment every time resource data are requested is avoided.
In another embodiment of the present application, the second obtaining module 401 is configured to:
acquiring an effective identifier in the response message;
determining the preset time and/or preset times corresponding to the effective identifier; or alternatively, the first and second heat exchangers may be,
and if the service parameters of the service load state of the second edge equipment corresponding to the effective identification are determined, calculating and generating the preset time and/or the preset times based on the service parameters.
In another embodiment of the present application, the second obtaining module 401 is configured to:
and adding an indication identifier for indicating the first edge equipment to acquire the effective identifier in the first acquisition request.
In another embodiment of the present application, the second sending module 403 is configured to:
if the number of the second edge devices is determined to be multiple, sending the second acquisition request to one of the second edge devices based on a preset selection strategy;
and if the response is abnormal, sending the acquisition request to another second edge device in the follow-up process.
An embodiment of the present application provides an electronic device, as shown in fig. 6, comprising a computer readable storage medium 501 storing a computer program and a processor 502, which computer program, when read and executed by the processor, implements a method as described above.
The electronic device provided by the above embodiment of the present application and the method for responding to the acquisition request provided by the embodiment of the present application have the same advantages as the method adopted, operated or implemented by the application program stored therein, because of the same inventive concept.
Embodiments of the present application provide a computer readable storage medium storing a computer program which, when read and executed by a processor, implements a method as described above.
The technical solution of the embodiment of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing an electronic device (which may be an air conditioner, a refrigeration device, a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the method of the embodiment of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
The computer-readable storage medium provided by the above-described embodiments of the present application has the same advantageous effects as the method adopted, operated or implemented by the application program stored therein, in view of the same inventive concept as the method of responding to the acquisition request provided by the embodiments of the present application.
Embodiments of the present application provide a computer program product comprising a computer program for execution by a processor to perform a method as described above.
The computer program product provided by the above embodiment of the present application and the method for responding to the acquisition request provided by the embodiment of the present application have the same advantageous effects as the method adopted, operated or implemented by the application program stored therein, because of the same inventive concept.
It is noted that in the present application, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The embodiments of the present application are described in a related manner, and the same similar parts between the embodiments are all mutually referred, and each embodiment is mainly described in the differences from the other embodiments. In particular, with respect to the method, electronic device, electronic apparatus, and readable storage medium embodiments of responding to an acquisition request, since they are substantially similar to the method embodiments of responding to an acquisition request described above, the description is relatively simple, and the relevant points are found in the part of the description of the method embodiments of responding to an acquisition request described above.
Although the present application is disclosed above, the present application is not limited thereto. Various changes and modifications may be made by one skilled in the art without departing from the spirit and scope of the application, and the scope of the application should be assessed accordingly to that of the appended claims.

Claims (15)

1. A method for responding to an acquisition request, applied to a first edge device, comprising:
receiving a first acquisition request sent by a client;
transmitting a response message containing the effective identifier and the address of the second edge device to the client;
the effective identifier is used for indicating that when the client sends a second acquisition request to the second edge device, the client directly sends the second acquisition request to the second edge device in a subsequent preset time and/or a preset number of times;
The second edge device is an edge device capable of processing the second acquisition request, and the target domain name requested by the second acquisition request is the same as the target domain name requested by the first acquisition request.
2. The method of claim 1, wherein the sending a response message to the client containing a valid identification and a second edge device address comprises:
acquiring service parameters for representing the service load state of the second edge equipment;
taking the service parameter as the effective identifier; or alternatively, the first and second heat exchangers may be,
and calculating and generating the effective identification based on the service parameters.
3. The method of claim 1, further comprising, after the receiving the request for acquisition sent by the client:
and determining whether the acquisition request contains an indication identifier or not, wherein the indication identifier is used for indicating the first edge equipment to acquire the valid identifier.
4. The method of claim 1, further comprising, prior to said sending a response message to said client comprising a valid identification and a second edge device address:
if the number of the edge devices which can process the second acquisition request is determined to be a plurality of;
Selecting one of the edge devices as the second edge device; or alternatively, the first and second heat exchangers may be,
and selecting a plurality of edge devices as the second edge device, determining high-priority edge devices according to the operation parameters of the second edge device, and marking priority identifiers for indicating the client to send acquisition requests to the high-priority edge devices preferentially.
5. The method according to claims 1-4, wherein the second edge device is an edge device that caches the first resource data.
6. The method of claim 5, wherein the effective identification includes all or part of information of a response header of the response message; or alternatively, the first and second heat exchangers may be,
the valid identification is contained in a response body of the response message.
7. A method for responding to an acquisition request, applied to a client, comprising:
sending a first acquisition request to a first edge device;
receiving a response message which is sent by the first edge device and contains an effective identifier and a second edge device address, wherein the effective identifier is used for indicating that when the client sends a second acquisition request to the second edge device, the client sends the acquisition request to the second edge device in the subsequent preset time and/or in preset times;
And sending a second acquisition request to the second edge device within the preset time and/or within preset times represented by the effective identifier, wherein the second edge device is an edge device capable of processing the second acquisition request, and the domain name corresponding to the resource requested by the second acquisition request is the same as the domain name corresponding to the resource requested by the first acquisition request.
8. The method of claim 7, wherein the receiving the first edge device to send a response message including a valid identification and a second edge device address comprises:
acquiring an effective identifier in the response message;
determining the preset time and/or preset times corresponding to the effective identifier; or alternatively, the first and second heat exchangers may be,
and if the service parameters of the service load state of the second edge equipment corresponding to the effective identification are determined, calculating and generating the preset time and/or the preset times based on the service parameters.
9. The method of claim 7, wherein the sending the second acquisition request to the second edge device comprises:
and adding an indication identifier for indicating the first edge equipment to acquire the effective identifier in the first acquisition request.
10. The method of claim 7, wherein the sending the acquisition request to the second edge device comprises:
if the number of the second edge devices is determined to be multiple, sending the second acquisition request to one of the second edge devices based on a preset selection strategy;
and if the response is abnormal, sending the second acquisition request to another second edge device.
11. An electronic device for responding to an acquisition request, applied to a first edge device, comprising:
the first acquisition module is configured to receive a first acquisition request sent by the client;
a first sending module configured to send a response message including a valid identifier and a second edge device address to the client;
the effective identifier is used for indicating that when the client sends a second acquisition request to a second edge device, the client directly sends the second acquisition request to the second edge device in a subsequent preset time and/or a preset number of times, wherein the second edge device is an edge device capable of processing the second acquisition request, and a target domain name requested by the second acquisition request is the same as a target domain name requested by the first acquisition request.
12. An electronic device for responding to an acquisition request, characterized by being applied to a client, comprising:
a second acquisition module configured to send a first acquisition request to a first edge device, the first acquisition request being used to acquire first resource data corresponding to a target domain name;
the receiving module is configured to receive a response message which is sent by the first edge device and contains an effective identifier and a second edge device address, wherein the effective identifier is used for indicating that when the client sends a second acquisition request to the second edge device, the client sends the acquisition request to the second edge device in the subsequent preset time and/or in preset times;
and the second sending module is configured to send a second acquisition request to the second edge device within the preset time and/or within the preset times represented by the effective identifier, wherein the second edge device is an edge device capable of processing the second acquisition request, and the domain name corresponding to the resource requested by the second acquisition request is the same as the domain name corresponding to the resource requested by the first acquisition request.
13. An electronic device, comprising:
A memory for storing executable instructions; the method comprises the steps of,
a processor for executing the executable instructions with the memory to perform the operations of the method of responding to a fetch request as claimed in any one of claims 1-6 or 7-10.
14. A computer readable storage medium storing computer readable instructions which, when executed, perform the operations of the method of responding to an acquisition request of any one of claims 1-6 or 7-10.
15. A computer program product comprising a computer program, characterized in that the computer program is executed by a processor to perform the operations of the method of responding to an acquisition request according to any one of claims 1-6 or 7-10.
CN202210367230.6A 2022-04-08 2022-04-08 Method for responding to acquisition request, electronic device, electronic equipment and medium Pending CN116938946A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210367230.6A CN116938946A (en) 2022-04-08 2022-04-08 Method for responding to acquisition request, electronic device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210367230.6A CN116938946A (en) 2022-04-08 2022-04-08 Method for responding to acquisition request, electronic device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN116938946A true CN116938946A (en) 2023-10-24

Family

ID=88393041

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210367230.6A Pending CN116938946A (en) 2022-04-08 2022-04-08 Method for responding to acquisition request, electronic device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN116938946A (en)

Similar Documents

Publication Publication Date Title
US11811657B2 (en) Updating routing information based on client location
US9525659B1 (en) Request routing utilizing point of presence load information
US8521851B1 (en) DNS query processing using resource identifiers specifying an application broker
US8510448B2 (en) Service provider registration by a content broker
US10264062B2 (en) Request routing using a popularity identifier to identify a cache component
US8732309B1 (en) Request routing utilizing cost information
US9985927B2 (en) Managing content delivery network service providers by a content broker
US8468247B1 (en) Point of presence management in request routing
US10097398B1 (en) Point of presence management in request routing
KR101379864B1 (en) Request routing using network computing components
US8321588B2 (en) Request routing utilizing client location information
US9003035B1 (en) Point of presence management in request routing
US20120072600A1 (en) Managing content delivery network service providers
CA2741895A1 (en) Request routing and updating routing information utilizing client location information
CN116938946A (en) Method for responding to acquisition request, electronic device, electronic equipment and medium
CN117640760A (en) Method for responding to acquisition request, electronic device, electronic equipment and medium
CN116800810A (en) QUIC handshake method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination