CN115150475A - Scheduling method, device, medium and equipment - Google Patents
Scheduling method, device, medium and equipment Download PDFInfo
- Publication number
- CN115150475A CN115150475A CN202110352753.9A CN202110352753A CN115150475A CN 115150475 A CN115150475 A CN 115150475A CN 202110352753 A CN202110352753 A CN 202110352753A CN 115150475 A CN115150475 A CN 115150475A
- Authority
- CN
- China
- Prior art keywords
- proxy server
- request
- original url
- format
- target proxy
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000004590 computer program Methods 0.000 claims description 14
- 238000012545 processing Methods 0.000 claims description 12
- 230000015654 memory Effects 0.000 claims description 11
- 238000004422 calculation algorithm Methods 0.000 claims description 9
- 238000003860 storage Methods 0.000 claims description 8
- 238000004458 analytical method Methods 0.000 claims description 5
- 230000004044 response Effects 0.000 description 18
- 238000010586 diagram Methods 0.000 description 16
- 238000004364 calculation method Methods 0.000 description 11
- 238000009826 distribution Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 238000012937 correction Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000007723 transport mechanism Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
- G06F16/9566—URL specific, e.g. using aliases, detecting broken or misspelled links
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/45—Network directories; Name-to-address mapping
- H04L61/4505—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
- H04L61/4511—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1036—Load balancing of requests to servers for services different from user content provisioning, e.g. load balancing across domain name servers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/563—Data redirection of data network streams
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
- H04L67/63—Routing a service request depending on the request content or context
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention relates to a scheduling method, a device, a medium and equipment, wherein the scheduling method is applied to a proxy server and comprises the following steps: receiving a request of a request end; determining whether the requested format conforms to a preset format; if the format of the request does not conform to the preset format, determining the URL of the request as an original URL, and determining a corresponding target proxy server according to the original URL; and when the target proxy server is not the local proxy server, constructing redirection information in a preset format and sending the redirection information to the request end. The invention can fully utilize the outlet bandwidth of the server network card, reduce the consumption of the outlet bandwidth caused by internal scheduling and improve the service capability of a single machine.
Description
Technical Field
The present invention relates to the field of request scheduling, and in particular, to a scheduling method, apparatus, medium, and device.
Background
In the related art, the egress bandwidth of the server for providing the service is smaller than that of the network card, mainly because a part of the bandwidth traffic is consumed on the internal schedule. Taking an existing cloud distribution caching architecture as an example, each server may provide a load balancer and a caching proxy service at the same time, when the server receives a request from a client or another caching proxy, the server performs scheduling according to a URL of the request, and schedules the request to the server providing the caching proxy service, for one caching proxy, 4 requests are received on average, 3 requests may be scheduled by a load balancer on another server, and after responding to the request, responses to the 3 requests are also returned to the server where the corresponding load balancer is located, so that 3/4 of bandwidth is consumed in internal scheduling. It can be seen that due to architectural limitations, a significant portion of the bandwidth is consumed in the internal scheduling, wasting the bandwidth of the caching agent, limiting the service capabilities of the single machine.
Disclosure of Invention
To overcome the problems in the related art, the present invention provides a scheduling method, apparatus, medium, and device.
According to a first aspect of the present invention, there is provided a scheduling method applied to a proxy server, including:
receiving a request of a request end;
determining whether the format of the request conforms to a preset format;
if the format of the request does not conform to the preset format, determining the URL of the request as an original URL, and determining a corresponding target proxy server according to the original URL;
and when the target proxy server is not the local proxy server, constructing redirection information in a preset format and sending the redirection information to the request end.
The constructing the redirection information with the preset format comprises the following steps:
and constructing redirection information based on the address of the target proxy server and the original URL according to a preset rule.
The constructing of the redirection information based on the address of the target proxy server and the original URL according to a preset rule comprises:
and encrypting the original URL and/or the address of the target proxy server into encrypted information, and filling the encrypted information into the redirection information.
The scheduling method further comprises the following steps:
if the format of the request accords with a preset format, acquiring an original URL of the request;
and responding to the requested resource file according to the original URL.
The scheduling method further comprises the following steps:
if the format of the request accords with a preset format, acquiring an original URL of the request;
determining a corresponding target proxy server according to the original URL;
responding to the requested resource file when the target proxy server is a local proxy server; discarding the request when the target proxy server is not a native proxy server.
Obtaining the original URL of the request includes:
and decrypting the encrypted information in the redirection information to obtain the original URL.
The scheduling method further comprises the following steps:
and responding to the requested resource file when the target proxy server is the local proxy server.
Determining a corresponding target proxy server according to the original URL, comprising: and determining a corresponding target proxy server for the original URL according to a preset consistent hash algorithm.
According to another aspect of the present invention, there is provided a scheduling apparatus applied to a proxy server, including:
the request receiving module is used for receiving a request of a request end;
the judging module is used for determining whether the format of the request conforms to a preset format;
the analysis module is used for determining the URL of the request as an original URL if the format of the request does not conform to the preset format, and determining a corresponding target proxy server according to the original URL;
and the scheduling module is used for constructing redirection information in a preset format and sending the redirection information to the request end when the target proxy server is not the local proxy server. The method for constructing the redirection information with the preset format by the scheduling module comprises the following steps: and constructing redirection information based on the address of the target proxy server and the original URL according to a preset rule.
Constructing redirection information based on the address of the target proxy server and the original URL according to a preset rule, wherein the redirection information comprises:
and encrypting the original URL and/or the address of the target proxy server into encrypted information, and filling the encrypted information into the redirection information.
The scheduling device further comprises:
the first processing module is used for acquiring an original URL of the request if the format of the request accords with a preset format;
and responding to the requested resource file according to the original URL.
The analysis module is also used for acquiring the original URL of the request if the format of the request conforms to a preset format; determining a corresponding target proxy server according to the original URL;
further comprising: the second processing module is used for responding to the requested resource file when the target proxy server is a local proxy server; discarding the request when the target proxy server is not a native proxy server.
The obtaining the original URL of the request includes:
and decrypting the encrypted information in the redirection information to obtain the original URL.
The scheduling module is further used for responding to the requested resource file when the target proxy server is the local proxy server.
Determining a corresponding target proxy server according to the original URL, comprising: and determining a corresponding target proxy server for the original URL according to a preset consistent hash algorithm.
According to another aspect of the invention, a computer-readable storage medium is provided, having stored thereon a computer program which, when executed, carries out the steps of the scheduling method. According to another aspect of the invention, a computer device is provided, comprising a processor, a memory and a computer program stored on the memory, the processor implementing the steps of the scheduling method when executing the computer program.
The scheduling method provided by the invention can fully utilize the outlet bandwidth of the server network card, reduce the outlet bandwidth consumption caused by internal scheduling and improve the service capability of a single machine.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate an embodiment of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a flow chart illustrating a scheduling method in accordance with an exemplary embodiment.
Fig. 2 is a block diagram illustrating a scheduling apparatus according to an example embodiment.
Fig. 3 is a block diagram illustrating a scheduling apparatus according to an example embodiment.
Fig. 4 is a block diagram illustrating a scheduling apparatus according to an example embodiment.
FIG. 5 is a block diagram illustrating a computer device according to an example embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. It should be noted that the embodiments and features of the embodiments of the present invention may be arbitrarily combined with each other without conflict.
The proxy server comprises a load balancer (SLB) and a cache proxy (cache), and the load balancer and the cache proxy can be on the same proxy server or on different proxy servers. The load balancer is used for receiving the request, carrying out load balancing scheduling on the received request, and determining a target proxy server to which the request is scheduled, for example, the load balancer can carry out consistent hash calculation on an original URL of the request so as to determine the target proxy server and realize load balancing; the caching agent is used for caching the resource file corresponding to the request and responding to the request. For clarity, when the scheduled drop point of the load balancer is located on the caching proxy of the same proxy server, the target proxy server is called the local proxy server.
In the related art, a load balancer of a current proxy server receives a request from a request end, and determines a target proxy server according to a preset algorithm and an original URL of the request. When the target proxy server is not the native proxy server, the request needs to be scheduled. The scheduling method comprises the steps that the request is forwarded to a target proxy server, the target proxy server sends a resource file corresponding to the original URL in the caching proxy to a current proxy server, and then the current proxy server sends the resource file to a request end. Resulting in a significant portion of the egress bandwidth of the proxy server being consumed by the internal schedule.
In order to solve the problems in the prior art and improve the utilization rate of the outlet bandwidth of the server, the invention provides a scheduling method.
Fig. 1 is a flow chart illustrating a scheduling method in accordance with an example embodiment. Referring to fig. 1, the scheduling method is applied to a proxy server, and includes:
and step S11, receiving the request of the request end.
And S12, determining whether the requested format conforms to a preset format.
And S13, if the requested format does not conform to the preset format, determining the URL of the request as an original URL, and determining a corresponding target proxy server according to the original URL.
And step S14, when the target proxy server is not the local proxy server, constructing redirection information in a preset format and sending the redirection information to the request end.
In step S11, in the cloud distribution system, the client sends a request, the request reaches the edge node, the edge node queries whether the resource file corresponding to the request is cached in the cache, if there is a corresponding resource file, the edge node responds to the request of the client, and if the edge node does not cache the resource file requested by the client, the edge node initiates a request to the source station, downloads the corresponding resource file, and caches the resource file. At this time, the client is a request end, and the edge node is a response end. When the cloud distribution system is large, if the edge node does not cache the resource file requested by the client, the edge node initiates a request to a previous node (parent node), and the previous node responds to the edge node request by using the cached resource file or downloading the resource file to the source station, wherein the edge node is a request end and the parent node is a response end. In a special case, the cloud distribution system may have multiple levels of nodes, where a node sending a request is a request end, and a node responding to the request is a response end, and details thereof are not described herein. In an embodiment of the present invention, the proxy server is a typical server in the responding end, and is used for receiving the request of the requesting end.
In step S12, the request received by the proxy server may be an original request sent by the client, an original request of the client forwarded by the subordinate node, or a request actively initiated by the subordinate node according to the request of the client. In the present invention, the URL in the client's original request is defined as the original URL. In addition, in the invention, the proxy server comprises a load balancer and a cache proxy, and when the load balancer needs to schedule the received request, the proxy server can send redirection information to the request terminal. The request end sends redirection information to the target proxy server to serve as a redirection request, and the redirection request is different from the original request in format, so that the proxy server can judge the request format and determine whether the request format conforms to the preset format. In this embodiment, the request conforming to the preset format is a redirection request, and the request not conforming to the preset format is a client original request or a client original request forwarded by a subordinate node, or a request actively initiated by the subordinate node according to the client original request.
In step S13, if the requested format does not conform to the preset format, the URL of the request is determined to be the original URL, and the corresponding target proxy server is determined according to the original URL. If the format of the request does not conform to the preset format, the request is an original request of the client, or a request of the client forwarded by the subordinate node, or a request actively initiated by the subordinate node according to the original request of the client, and the URL of the request is an original URL. For example, the request of the client received by the proxy server, or the request of the client forwarded by the subordinate node received by the proxy server in the superior node, or the request actively initiated by the subordinate node according to the original request of the client received by the proxy server in the superior node. The proxy server determines a target proxy server from the original URL.
In step S14, when the target proxy server is not the native proxy server, the request needs to be scheduled. The scheduling method is to construct redirection information with a preset format and send the redirection information to a request end. And the request terminal sends redirection information to the target proxy server as a redirection request and requests the target proxy server for the resource file.
In this embodiment, when the request needs to be scheduled, the current proxy server does not forward the request to the target proxy server, but sends redirection information to the request end. The request terminal can send a redirection request to the target proxy server, and directly obtain the requested resource file from the target proxy server, so that the current proxy server does not need to forward the request to the target proxy server, and the target proxy server does not need to send the resource file to the current proxy server and then provide the resource file to the request terminal through the current proxy server, thereby reducing the consumption of internal scheduling.
In one embodiment, determining a corresponding target proxy server from an original URL includes: and determining a corresponding target proxy server for the original URL according to a preset consistent hash algorithm. And performing consistent hash calculation on the original URL to determine a target proxy server corresponding to the original URL. In the invention, the proxy server performs consistent hash calculation on the original URL, and determines the proxy server where the drop point is located as a target proxy server according to the calculation result so as to improve the hit rate of the request.
In one embodiment, the requested resource file is responded to when the target proxy server is a native proxy server. When the load balancer of the current proxy server determines that the target proxy server is the local proxy server according to the original URL, the local cache proxy responds to the requested resource file. For example, if the target proxy server is the local proxy server according to the result of the consistency hash calculation, the current proxy server sends the request to the cache proxy on the local server, and the local cache proxy responds to the resource file of the request. Therefore, if the load balancer receiving the request and the calculated caching proxy position are the same proxy server, data can be transmitted in a mode of sharing the memory and the like. The resource file is directly responded to the request terminal by the current proxy server without being forwarded by other proxy servers, and the consumption of internal scheduling cannot be generated.
In one embodiment, constructing the redirection information in the preset format includes:
based on the address of the target proxy server and the original URL, constructing redirection information according to a preset rule.
After the current proxy server determines the corresponding target proxy server according to the original URL, when the target proxy server is not the local proxy server, the request needs to be scheduled. In this embodiment, the scheduling method is to construct redirection information, carry the redirection information in a response message, and send the response message to the request end, where the redirection information includes an address of the target proxy server, so that the request end initiates a request to the target proxy server; the original URL is also included in the redirection information so that the target proxy server responds to the original request using the cached resource file.
The address of the target proxy server, the original URL, may be added to the redirection information in the form of plaintext, or may be added to the redirection information in the form of encryption. Therefore, preset rules can be set as required to determine whether the address and the original URL of the target proxy server need to be encrypted, how to encrypt the target proxy server, and the like. The address of the target proxy server is encrypted, so that the safety of the proxy server can be improved, and the address leakage can be prevented. The original URL is encrypted, so that the information security can be improved.
In one embodiment, constructing the redirection information according to the preset rule based on the address of the target proxy server and the original URL includes:
and encrypting the original URL and/or the address of the target proxy server into encryption information, and filling the encryption information into the redirection information. In this embodiment, the load balancer of the proxy server may encrypt the original URL, including encrypting the entire original URL, or encrypting the domain name in the original URL; the address of the target proxy server can also be encrypted; the original URL and the address of the target proxy server may also be encrypted at the same time, and after being encrypted as encrypted information, the encrypted information is filled in the redirect response message. For example, the target proxy server is the SLB-2 server, the original request is http:// A domain name/1.apk, and the redirect response message format is http:// SLB-2 server IP/encryption information (A domain name)/1.apk. The SLB-2 server IP is the address of the target proxy server, and the encryption information (A domain name) is the encryption of the domain name information in the original URL.
As another example, the current proxy server constructs redirection information and specifies a redirected destination address. The redirection information comprises an encrypted address of the target proxy server, the current proxy server carries the redirection information into a response message and sends the response message to the request end, after the request end receives the redirection information, the request end only needs to carry out redirection following without decrypting the encrypted message, and sends the redirection information to a specified target address, for example, a DNS server, analyzes the encrypted address of the target proxy server by the DNS server, and finally sends the request to the target proxy server.
Key information such as an original URL (uniform resource locator) in the redirection information, the address of the target proxy server and the like is encrypted, and even if the redirection information is hijacked in the transmission process, a hijacker cannot know the encrypted content. The method can effectively improve the safety of information and the safety of the proxy server, and achieves the aim of preventing tampering or malicious attack.
In an embodiment, the scheduling method further includes: if the format of the request accords with the preset format, acquiring the original URL of the request; and responding to the requested resource file according to the original URL.
If the request format received by the current proxy server conforms to the preset format, it indicates that the request is neither the original request of the client nor the request of the client forwarded by the subordinate node or the request actively initiated by the subordinate node according to the request of the client, but is the redirected request of other proxy servers, and the URL of the request is the URL processed by other proxy servers, and the original URL needs to be obtained from the processed URL. The request is a redirection request with a preset format, which shows that the request is a request redirected to the current proxy server after the other proxy servers receive the original request, perform consistent hash calculation on the original URL, and determine the current proxy server as the target proxy server according to the result of the consistent hash calculation. According to a preset load balancing algorithm, for the same URL, the results of hash calculation on different proxy servers are also the same, and the drop points of the hash calculation are necessarily the same cache proxy. I.e. the original URL is responded to by the current proxy server. The current proxy server uses the resource files in the caching proxy to respond to the request terminal. After the proxy server receives the request in the redirection format, the proxy server can directly respond to the resource file to the request end after acquiring the original URL, so that the response speed is increased.
In an embodiment, the scheduling method further includes: if the format of the request accords with the preset format, acquiring the original URL of the request; determining a corresponding target proxy server according to the original URL; when the target proxy server is the local proxy server, responding to the requested resource file; when the target proxy server is not the native proxy server, the request is discarded.
If the request format received by the current proxy server conforms to the preset format, the request is in a redirection format, and under a normal condition, the current proxy server can directly respond to the resource file to the request terminal. But since multiple proxy servers in a node may be simultaneously performing multiple different services, in addition to generating redirection information in the service in response to a resource file request, other services may also generate redirection information, such as that generated by an IP error correction service, which may not respond to the correct content. Therefore, in this embodiment, the current proxy server obtains the original URL in the request, and performs the consistent hash calculation on the original URL in the redirect request again, if the request is a normal redirect response message, the drop point of the result must be at the local server, that is, the calculated target proxy server must be the current proxy server, and the current proxy server responds to the request end with the resource file. If the target proxy server calculated by the current proxy server according to the original URL in the redirection request is not the current proxy server, the request may be redirection information generated by other services of other proxy servers, such as redirection information generated by an IP error correction service. In order to avoid that multiple redirections affect the response time, the current proxy server does not send redirection information according to the calculation result any more, but discards the request. In this embodiment, the normal redirection request can be quickly responded, and the normal request can be prevented from being influenced by the redirection requests of other services.
In one embodiment, obtaining the original URL of the request includes:
and decrypting the encrypted information in the redirection information to obtain the original URL. And when the request is the redirection information and the original URL is encrypted, the proxy server decrypts the encrypted original URL after receiving the request to acquire the encrypted content. The encrypted content can be decrypted only by the proxy server, so that user information leakage is prevented, and the safety is improved.
The scheduling method of the present invention is further explained by the following embodiments.
Detailed description of the preferred embodiment
Step 1: the request end sends a request http:// A domain name/1. Apk.
Step 2: the proxy server SLB-1 load balancer receives the request.
And step 3: and the proxy server SLB-1 judges whether the format of the request accords with the preset format, and after judgment, the format of the request does not accord with the preset format, and the URL of the request is the original URL.
And 4, step 4: and the proxy server SLB-1 calculates the resource file corresponding to the URL in the cache of the proxy server SLB-2 according to a preset consistency hash algorithm and the original URL, and the target server is the proxy server SLB-2. Then SLB-1 constructs the redirection information according to the address and original URL of the proxy SLB-2 and the preset rule, wherein the preset rule is to encrypt the domain name in the URL. The redirection information format is as follows: http:// SLB-2 Server IP/encryption info (A Domain name)/1.apk. And the constructed redirection information is placed into a 302 response message and sent to the request end.
Step (ii) of 5: and the requester receives the 302 response message, performs redirection following, and sends a redirection request message to the target proxy server SLB-2 according to the redirection information in the 302 response message to acquire response content, specifically, sends http:// SLB-2 server IP/encrypted padding (A domain name)/1.apk to the server where the SLB-2 is located.
And 6: after receiving the request sent by the request end, the proxy server SLB-2 judges that the format of the request accords with a preset format, the request is stripped, decrypted and restored to obtain an original URL in the encrypted information, and the proxy server SLB-2 local cache responds the corresponding resource file to the request end.
It can be known from the above embodiments that, by applying the scheduling method of the present invention, when the load balancer of the proxy server needs to schedule the request, the request end is instructed to initiate a redirection request to the target proxy server by sending the redirection information and adding the address of the target proxy server corresponding to the original URL of the request into the redirection information, and the resource file of the request is obtained from the target proxy server. The request information and the resource files do not need to be scheduled and transmitted among the proxy servers, so that the bandwidth waste caused by internal scheduling is effectively reduced while the load balance is realized, and the single-machine service capability is improved.
Fig. 2 is a block diagram illustrating a scheduling apparatus according to an example embodiment. Referring to fig. 2, the scheduling apparatus is applied to a proxy server, and includes: a request receiving module 201, a judging module 202, an analyzing module 203 and a scheduling module 204.
The request receiving module 201 is configured to receive a request of a request end.
The determining module 202 is configured to determine whether the requested format conforms to a preset format.
The parsing module 203 is configured to determine, if the format of the request does not conform to a preset format, that the URL of the request is an original URL, and determine a corresponding target proxy server according to the original URL.
The scheduling module 204 is configured to construct redirection information in a preset format and send the redirection information to the requesting end when the target proxy server is not the native proxy server.
The scheduling module is also used for determining the URL of the request as an original URL if the format of the request does not conform to the preset format, and determining a corresponding target proxy server according to the original URL;
the method for constructing the redirection information with the preset format by the scheduling module comprises the following steps: based on the address of the target proxy server and the original URL, constructing redirection information according to a preset rule.
Constructing redirection information based on the address and original URL of the target proxy server according to a preset rule, wherein the redirection information comprises:
the original URL and/or the address of the target proxy server are encrypted as encrypted information and the encrypted information is filled into the redirection information.
Fig. 3 is a block diagram illustrating a scheduling apparatus according to an example embodiment. Referring to fig. 3, the scheduling apparatus further includes a first processing module 301.
The first processing module 301 is configured to obtain an original URL of a request if the format of the request conforms to a preset format;
and responding the requested resource file according to the original URL.
Fig. 4 is a block diagram illustrating a scheduling apparatus according to an example embodiment. Referring to fig. 4, the scheduling apparatus further includes a second processing module 401.
The second processing module 401 is configured for when the target proxy server is a native proxy server, responding to the requested resource file; when the target proxy server is not the native proxy server, the request is discarded.
The analysis module is also used for acquiring the original URL of the request if the format of the request accords with the preset format; and determining a corresponding target proxy server according to the original URL.
Obtaining the original URL of the request includes:
and decrypting the encrypted information in the redirection information to obtain the original URL.
The scheduling module is also used for responding to the requested resource file when the target proxy server is the local proxy server.
Determining a corresponding target proxy server according to the original URL, comprising: and determining a corresponding target proxy server for the original URL according to a preset consistent hash algorithm.
Fig. 5 is a block diagram illustrating a computer device 500 for scheduling, according to an example embodiment. For example, the computer device 500 may be provided as a server. Referring to fig. 5, the computer device 500 includes a processor 501, and the number of the processors may be set to one or more as necessary. The computer device 500 further comprises a memory 502 for storing instructions, such as an application program, executable by the processor 501. The number of the memories can be set to one or more according to needs. Which may store one or more application programs. The processor 501 is configured to execute instructions to perform the scheduling method described above.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus (device), or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied in the media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, including, but not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by the computer, and the like. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In the present invention, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that an 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 article or apparatus. Without further limitation, an element defined by the phrases "comprising 8230; \8230;" comprises 8230; "does not exclude the presence of additional like elements in an article or device comprising the element.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, it is intended that the present invention cover the modifications and variations of this invention provided they come within the scope of the appended claims and their equivalents.
Claims (18)
1.A scheduling method applied to a proxy server is characterized by comprising the following steps:
receiving a request of a request end;
determining whether the format of the request conforms to a preset format;
if the request format does not conform to the preset format, determining the URL of the request as an original URL, and determining a corresponding target proxy server according to the original URL;
and when the target proxy server is not the local proxy server, constructing redirection information in a preset format and sending the redirection information to the request end.
2. The scheduling method of claim 1, wherein the constructing the redirection information in the preset format comprises:
and constructing redirection information based on the address of the target proxy server and the original URL according to a preset rule.
3. The scheduling method of claim 2, wherein the constructing redirection information based on the address of the target proxy server and the original URL according to a preset rule comprises:
and encrypting the original URL and/or the address of the target proxy server into encrypted information, and filling the encrypted information into the redirection information.
4. The scheduling method of claim 3, further comprising:
if the format of the request accords with a preset format, acquiring an original URL of the request;
and responding to the requested resource file according to the original URL.
5. The scheduling method of claim 3, further comprising:
if the format of the request accords with a preset format, acquiring an original URL of the request;
determining a corresponding target proxy server according to the original URL;
responding to the requested resource file when the target proxy server is a local proxy server; discarding the request when the target proxy server is not a native proxy server.
6. The scheduling method according to any one of claims 4 or 5, wherein the obtaining the original URL of the request comprises:
and decrypting the encrypted information in the redirection information to obtain the original URL.
7. The scheduling method of claim 1, further comprising:
and responding to the requested resource file when the target proxy server is the local proxy server.
8. The scheduling method according to any one of claims 1 or 5, wherein the determining the corresponding target proxy server according to the original URL comprises: and determining a corresponding target proxy server for the original URL according to a preset consistent hash algorithm.
9. A scheduling apparatus applied to a proxy server, comprising:
the request receiving module is used for receiving a request of a request end;
the judging module is used for determining whether the format of the request conforms to a preset format;
the analysis module is used for determining the URL of the request as an original URL if the format of the request does not conform to the preset format, and determining a corresponding target proxy server according to the original URL;
and the scheduling module is used for constructing redirection information in a preset format and sending the redirection information to the request end when the target proxy server is not the local proxy server.
10. The scheduling apparatus of claim 9 wherein the scheduling module constructing the redirection information in a preset format comprises: and constructing redirection information based on the address of the target proxy server and the original URL according to a preset rule.
11. The scheduling apparatus of claim 10, wherein the constructing redirection information based on the address of the target proxy server, the original URL, and a preset rule comprises:
and encrypting the original URL and/or the address of the target proxy server into encrypted information, and filling the encrypted information into the redirection information.
12. The scheduling apparatus of claim 11, further comprising:
the first processing module is used for acquiring an original URL of the request if the format of the request accords with a preset format;
and responding to the requested resource file according to the original URL.
13. The scheduling apparatus of claim 11,
the analysis module is also used for acquiring the original URL of the request if the format of the request accords with a preset format; determining a corresponding target proxy server according to the original URL;
further comprising: the second processing module is used for responding to the requested resource file when the target proxy server is a local proxy server; discarding the request when the target proxy server is not a native proxy server.
14. The scheduling apparatus of any one of claims 12 or 13 wherein the obtaining the original URL of the request comprises:
and decrypting the encrypted information in the redirection information to obtain the original URL.
15. The scheduling apparatus of claim 9 wherein the scheduling module is further configured to respond to the requested resource file when the target proxy server is a native proxy server.
16. The scheduling apparatus of claim 9 or 13, wherein the determining a corresponding target proxy server from the original URL comprises: and determining a corresponding target proxy server for the original URL according to a preset consistent hash algorithm.
17. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed, carries out the steps of the method according to any one of claims 1-8.
18. A computer arrangement comprising a processor, a memory and a computer program stored on the memory, characterized in that the processor, when executing the computer program, carries out the steps of the method according to any of claims 1-8.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110352753.9A CN115150475B (en) | 2021-03-31 | 2021-03-31 | Scheduling method, device, medium and equipment |
PCT/CN2022/082228 WO2022206479A1 (en) | 2021-03-31 | 2022-03-22 | Scheduling method and apparatus, medium, and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110352753.9A CN115150475B (en) | 2021-03-31 | 2021-03-31 | Scheduling method, device, medium and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115150475A true CN115150475A (en) | 2022-10-04 |
CN115150475B CN115150475B (en) | 2024-07-26 |
Family
ID=83405013
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110352753.9A Active CN115150475B (en) | 2021-03-31 | 2021-03-31 | Scheduling method, device, medium and equipment |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115150475B (en) |
WO (1) | WO2022206479A1 (en) |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104202362A (en) * | 2014-08-14 | 2014-12-10 | 上海帝联信息科技股份有限公司 | Load balance system and content distribution method and device thereof, and load balancer |
US20150039674A1 (en) * | 2013-07-31 | 2015-02-05 | Citrix Systems, Inc. | Systems and methods for performing response based cache redirection |
CN104580016A (en) * | 2013-10-11 | 2015-04-29 | 中兴通讯股份有限公司 | Node distribution method, device and system |
US20160241664A1 (en) * | 2013-10-28 | 2016-08-18 | Huawei Technologies Co., Ltd. | Method, device, and system for redirecting data by using service proxy |
US20160248884A1 (en) * | 2013-05-16 | 2016-08-25 | Telefonaktiebolaget Lm Ericsson (Publ) | Redirection in a Content Delivery Network |
US20160294968A1 (en) * | 2008-08-26 | 2016-10-06 | Alibaba Group Holding Limited | In-server redirection of http requests |
CN106161649A (en) * | 2016-08-30 | 2016-11-23 | 常州云端网络科技股份有限公司 | A kind of CDN intelligent dispatching method based on redirection mechanism |
US20190090133A1 (en) * | 2016-08-29 | 2019-03-21 | Tencent Technology (Shenzhen) Company Limited | Authentication method and server, and computer storage medium |
CN110581873A (en) * | 2018-06-11 | 2019-12-17 | 中国移动通信集团浙江有限公司 | cross-cluster redirection method and monitoring server |
CN111800441A (en) * | 2019-04-08 | 2020-10-20 | 阿里巴巴集团控股有限公司 | Data processing method, system, device, user side server, user side and management and control server |
CN111953616A (en) * | 2019-05-17 | 2020-11-17 | 贵州白山云科技股份有限公司 | Load balancing scheduling method, device, system, medium and equipment |
CN112134960A (en) * | 2020-09-24 | 2020-12-25 | 新华三信息安全技术有限公司 | Data request method and device |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7363361B2 (en) * | 2000-08-18 | 2008-04-22 | Akamai Technologies, Inc. | Secure content delivery system |
CN108123888A (en) * | 2016-11-29 | 2018-06-05 | 中兴通讯股份有限公司 | Load-balancing method, the apparatus and system of message |
CN107483614B (en) * | 2017-08-31 | 2021-01-22 | 京东方科技集团股份有限公司 | Content scheduling method and communication network based on CDN (content delivery network) and P2P network |
CN112287259B (en) * | 2020-10-20 | 2024-04-30 | 上海七牛信息技术有限公司 | Cold access source-returning scheduling system and processing method thereof |
-
2021
- 2021-03-31 CN CN202110352753.9A patent/CN115150475B/en active Active
-
2022
- 2022-03-22 WO PCT/CN2022/082228 patent/WO2022206479A1/en active Application Filing
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160294968A1 (en) * | 2008-08-26 | 2016-10-06 | Alibaba Group Holding Limited | In-server redirection of http requests |
US20160248884A1 (en) * | 2013-05-16 | 2016-08-25 | Telefonaktiebolaget Lm Ericsson (Publ) | Redirection in a Content Delivery Network |
US20150039674A1 (en) * | 2013-07-31 | 2015-02-05 | Citrix Systems, Inc. | Systems and methods for performing response based cache redirection |
CN104580016A (en) * | 2013-10-11 | 2015-04-29 | 中兴通讯股份有限公司 | Node distribution method, device and system |
US20160241664A1 (en) * | 2013-10-28 | 2016-08-18 | Huawei Technologies Co., Ltd. | Method, device, and system for redirecting data by using service proxy |
CN104202362A (en) * | 2014-08-14 | 2014-12-10 | 上海帝联信息科技股份有限公司 | Load balance system and content distribution method and device thereof, and load balancer |
US20190090133A1 (en) * | 2016-08-29 | 2019-03-21 | Tencent Technology (Shenzhen) Company Limited | Authentication method and server, and computer storage medium |
CN106161649A (en) * | 2016-08-30 | 2016-11-23 | 常州云端网络科技股份有限公司 | A kind of CDN intelligent dispatching method based on redirection mechanism |
CN110581873A (en) * | 2018-06-11 | 2019-12-17 | 中国移动通信集团浙江有限公司 | cross-cluster redirection method and monitoring server |
CN111800441A (en) * | 2019-04-08 | 2020-10-20 | 阿里巴巴集团控股有限公司 | Data processing method, system, device, user side server, user side and management and control server |
CN111953616A (en) * | 2019-05-17 | 2020-11-17 | 贵州白山云科技股份有限公司 | Load balancing scheduling method, device, system, medium and equipment |
CN112134960A (en) * | 2020-09-24 | 2020-12-25 | 新华三信息安全技术有限公司 | Data request method and device |
Non-Patent Citations (4)
Title |
---|
S KUDO等: ""Detection of suspicious redirection using HTTP request sequence"", 《COMPUTER SECURITY SYMPOSIUM 2015》 * |
惠雯;尹浩;林闯;杨扬;: "内容分发网络请求路由研究", 计算机科学, vol. 39, no. 2, 29 February 2012 (2012-02-29), pages 1 * |
杨安: ""基于Web集群的反向代理负载均衡研究与实践"", 《信息通信》, 30 November 2019 (2019-11-30) * |
皮灿军;李和香;: ""基于Internet的反向代理缓存技术的研究"", 《中小企业管理与科技(下旬刊)》, no. 4 * |
Also Published As
Publication number | Publication date |
---|---|
WO2022206479A1 (en) | 2022-10-06 |
CN115150475B (en) | 2024-07-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11303431B2 (en) | Method and system for performing SSL handshake | |
EP3398334B1 (en) | Accurate caching in adaptive video streaming | |
US20030014503A1 (en) | Method and apparatus for providing access of a client to a content provider server under control of a resource locator server | |
CN109474916B (en) | Equipment authentication method, device and machine readable medium | |
EP2456246A1 (en) | Network selection method based on multi-link and apparatus thereof | |
CN112751897B (en) | Load balancing method, device, medium and equipment | |
CN108769743B (en) | Video playing control method, system, node and computer storage medium | |
US10904229B2 (en) | Caching content securely within an edge environment, with pre-positioning | |
EP3735768B1 (en) | Improving qoe for video and web services using cross-layer information | |
US9736246B1 (en) | Cross-device synchronization system for account-level information | |
US11659033B2 (en) | Caching content securely within an edge environment | |
EP2966834A1 (en) | System and method for parallel secure content bootstrapping in content-centric networks | |
CN111488604A (en) | Data desensitization system and data desensitization method | |
CN105612723B (en) | Method and apparatus for allocating traffic by using multiple network interfaces in a wireless communication system | |
EP3366019A1 (en) | Method and apparatus for secure content caching and delivery | |
CN113364781A (en) | Request processing method and system | |
CN113709530A (en) | Resource downloading method, system, electronic equipment and storage medium | |
US20190387264A1 (en) | Methods and devices for checking the validity of a delegation of distribution of encrypted content | |
CN110958279B (en) | Data processing method and device | |
CN110913011A (en) | Session keeping method, session keeping device, readable storage medium and electronic equipment | |
US9405924B2 (en) | Self-keyed protection of anticipatory content | |
US20180367621A1 (en) | Secure service chaining | |
CN115150475B (en) | Scheduling method, device, medium and equipment | |
CN106464603B (en) | Request transmission method and client | |
CN115333936A (en) | Method, device, medium and equipment for switching back source strategy |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |