WO2022206479A1 - 调度方法、装置、介质及设备 - Google Patents

调度方法、装置、介质及设备 Download PDF

Info

Publication number
WO2022206479A1
WO2022206479A1 PCT/CN2022/082228 CN2022082228W WO2022206479A1 WO 2022206479 A1 WO2022206479 A1 WO 2022206479A1 CN 2022082228 W CN2022082228 W CN 2022082228W WO 2022206479 A1 WO2022206479 A1 WO 2022206479A1
Authority
WO
WIPO (PCT)
Prior art keywords
proxy server
request
original url
format
target proxy
Prior art date
Application number
PCT/CN2022/082228
Other languages
English (en)
French (fr)
Inventor
江锋
王少阳
Original Assignee
贵州白山云科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 贵州白山云科技股份有限公司 filed Critical 贵州白山云科技股份有限公司
Publication of WO2022206479A1 publication Critical patent/WO2022206479A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • 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/1036Load balancing of requests to servers for services different from user content provisioning, e.g. load balancing across domain name servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/563Data redirection of data network streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling 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/63Routing a service request depending on the request content or context

Definitions

  • the embodiments of the present disclosure relate to, but are not limited to, a scheduling method, apparatus, medium, and device.
  • the egress bandwidth provided by the server may be smaller than the egress bandwidth of the network card, mainly because part of the bandwidth traffic is consumed in internal scheduling.
  • each server may provide a load balancer and a cache proxy service at the same time.
  • the server receives a request from a client or other cache proxy, it will schedule the request according to the requested URL, and schedule the request to
  • the present disclosure provides a scheduling method, apparatus, medium and device.
  • a scheduling method is provided, applied to a proxy server, including:
  • redirection information in a preset format is constructed and sent to the requester.
  • the constructing redirection information in a preset format includes:
  • redirection information is constructed according to preset rules.
  • the redirection information constructed according to a preset rule based on the address of the target proxy server and the original URL includes:
  • the original URL and/or the address of the target proxy server are encrypted into encrypted information, and the encrypted information is filled into the redirection information.
  • the scheduling method further includes:
  • the scheduling method further includes:
  • the target proxy server When the target proxy server is a local proxy server, it responds to the requested resource file; when the target proxy server is not a local proxy server, the request is discarded.
  • obtaining the original URL of the request includes:
  • the scheduling method further includes:
  • the target proxy server When the target proxy server is a local proxy server, it responds to the requested resource file.
  • determining the corresponding target proxy server according to the original URL includes: determining the corresponding target proxy server according to a preset consistent hash algorithm for the original URL.
  • a scheduling apparatus applied to a proxy server, comprising:
  • the request receiving module is set to receive the request of the requester
  • a judgment module configured to determine whether the requested format conforms to a preset format
  • a parsing module configured to determine that the requested URL is an original URL if the requested format does not meet the preset format, and determine a corresponding target proxy server according to the original URL;
  • the scheduling module is configured to construct redirection information in a preset format when the target proxy server is not a local proxy server, and send it to the requester.
  • the scheduling module constructing redirection information in a preset format includes: constructing redirection information according to preset rules based on the address of the target proxy server and the original URL.
  • the redirection information constructed according to a preset rule includes:
  • the original URL and/or the address of the target proxy server are encrypted into encrypted information, and the encrypted information is filled into the redirection information.
  • the scheduling apparatus further includes:
  • a first processing module configured to obtain the original URL of the request if the format of the request conforms to a preset format
  • the parsing module is further configured to obtain the original URL of the request if the format of the request conforms to a preset format; and determine the corresponding target proxy server according to the original URL;
  • It also includes: a second processing module configured to respond to the requested resource file when the target proxy server is a local proxy server; and discard the request when the target proxy server is not a local proxy server.
  • the obtaining the original URL of the request includes:
  • the scheduling module is further configured to respond to the requested resource file when the target proxy server is a local proxy server.
  • determining the corresponding target proxy server according to the original URL includes: determining the corresponding target proxy server according to a preset consistent hash algorithm for the original URL.
  • a computer-readable storage medium having stored thereon a computer program that, when executed, implements the steps of a scheduling method.
  • a computer device including a processor, a memory, and a computer program stored on the memory, the processor implementing the steps of the scheduling method when the processor executes the computer program.
  • the scheduling method provided by the present disclosure can make full use of the egress bandwidth of the server network card, reduce the egress bandwidth consumption caused by internal scheduling, and improve the service capability of a single machine.
  • Fig. 1 is a flowchart of a scheduling method according to an exemplary embodiment.
  • Fig. 2 is a block diagram of a scheduling apparatus according to an exemplary embodiment.
  • Fig. 3 is a block diagram of a scheduling apparatus according to an exemplary embodiment.
  • Fig. 4 is a block diagram of a scheduling apparatus according to an exemplary embodiment.
  • Fig. 5 is a block diagram of a computer device according to an exemplary embodiment.
  • the proxy server includes a load balancer (SLB for short) and a cache proxy (cache for short).
  • the load balancer and the cache proxy can be on the same proxy server or on different proxy servers.
  • the load balancer is used to receive requests, perform load balancing scheduling on the received requests, and determine the target proxy server to which the request is scheduled. For example, a consistent hash calculation can be performed on the original URL of the request, and then the target proxy server can be determined to achieve load balancing; caching;
  • the proxy is used to cache the resource file corresponding to the request and respond to the request. For clarity, when the scheduled load balancer is located on the caching proxy of the same proxy server, the target proxy server is called the local proxy server.
  • the load balancer of the current proxy server receives the request from the requester, and determines the target proxy server according to a preset algorithm and the original URL of the request.
  • the request needs to be scheduled.
  • the scheduling method is to forward the request to the target proxy server, the target proxy server sends the resource file corresponding to the original URL in the cache proxy to the current proxy server, and then the current proxy server sends the resource file to the requester.
  • a considerable part of the egress bandwidth of the proxy server is consumed in internal scheduling.
  • the present disclosure provides a scheduling method.
  • Fig. 1 is a flowchart of a scheduling method according to an exemplary embodiment.
  • a scheduling method is applied to a proxy server, including:
  • Step S11 receiving a request from a requester.
  • Step S12 it is determined whether the requested format conforms to the preset format.
  • Step S13 if the requested format does not conform to the preset format, determine that the requested URL is the original URL, and determine the corresponding target proxy server according to the original URL.
  • Step S14 when the target proxy server is not the local proxy server, construct redirection information in a preset format and send it to the requester.
  • 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, and if there is a corresponding resource file, the edge node responds to the client's request. If the edge node does not cache the resource file requested by the client, the edge node will initiate a request to the origin site, download the corresponding resource file, and cache it. At this time, the client is the requester, and the edge node is the responder.
  • a proxy server is a typical server in a responder, and is used to receive a request from a requester.
  • the request received by the proxy server may be the original request sent by the client, the original request of the client forwarded by the subordinate node, or the request initiated by the subordinate node according to the client's request.
  • the URL in the client's original request is defined as the original URL.
  • the proxy server includes a load balancer and a caching proxy. When the load balancer needs to schedule a received request, the proxy server can send redirection information to the requester. The requester sends redirection information to the target proxy server as a redirection request. The format of the redirection request is different from the original request. Therefore, the proxy server can judge the format of the request to determine whether the format of the request conforms to the preset format.
  • a request that conforms to the preset format is a redirection request, and a request that does not conform to the preset format is an original client request or an original client request forwarded by a lower-level node, or a request that a lower-level node actively initiates according to the original request of the client initiated request.
  • step S13 if the requested format does not conform to the preset format, it is determined that the requested URL is 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, it indicates that the request is the original request of the client, or the request of the client forwarded by the subordinate node, or the request initiated by the subordinate node according to the original request of the client, and the requested URL is the original URL. For example, the client's request received by the proxy server, or the client's request received by the proxy server in the upper-level node and forwarded by the lower-level node, or the lower-level node received by the proxy server in the upper-level node actively initiated according to the client's original request. request. The proxy server determines the target proxy server based on the original URL.
  • step S14 when the target proxy server is not the local proxy server, the request needs to be scheduled.
  • the scheduling method is to construct redirection information in a preset format and send it to the requester.
  • the requester sends redirection information to the target proxy server, as a redirection request, to request the resource file from the target proxy server.
  • the current proxy server when the request needs to be scheduled, the current proxy server no longer forwards the request to the target proxy server, but sends redirection information to the requester.
  • the requester can send a redirect request to the target proxy server and obtain the requested resource file directly from the target proxy server. It can be seen 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.
  • the server is then provided to the requester through the current proxy server, which reduces the consumption of internal scheduling.
  • determining the corresponding target proxy server according to the original URL includes: determining the corresponding target proxy server according to a preset consistent hash algorithm for the original URL. Perform consistent hash calculation on the original URL to determine the target proxy server corresponding to the original URL.
  • the proxy server performs consistent hash calculation on the original URL, and according to the calculation result, the proxy server where the destination is located is determined as The target proxy server to improve the hit rate of the request.
  • the target proxy server when the target proxy server is a local proxy server, it responds to the requested resource file.
  • 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, according to the result of consistent hash calculation, if the target proxy server is a local proxy server, the current proxy server sends the request to the caching proxy on the local server, and the local caching proxy responds to the requested resource file. In this way, if the load balancer that receives the request and the calculated caching proxy are the same proxy server, data can be passed through shared memory, etc. The resource file is directly responded by the current proxy server to the requester, and does not need to be forwarded by other proxy servers, and will not generate internal scheduling consumption.
  • constructing the redirection information in a preset format includes:
  • the redirection information is constructed according to preset rules.
  • the scheduling method is to construct redirection information, carry the redirection information in a response message and send it to the requester, and the redirection information includes the address of the target proxy server, so that the requester initiates a request to the target proxy server;
  • the original URL is also included in the targeting information so that the target proxy server responds to the original request using the cached resource file.
  • the address of the target proxy server and the original URL can be added to the redirection information in plaintext or in encrypted form. Therefore, preset rules can be set as required to determine whether to encrypt the address and original URL of the target proxy server, and how to encrypt them. Encrypting the address of the target proxy server can improve the security of the proxy server and prevent address leakage. Encrypting the original URL can improve information security.
  • the redirection information constructed according to a preset rule includes:
  • the original URL and/or the address of the target proxy server are encrypted into encrypted information, and the encrypted information is filled into the redirection information.
  • the load balancer of the proxy server can encrypt the original URL, including encrypting the entire original URL, or encrypting the domain name in the original URL; it can also encrypt the address of the target proxy server; or
  • the original URL and the address of the target proxy server are encrypted at the same time, and after the encrypted information is encrypted, the encrypted information is filled into the redirection response message.
  • the target proxy server is the SLB-2 server
  • the original request is http://A domain name/1.apk
  • the format of the redirect response message is as follows: http://SLB-2 server IP/encrypted information (A domain name)/1. apk.
  • the SLB-2 server IP is the address of the target proxy server
  • the encryption information (A domain name) is to encrypt the domain name information in the original URL.
  • the current proxy server constructs redirection information and specifies a redirected target address.
  • the redirection information includes the encrypted address of the target proxy server.
  • the current proxy server carries the redirection information into the response message and sends it to the requester. After the requester receives the redirection information, it does not need to decrypt the encrypted message.
  • the redirection that is, follow the redirection information, send the redirection information to the specified target address, such as a DNS server, the DNS server parses the encrypted address of the target proxy server, and finally sends the request to the target proxy server.
  • the key information such as the original URL and the address of the target proxy server in the redirection information is encrypted. Even if the redirection information is hijacked during the transmission process, the hijacker cannot know the encrypted content. It can effectively improve the security of information and the security of the proxy server, and achieve the purpose of preventing tampering or malicious attacks.
  • the scheduling method further includes: if the format of the request conforms to a preset format, obtaining the original URL of the request; and responding to the requested resource file according to the original URL.
  • the format of the request received by the current proxy server conforms to the preset format, it means 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 initiated by the subordinate node according to the request of the client, but another proxy.
  • the request redirected by the server, 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. Since the request is a redirect request in a preset format, it means that the request is after another proxy server receives the original request, performs consistent hash calculation on the original URL, and determines the current proxy server as the target proxy according to the result of the consistent hash calculation. After the server, redirect the request to the current proxy server.
  • the hash calculation results on different proxy servers are the same, and the destination must be the same caching proxy. That is, the original URL was responded by the current proxy server.
  • the current proxy server responds to the requester with the resource file in the caching proxy.
  • the proxy server receives the request in the redirection format, it can directly respond to the resource file to the requester after obtaining the original URL to speed up the response.
  • the scheduling method further includes: if the format of the request conforms to a preset format, obtaining the original URL of the request; determining a corresponding target proxy server according to the original URL; when the target proxy server is a local proxy server, responding to the The requested resource file; when the target proxy server is not the native proxy server, the request is discarded.
  • the current proxy server can directly respond to the resource file to the requester.
  • the current proxy server obtains the original URL in the request, and performs consistent hash calculation on the original URL in the redirection request again.
  • the request is a normal redirection response message
  • the result must be located in The local server, that is to say, the calculated target proxy server must be the current proxy server, and the current proxy server responds to the resource file to the requester.
  • the target proxy server calculated by the current proxy server according to the original URL in the above 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 generated by the IP error correction service information.
  • the current proxy server no longer sends redirection information according to the calculation result, but discards the request.
  • the normal redirection request can be quickly responded to, and the redirection request of other services can be prevented from affecting the normal request.
  • obtaining the original URL of the request includes:
  • the proxy server decrypts the encrypted original URL to obtain the encrypted content.
  • the encrypted content can only be decrypted by the proxy server, preventing user information from leaking and increasing security.
  • Step 1 The requester sends a request http://A domain name/1.apk.
  • Step 2 Proxy server SLB-1 load balancer receives the request.
  • Step 3 The proxy server SLB-1 judges whether the format of the request conforms to the preset format. After judgment, the format of the request does not conform to the preset format, and the requested URL is the original URL.
  • Step 4 The proxy server SLB-1 calculates that the resource file corresponding to the URL is in the cache of the proxy server SLB-2 according to the preset consistent hash algorithm and the original URL, and the target server is the proxy server SLB-2. Therefore, SLB-1 constructs redirection information according to the address and original URL of the proxy server SLB-2, and a preset rule.
  • the preset rule is to encrypt the domain name in the URL.
  • the format of the redirection information is as follows: http://SLB-2 server IP/encrypted information (A domain name)/1.apk. Put the constructed redirection information into the 302 response message and send it to the requester.
  • Step 5 The requester receives the above 302 response message, performs redirection and follows, and sends a redirection request message to the target proxy server SLB-2 according to the redirection information in the 302 response message to obtain the response content. Specifically, send http:/ /SLB-2 server IP/encryption padding (A domain name)/1.apk to the server where SLB-2 is located.
  • Step 6 After the proxy server SLB-2 receives the request sent by the requester, it judges that its format conforms to the preset format, and performs stripping, decryption and restoration of the request, and obtains the original original URL in the encrypted information, which is sent by the proxy server SLB-2 locally.
  • the cache responds the corresponding resource file to the requester.
  • the load balancer of the proxy server when applying the scheduling method in the present disclosure, when the load balancer of the proxy server needs to schedule the request, it sends the redirection information and adds the address of the target proxy server corresponding to the original URL of the request into the re-entry In the orientation information, the requester is instructed to initiate a redirection request to the target proxy server, and obtain the requested resource file from the target proxy server. Request information and resource files do not need to be scheduled and transmitted between proxy servers. While load balancing is achieved, bandwidth waste caused by internal scheduling is effectively reduced, and stand-alone service capabilities are improved.
  • Fig. 2 is a block diagram of a scheduling apparatus according to an exemplary embodiment.
  • the scheduling apparatus is applied to a proxy server, and includes: a request receiving module 201 , a judging module 202 , a parsing module 203 , and a scheduling module 204 .
  • the request receiving module 201 is configured to receive a request from a requester.
  • the judging module 202 is configured to determine whether the requested format conforms to the preset format.
  • the parsing module 203 is configured to, if the format of the request does not conform to the preset format, determine that the requested URL is the original URL, and determine the corresponding target proxy server according to the original URL.
  • the scheduling module 204 is configured to, when the target proxy server is not the local proxy server, construct redirection information in a preset format and send it to the requester.
  • the scheduling module is also configured to determine that the requested URL is the original URL if the requested format does not conform to the preset format, and to determine the corresponding target proxy server according to the original URL;
  • the scheduling module constructing redirection information in a preset format includes: constructing redirection information according to preset rules based on the address and original URL of the target proxy server.
  • the redirection information constructed according to the preset rules includes:
  • Fig. 3 is a block diagram of a scheduling apparatus according to an exemplary embodiment.
  • the scheduling apparatus further includes a first processing module 301 .
  • the first processing module 301 is configured to obtain the original URL of the request if the requested format conforms to the preset format;
  • the resource file that responds to the request based on the original URL is the resource file that responds to the request based on the original URL.
  • Fig. 4 is a block diagram of a scheduling apparatus according to an exemplary embodiment.
  • the scheduling apparatus further includes a second processing module 401 .
  • the second processing module 401 is configured to respond to the requested resource file when the target proxy server is a local proxy server; and discard the request when the target proxy server is not a local proxy server.
  • the parsing module is further configured to obtain the original URL of the request if the format of the request conforms to the preset format; and determine the corresponding target proxy server according to the original URL.
  • Getting the original URL of the request includes:
  • the scheduling module is also configured to respond to the requested resource file when the target proxy server is the local proxy server.
  • Determining the corresponding target proxy server according to the original URL includes: determining the corresponding target proxy server according to a preset consistent hash algorithm for the original URL.
  • FIG. 5 is a block diagram of a computer device 500 for scheduling according to an exemplary embodiment.
  • computer device 500 may be provided as a server.
  • the computer device 500 includes a processor 501, and the number of the processors can be set to one or more as required.
  • Computer device 500 also includes memory 502 for storing instructions executable by processor 501, such as application programs. The number of memories can be set to one or more as required. It can store one or more applications.
  • the processor 501 is configured to execute instructions to perform the scheduling method described above.
  • embodiments of the present disclosure may be provided as a method, an apparatus (apparatus), or a computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied therein.
  • 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 disk (DVD) or other optical disk storage, magnetic cartridges, magnetic tape, magnetic disk storage or other magnetic storage devices, or may be used for Any other medium that stores desired information and can be accessed by a computer, etc.
  • 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 can include any information delivery media, as is well known to those of ordinary skill in the art .
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions
  • the means implements the functions specified in one or more of the flowcharts and/or one or more blocks of the block diagrams
  • the terms “comprising”, “comprising” or any other variation thereof are intended to encompass a non-exclusive inclusion such that an article or device comprising a list of elements includes not only those elements, but also elements not expressly listed. other elements, or elements inherent to the article or equipment. Without further limitation, an element defined by the phrase “comprising” does not preclude the presence of additional identical elements in the article or device comprising said element.
  • the egress bandwidth of the server network card can be fully utilized, the egress bandwidth consumption caused by internal scheduling can be reduced, and the service capability of a single machine can be improved.

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

本公开是关于一种调度方法、装置、介质及设备,调度方法应用于代理服务器,包括:接收请求端的请求;确定请求的格式是否符合预设格式;若请求的格式不符合预设格式,确定请求的URL为原始URL,根据原始URL确定对应的目标代理服务器;当目标代理服务器不是本机代理服务器时,构造预设格式的重定向信息,发送至所述请求端。

Description

调度方法、装置、介质及设备
本公开基于2021年03月31日提交中国专利局、申请号为202110352753.9,发明名称为“一种调度方法、装置、介质及设备”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本公开作为参考。
技术领域
本公开实施例涉及但不限于一种调度方法、装置、介质及设备。
背景技术
相关技术中,服务器提供服务的出口带宽会小于网卡的出口带宽,主要原因为一部分的带宽流量消耗在内部调度上。以现有云分发缓存架构为例,每台服务器可能同时提供负载均衡器和缓存代理服务,当服务器接收到客户端或其他缓存代理的请求后,会根据请求的URL进行调度,将请求调度到提供缓存代理服务的服务器上,对于其中一个缓存代理来说,平均每接收4个请求,其中的3个请求可能是由其他服务器上的负载均衡器器调度过来的,在对请求进行响应后,其中的3个请求的响应也会原路返回至对应的负载均衡器所在的服务器,导致3/4的带宽消耗在了内部调度上。可见,由于架构的限制,相当大的一部分带宽消耗在了内部调度上,浪费了缓存代理的带宽,限制了单机的服务能力。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
为克服相关技术中存在的问题,本公开提供一种调度方法、装置、介质及设备。
根据本公开的第一方面,提供一种调度方法,应用于代理服务器,包括:
接收请求端的请求;
确定所述请求的格式是否符合预设格式;
若所述请求的格式不符合预设格式,确定所述请求的URL为原始URL,根据所述原始URL确定对应的目标代理服务器;
当所述目标代理服务器不是本机代理服务器时,构造预设格式的重定向信息,发送至所述请求端。
在一些示例性的实施例中,所述构造预设格式的重定向信息包括:
基于所述目标代理服务器的地址、所述原始URL,按预设规则构造为重定向信息。
在一些示例性的实施例中,所述基于所述目标代理服务器的地址、所述原始URL,按预设规则构造为重定向信息包括:
将所述原始URL和/或所述目标代理服务器的地址加密为加密信息,并将所述加密信息填充到所述重定向信息中。
在一些示例性的实施例中,调度方法还包括:
若所述请求的格式符合预设格式,获取所述请求的原始URL;
根据所述原始URL响应所述请求的资源文件。
在一些示例性的实施例中,调度方法还包括:
若所述请求的格式符合预设格式,获取所述请求的原始URL;
根据所述原始URL确定对应的目标代理服务器;
当所述目标代理服务器为本机代理服务器时,响应所述请求的资源文件;当所述目标代理服务器不是本机代理服务器时,丢弃所述请求。
在一些示例性的实施例中,获取所述请求的原始URL包括:
解密所述重定向信息中的加密信息,获取原始URL。
在一些示例性的实施例中,调度方法还包括:
当所述目标代理服务器为本机代理服务器时,响应所述请求的资源文件。
在一些示例性的实施例中,根据所述原始URL确定对应的目标代理服务器,包括:对所述原始URL根据预设的一致性哈希算法确定对应的目标代理服务器。
根据本公开的另一方面,提供一种调度装置,应用于代理服务器,包括:
请求接收模块,设置为接收请求端的请求;
判断模块,设置为确定所述请求的格式是否符合预设格式;
解析模块,设置为若所述请求的格式不符合预设格式,确定所述请求的URL为原始URL,根据所述原始URL确定对应的目标代理服务器;
调度模块,设置为当所述目标代理服务器不是本机代理服务器时,构造预设格式的重定 向信息,发送至所述请求端。
在一些示例性的实施例中,调度模块构造预设格式的重定向信息包括:基于所述目标代理服务器的地址、所述原始URL,按预设规则构造为重定向信息。
在一些示例性的实施例中,基于所述目标代理服务器的地址、所述原始URL,按预设规则构造为重定向信息包括:
将所述原始URL和/或所述目标代理服务器的地址加密为加密信息,并将所述加密信息填充到所述重定向信息中。
在一些示例性的实施例中,调度装置还包括:
第一处理模块,设置为若所述请求的格式符合预设格式,获取所述请求的原始URL;
根据所述原始URL响应所述请求的资源文件。
在一些示例性的实施例中,所述解析模块还设置为若所述请求的格式符合预设格式,获取所述请求的原始URL;根据所述原始URL确定对应的目标代理服务器;
还包括:第二处理模块,设置为当所述目标代理服务器为本机代理服务器时,响应所述请求的资源文件;当所述目标代理服务器不是本机代理服务器时,丢弃所述请求。
在一些示例性的实施例中,所述获取所述请求的原始URL包括:
解密所述重定向信息中的加密信息,获取原始URL。
在一些示例性的实施例中,调度模块还设置为当所述目标代理服务器为本机代理服务器时,响应所述请求的资源文件。
在一些示例性的实施例中,根据所述原始URL确定对应的目标代理服务器,包括:对所述原始URL根据预设的一致性哈希算法确定对应的目标代理服务器。
根据本公开的另一方面,提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被执行时实现调度方法的步骤。根据本公开的另一方面,提供一种计算机设备,包括处理器、存储器和存储于所述存储器上的计算机程序,所述处理器执行所述计算机程序时实现调度方法的步骤。
本公开提供的调度方法,可以充分利用服务器网卡的出口带宽,减少由于内部调度导致的出口带宽消耗,提高单机的服务能力。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制 本公开。在阅读并理解了附图和详细描述后,可以明白其他方面。
附图说明
构成本公开的一部分的附图用来提供对本公开的进一步理解,本公开的示意性实施例及其说明用于解释本公开,并不构成对本公开的不当限定。在附图中:
图1是根据一示例性实施例示出的一种调度方法的流程图。
图2是根据一示例性实施例示出的一种调度装置的框图。
图3是根据一示例性实施例示出的一种调度装置的框图。
图4是根据一示例性实施例示出的一种调度装置的框图。
图5是根据一示例性实施例示出的一种计算机设备的框图。
具体实施方式
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。需要说明的是,在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互任意组合。
代理服务器包括负载均衡器(简称SLB)和缓存代理(简称cache),负载均衡器和缓存代理可以在同一代理服务器上,也可以位于不同代理服务器上。负载均衡器用于接收请求,对接收到的请求进行负载均衡调度,确定请求调度至的目标代理服务器,例如可以对请求的原始URL进行一致性hash计算,进而确定目标代理服务器,实现负载均衡;缓存代理用于缓存请求对应的资源文件,并对请求进行响应。为表述清楚,当负载均衡器调度后的落点位于同一台代理服务器的缓存代理上时,将目标代理服务器称为本机代理服务器。
相关技术中,当前代理服务器的负载均衡器接收请求端的请求,根据预设算法以及请求的原始URL,确定目标代理服务器。当目标代理服务器不是本机代理服务器时,需要对请求进行调度。调度方法为将请求转发至目标代理服务器,目标代理服务器将缓存代理中的与原始URL对应的资源文件发送给当前代理服务器,再由当前代理服务器将资源文件发送至请求端。导致代理服务器的出口带宽有相当大的一部分消耗在了内部调度上。
本公开提供一种调度方法。
图1是根据一示例性实施例示出的调度方法的流程图。参考图1,调度方法应用于代理服务器,包括:
步骤S11,接收请求端的请求。
步骤S12,确定请求的格式是否符合预设格式。
步骤S13,若请求的格式不符合预设格式,确定请求的URL为原始URL,根据原始URL确定对应的目标代理服务器。
步骤S14,当目标代理服务器不是本机代理服务器时,构造预设格式的重定向信息,发送至请求端。
在步骤S11中,在云分发系统中,客户端发送请求,请求到达边缘节点,由边缘节点查询缓存中是否缓存了该请求对应的资源文件,如果有对应的资源文件,由边缘节点响应客户端的请求,如果边缘节点没有缓存客户端请求的资源文件,边缘节点会向源站发起请求,下载对应的资源文件,并缓存。此时客户端为请求端,边缘节点为响应端。当云分发系统比较大时,如果边缘节点没有缓存客户端请求的资源文件,则会向上一级节点(父节点)发起请求,由上一级节点,使用缓存的资源文件或向源站下载资源文件响应边缘节点请求,此时边缘节点为请求端,父节点为响应端。特殊情况下,云分发系统可以有多级节点,发出请求的节点为请求端,响应请求的节点为响应端,在此不再一一详述。在本公开的一实施例中,代理服务器为响应端中典型的服务器,用于接收请求端的请求。
在步骤S12中,代理服务器接收到的请求可以为客户端发送的原始请求,也可以为下级节点转发的客户端的原始请求,或者为下级节点根据客户端的请求而主动发起的请求。在本公开中,将客户端原始请求中的URL定义为原始URL。另外,在本公开中,代理服务器包括负载均衡器和缓存代理,负载均衡器需要对接收到的请求进行调度时,代理服务器可以向请求端发送重定向信息。请求端向目标代理服务器发送重定向信息作为重定向请求,重定向请求与原始请求的格式不同,因此,代理服务器可以对请求的格式进行判断,确定请求的格式是否符合预设格式。在本实施例中,符合预设格式的请求为重定向请求,不符合预设格式的请求为客户端原始请求或者下级节点转发的客户端原始请求,或者为下级节点根据客户端的原始请求而主动发起的请求。
在步骤S13中,若请求的格式不符合预设格式,确定请求的URL为原始URL,根据原始URL确定对应的目标代理服务器。如果请求的格式不符合预设格式,说明该请求为客户端的原始请求,或者下级节点转发的客户端的请求,或者为下级节点根据客户端的原始请求而主动发起的请求,请求的URL为原始URL。例如,代理服务器接收到的客户端的请求,或 者,上级节点中的代理服务器接收到的下级节点转发的客户端的请求,或者上级节点中的代理服务器接收到的下级节点根据客户端的原始请求而主动发起的请求。代理服务器根据原始URL确定目标代理服务器。
在步骤S14中,当目标代理服务器不是本机代理服务器时,需要对请求进行调度。而调度方法为构造预设格式的重定向信息,发送至请求端。请求端向目标代理服务器发送重定向信息,作为重定向请求,向目标代理服务器请求资源文件。
本实施例中,当需要对请求进行调度时,当前代理服务器不再将请求转发至目标代理服务器,而是发送重定向信息给请求端。请求端可以向目标代理服务器发送重定向请求,直接从目标代理服务器获取请求的资源文件,可见,当前代理服务器不需向目标代理服务器转发请求,目标代理服务器也不需将资源文件发送至当前代理服务器,再经当前代理服务器提供给请求端,减少了内部调度的消耗。
在一实施例中,根据原始URL确定对应的目标代理服务器,包括:对原始URL根据预设的一致性哈希算法确定对应的目标代理服务器。对原始URL进行一致性hash计算,确定原始URL对应的目标代理服务器。在云分发系统中,节点中存在多台缓存代理,可以对客户端的请求进行负载均衡,本公开中,代理服务器对原始URL进行一致性hash计算,根据计算结果,确定落点所在的代理服务器为目标代理服务器,以提高请求的命中率。
在一实施例中,当目标代理服务器为本机代理服务器时,响应请求的资源文件。当前代理服务器的负载均衡器根据原始URL确定目标代理服务器为本机代理服务器时,由本机的缓存代理响应请求的资源文件。例如根据一致性hash计算的结果,如果目标代理服务器为本机代理服务器,当前代理服务器将该请求发送给本机服务器上的缓存代理,由本机缓存代理响应该请求的资源文件。这样,如果接收请求的负载均衡器和计算出的缓存代理位为同一代理服务器,可以通过共享内存等方式传递数据。资源文件由当前代理服务器直接向请求端响应,不需要经过其他代理服务器转发,不会产生内部调度的消耗。
在一实施例中,构造预设格式的重定向信息包括:
基于目标代理服务器的地址、原始URL,按预设规则构造为重定向信息。
当前代理服务器根据原始URL确定对应的目标代理服务器后,当目标代理服务器不是本机代理服务器时,需要对请求进行调度。本实施例中,调度方法为构造重定向信息,将重定向信息携带于响应消息中发送至请求端,重定向信息中包括目标代理服务器的地址,以使请求端向目标代理服务器发起请求;重定向信息中还包括原始URL,以便目标代理服务器使用缓存的资源文件,对原始请求进行响应。
目标代理服务器的地址,原始URL可以明文的形式加入重定向信息中,也可以加密的形式加入重定向信息中。因此可以根据需要设定预设规则,确定是否需要对目标代理服务器的地址、原始URL进行加密,如何加密等。对目标代理服务器的地址加密,可以提高代理服务器的安全性,防止地址泄露。对原始URL加密,可以提高信息安全。
在一实施例中,基于目标代理服务器的地址、原始URL,按预设规则构造为重定向信息包括:
将原始URL和/或目标代理服务器的地址加密为加密信息,并将加密信息填充到所述重定向信息中。在本实施例中,代理服务器的负载均衡器可以对原始URL进行加密,包括对整个原始URL进行加密,或者对原始URL中的域名进行加密;也可以对目标代理服务器的地址进行加密;还可以将原始URL和目标代理服务器的地址同时加密,加密为加密信息后,将加密信息填充到重定向响应消息中。例如,目标代理服务器为SLB-2服务器,原始请求为http://A域名/1.apk,重定向响应消息格式如下http://SLB-2服务器IP/加密信息(A域名)/1.apk。SLB-2服务器IP为目标代理服务器的地址,加密信息(A域名)为对原始URL中的域名信息进行加密。
再如,当前代理服务器构造重定向信息,并指定重定向的目标地址。重定向信息包括加密的目标代理服务器的地址,当前代理服务器将重定向信息携带进响应消息,发送至请求端,请求端接收到该重定向信息后,不需要对加密的消息进行解密,只需要进行重定向跟随,即跟随该重定向信息,将重定向信息发送至指定的目标地址,例如可以是DNS服务器,由DNS服务器对加密的目标代理服务器的地址进行解析,最后将请求发送至目标代理服务器。
对重定向信息中的原始URL、目标代理服务器的地址等关键信息进行加密,即使重定向信息在传输过程中被劫持,劫持者也无法获知加密的内容。可以有效地提高信息的安全性和代理服务器的安全性,达到防篡改或恶意攻击的目的。
在一实施例中,调度方法还包括:若请求的格式符合预设格式,获取请求的原始URL;根据原始URL响应所述请求的资源文件。
如果当前代理服务器接收到的请求格式符合预设格式,说明该请求既不是客户端的原始请求,也不是下级节点转发的客户端的请求或下级节点根据客户端的请求而主动发起的请求,而是其他代理服务器重定向后的请求,该请求的URL是经过其他代理服务器处理后的URL,需要从处理后的URL中获取原始URL。由于该请求为预设格式的重定向请求,说明该请求是其他代理服务器接收到原始请求后,对原始URL进行一致性hash计算后,根据一致性hash计算的结果,确定当前代理服务器为目标代理服务器后,重定向到当前代理服务器的请求。 根据预设的负载均衡算法,对于同样的URL,在不同代理服务器上进行哈希计算的结果也是相同的,其落点必然为同一个缓存代理。即该原始URL是由当前代理服务器进行响应的。当前代理服务器使用缓存代理中的资源文件对请求端进行响应。当代理服务器接收到重定向格式的请求后,可以在获取到原始URL后,直接向请求端响应资源文件,加快响应速度。
在一实施例中,调度方法还包括:若请求的格式符合预设格式,获取请求的原始URL;根据原始URL确定对应的目标代理服务器;当目标代理服务器为本机代理服务器时,响应所述请求的资源文件;当目标代理服务器不是本机代理服务器时,丢弃所述请求。
如果当前代理服务器接收到的请求格式符合预设格式,请求为重定向格式的请求,在正常情况下,当前代理服务器可以直接向请求端响应资源文件。但由于节点中的多个代理服务器可能同时执行多个不同服务,除了在响应资源文件请求的服务中会产生重定向信息,其他服务也有可能产生重定向信息,例如IP纠错服务产生的重定向信息,此时可能无法响应正确的内容。因此在本实施例中,当前代理服务器获取请求中的原始URL,再次对重定向请求中的原始URL进行一致性hash计算,如果该请求为正常的重定向响应消息,其结果的落点必定在本机服务器,也就是说计算出的目标代理服务器一定为当前代理服务器,由当前代理服务器向请求端响应资源文件。如果当前代理服务器根据上述重定向请求中的原始URL计算出的目标代理服务器不是当前代理服务器,该请求有可能是其他代理服务器的其他服务产生的重定向信息,例如IP纠错服务产生的重定向信息。为了避免多次重定向影响响应时间,当前代理服务器不再根据计算结果发送重定向信息,而是将请求丢弃。本实施例中,即可以对正常重定向请求进行快速响应,又可以避免其他服务的重定向请求影响正常的请求。
在一实施例中,获取请求的原始URL包括:
解密重定向信息中的加密信息,获取原始URL。当请求为重定向信息,且对原始URL进行加密处理后,代理服务器接收到请求后,对加密的原始URL进行解密,获取加密的内容。加密的内容只有代理服务器能够解密,防止用户信息泄露,增加安全性。
下面通过具体实施例对本公开中的调度方法进一步说明。
具体实施例一
步骤1:请求端发送请求http://A域名/1.apk。
步骤2:代理服务器SLB-1负载均衡器接收请求。
步骤3:代理服务器SLB-1判断该请求的格式是否符合预设格式,经过判断,该请求的格式不符合预设格式,请求的URL为原始URL。
步骤4:代理服务器SLB-1根据预设的一致性hash算法和原始URL,计算出该URL对应的资源文件在代理服务器SLB-2上的cache中,目标服务器为代理服务器SLB-2。于是SLB-1根据代理服务器SLB-2的地址和原始URL,及预设的规则,构造重定向信息,预设的规则为对URL中的域名加密。重定向信息格式如下:http://SLB-2服务器IP/加密信息(A域名)/1.apk。将构造的重定向信息置入302响应消息中,发送至请求端。
步骤5:请求端接收到上述302响应消息,进行重定向跟随,根据302响应消息中的重定向信息发送重定向请求消息至目标代理服务器SLB-2以获取响应内容,具体的,发送http://SLB-2服务器IP/加密填充(A域名)/1.apk至SLB-2所在服务器。
步骤6:代理服务器SLB-2收到请求端发送的请求后,判断其格式符合预设格式,进行请求的剥离与解密还原,得到加密信息中的原始原始URL,由代理服务器SLB-2本机cache将对应的资源文件响应给请求端。
通过以上实施例可知,应用本公开中的调度方法,代理服务器的负载均衡器需要度对请求进行调度时,通过发送重定向信息,并将请求的原始URL对应的目标代理服务器的地址添加入重定向信息中,指示请求端向目标代理服务器发起重定向请求,并从目标代理服务器获取请求的资源文件。请求信息和资源文件不需要在代理服务器之间调度和传递,实现负载均衡的同时,有效较少内部调度导致的带宽浪费,提高单机服务能力。
图2是根据一示例性实施例示出的一种调度装置的框图。参考图2,调度装置应用于代理服务器,包括:请求接收模块201,判断模块202,解析模块203,调度模块204。
该请求接收模块201被配置为接收请求端的请求。
该判断模块202被配置为确定请求的格式是否符合预设格式。
该解析模块203被配置为若所述请求的格式不符合预设格式,确定所述请求的URL为原始URL,根据所述原始URL确定对应的目标代理服务器。
该调度模块204被配置为当所述目标代理服务器不是本机代理服务器时,构造预设格式的重定向信息,发送至请求端。
调度模块还被配置为若请求的格式不符合预设格式,确定请求的URL为原始URL,根据原始URL确定对应的目标代理服务器;
调度模块构造预设格式的重定向信息包括:基于目标代理服务器的地址、原始URL,按预设规则构造为重定向信息。
基于目标代理服务器的地址、原始URL,按预设规则构造为重定向信息包括:
将原始URL和/或目标代理服务器的地址加密为加密信息,并将加密信息填充到重定向信息中。
图3是根据一示例性实施例示出的一种调度装置的框图。参考图3,调度装置还包括第一处理模块301。
该第一处理模块301被配置为若请求的格式符合预设格式,获取请求的原始URL;
根据原始URL响应请求的资源文件。
图4是根据一示例性实施例示出的一种调度装置的框图。参考图4,调度装置还包括第二处理模块401。
该第二处理模块401被配置为当目标代理服务器为本机代理服务器时,响应请求的资源文件;当目标代理服务器不是本机代理服务器时,丢弃请求。
解析模块还被配置为若请求的格式符合预设格式,获取请求的原始URL;根据原始URL确定对应的目标代理服务器。
获取所述请求的原始URL包括:
解密所述重定向信息中的加密信息,获取原始URL。
调度模块还被配置为当目标代理服务器为本机代理服务器时,响应请求的资源文件。
根据原始URL确定对应的目标代理服务器,包括:对原始URL根据预设的一致性哈希算法确定对应的目标代理服务器。
图5是根据一示例性实施例示出的一种用于调度的计算机设备500的框图。例如,计算机设备500可以被提供为一服务器。参照图5,计算机设备500包括处理器501,处理器的个数可以根据需要设置为一个或者多个。计算机设备500还包括存储器502,用于存储可由处理器501的执行的指令,例如应用程序。存储器的个数可以根据需要设置一个或者多个。其存储的应用程序可以为一个或者多个。处理器501被配置为执行指令,以执行上述调度方法。
本领域技术人员应明白,本公开的实施例可提供为方法、装置(设备)、或计算机程序产品。因此,本公开可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本公开可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质上实施的计算机程序产品的形式。计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质,包括但不限于RAM、ROM、EEPROM、闪存或其他存储器 技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质等。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。
本公开是参照根据本公开实施例的方法、装置(设备)和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在本公开中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的物品或者设备中还存在另外的相同要素。
尽管已描述了本公开的具体实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括具体实施例以及落入本公开范围的所有变更和修改。
显然,本领域的技术人员可以对本公开进行各种改动和变型而不脱离本公开的精神和范围。这样,倘若本公开的这些修改和变型属于本公开权利要求及其等同技术的范围之内,则本公开的意图也包含这些改动和变型在内。
工业实用性
本公开中,可以充分利用服务器网卡的出口带宽,减少由于内部调度导致的出口带宽消耗,提高单机的服务能力。

Claims (18)

  1. 一种调度方法,应用于代理服务器,包括:
    接收请求端的请求;
    确定所述请求的格式是否符合预设格式;
    若所述请求的格式不符合预设格式,确定所述请求的URL为原始URL,根据所述原始URL确定对应的目标代理服务器;
    当所述目标代理服务器不是本机代理服务器时,构造预设格式的重定向信息,发送至所述请求端。
  2. 如权利要求1所述的调度方法,其中,所述构造预设格式的重定向信息包括:
    基于所述目标代理服务器的地址、所述原始URL,按预设规则构造为重定向信息。
  3. 如权利要求2所述的调度方法,其中,所述基于所述目标代理服务器的地址、所述原始URL,按预设规则构造为重定向信息包括:
    将所述原始URL和/或所述目标代理服务器的地址加密为加密信息,并将所述加密信息填充到所述重定向信息中。
  4. 如权利要求3所述的调度方法,还包括:
    若所述请求的格式符合预设格式,获取所述请求的原始URL;
    根据所述原始URL响应所述请求的资源文件。
  5. 如权利要求3所述的调度方法,还包括:
    若所述请求的格式符合预设格式,获取所述请求的原始URL;
    根据所述原始URL确定对应的目标代理服务器;
    当所述目标代理服务器为本机代理服务器时,响应所述请求的资源文件;当所述目标代理服务器不是本机代理服务器时,丢弃所述请求。
  6. 如权利要求4或5任一所述的调度方法,其中,所述获取所述请求的原始URL包括:
    解密所述重定向信息中的加密信息,获取原始URL。
  7. 如权利要求1所述的调度方法,还包括:
    当所述目标代理服务器为本机代理服务器时,响应所述请求的资源文件。
  8. 如权利要求1或5任一所述的调度方法,其中,所述根据所述原始URL确定对应的目标代理服务器,包括:对所述原始URL根据预设的一致性哈希算法确定对应的目标代理服 务器。
  9. 一种调度装置,应用于代理服务器,包括:
    请求接收模块,设置为接收请求端的请求;
    判断模块,设置为确定所述请求的格式是否符合预设格式;
    解析模块,设置为若所述请求的格式不符合预设格式,确定所述请求的URL为原始URL,根据所述原始URL确定对应的目标代理服务器;
    调度模块,设置为当所述目标代理服务器不是本机代理服务器时,构造预设格式的重定向信息,发送至所述请求端。
  10. 如权利要求9所述的调度装置,其中,所述调度模块构造预设格式的重定向信息包括:基于所述目标代理服务器的地址、所述原始URL,按预设规则构造为重定向信息。
  11. 如权利要求10所述的调度装置,其中,所述基于所述目标代理服务器的地址、所述原始URL,按预设规则构造为重定向信息包括:
    将所述原始URL和/或所述目标代理服务器的地址加密为加密信息,并将所述加密信息填充到所述重定向信息中。
  12. 如权利要求11所述的调度装置,还包括:
    第一处理模块,设置为若所述请求的格式符合预设格式,获取所述请求的原始URL;
    根据所述原始URL响应所述请求的资源文件。
  13. 如权利要求11所述的调度装置,其中,
    所述解析模块还设置为若所述请求的格式符合预设格式,获取所述请求的原始URL;根据所述原始URL确定对应的目标代理服务器;
    还包括:第二处理模块,设置为当所述目标代理服务器为本机代理服务器时,响应所述请求的资源文件;当所述目标代理服务器不是本机代理服务器时,丢弃所述请求。
  14. 如权利要求12或13任一所述调度装置,其中,所述获取所述请求的原始URL包括:
    解密所述重定向信息中的加密信息,获取原始URL。
  15. 如权利要求9所述的调度装置,其中,所述调度模块还设置为当所述目标代理服务器为本机代理服务器时,响应所述请求的资源文件。
  16. 如权利要求9或13所述的调度装置,其中,所述根据所述原始URL确定对应的目标代理服务器,包括:对所述原始URL根据预设的一致性哈希算法确定对应的目标代理服务器。
  17. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被执行 时实现如权利要求1-8中任意一项所述方法的步骤。
  18. 一种计算机设备,包括处理器、存储器和存储于所述存储器上的计算机程序,其中,所述处理器执行所述计算机程序时实现如权利要求1-8中任意一项所述方法的步骤。
PCT/CN2022/082228 2021-03-31 2022-03-22 调度方法、装置、介质及设备 WO2022206479A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110352753.9A CN115150475B (zh) 2021-03-31 2021-03-31 一种调度方法、装置、介质及设备
CN202110352753.9 2021-03-31

Publications (1)

Publication Number Publication Date
WO2022206479A1 true WO2022206479A1 (zh) 2022-10-06

Family

ID=83405013

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/082228 WO2022206479A1 (zh) 2021-03-31 2022-03-22 调度方法、装置、介质及设备

Country Status (2)

Country Link
CN (1) CN115150475B (zh)
WO (1) WO2022206479A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030097564A1 (en) * 2000-08-18 2003-05-22 Tewari Anoop Kailasnath Secure content delivery system
CN104202362A (zh) * 2014-08-14 2014-12-10 上海帝联信息科技股份有限公司 负载均衡系统及其内容分发方法和装置、负载均衡器
CN106161649A (zh) * 2016-08-30 2016-11-23 常州云端网络科技股份有限公司 一种基于重定向机制的cdn智能调度方法
CN107483614A (zh) * 2017-08-31 2017-12-15 京东方科技集团股份有限公司 基于cdn与p2p网络的内容调度方法及通信网络
CN108123888A (zh) * 2016-11-29 2018-06-05 中兴通讯股份有限公司 报文的负载均衡方法、装置及系统
CN112287259A (zh) * 2020-10-20 2021-01-29 上海七牛信息技术有限公司 一种冷访问回源调度系统及其处理方法

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662464A (zh) * 2008-08-26 2010-03-03 阿里巴巴集团控股有限公司 一种用于实现http请求服务的系统及其方法
US10313478B2 (en) * 2013-05-16 2019-06-04 Telefonaktiebolaget Lm Ericsson (Publ) Redirection in a content delivery network
US10951726B2 (en) * 2013-07-31 2021-03-16 Citrix Systems, Inc. Systems and methods for performing response based cache redirection
WO2014176990A1 (zh) * 2013-10-11 2014-11-06 中兴通讯股份有限公司 节点分配方法、装置及系统
KR20160075698A (ko) * 2013-10-28 2016-06-29 후아웨이 테크놀러지 컴퍼니 리미티드 데이터 서비스 프록시를 리디렉트하기 위한 방법, 장치 및 시스템
CN106131079B (zh) * 2016-08-29 2020-08-11 腾讯科技(北京)有限公司 一种认证方法、系统及代理服务器
CN110581873B (zh) * 2018-06-11 2022-06-14 中国移动通信集团浙江有限公司 一种跨集群重定向方法及监控服务器
CN111800441B (zh) * 2019-04-08 2022-10-11 阿里巴巴集团控股有限公司 数据处理方法、系统、装置、用户端服务器、用户端及管控服务器
CN111953616B (zh) * 2019-05-17 2023-01-31 贵州白山云科技股份有限公司 一种负载均衡调度方法、装置、系统、介质及设备
CN112134960B (zh) * 2020-09-24 2022-03-22 新华三信息安全技术有限公司 一种数据请求方法及装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030097564A1 (en) * 2000-08-18 2003-05-22 Tewari Anoop Kailasnath Secure content delivery system
CN104202362A (zh) * 2014-08-14 2014-12-10 上海帝联信息科技股份有限公司 负载均衡系统及其内容分发方法和装置、负载均衡器
CN106161649A (zh) * 2016-08-30 2016-11-23 常州云端网络科技股份有限公司 一种基于重定向机制的cdn智能调度方法
CN108123888A (zh) * 2016-11-29 2018-06-05 中兴通讯股份有限公司 报文的负载均衡方法、装置及系统
CN107483614A (zh) * 2017-08-31 2017-12-15 京东方科技集团股份有限公司 基于cdn与p2p网络的内容调度方法及通信网络
CN112287259A (zh) * 2020-10-20 2021-01-29 上海七牛信息技术有限公司 一种冷访问回源调度系统及其处理方法

Also Published As

Publication number Publication date
CN115150475A (zh) 2022-10-04
CN115150475B (zh) 2024-07-26

Similar Documents

Publication Publication Date Title
US11038854B2 (en) Terminating SSL connections without locally-accessible private keys
US20240056479A1 (en) Bot detection in an edge network using Transport Layer Security (TLS) fingerprint
US8200971B2 (en) Method for the provision of a network service
US10009336B2 (en) Network security system to validate a server certificate
US11665082B2 (en) Sandbox environment for testing integration between a content provider origin and a content delivery network
US11303431B2 (en) Method and system for performing SSL handshake
US11671413B2 (en) Caching content securely within an edge environment, with pre-positioning
US9137218B2 (en) Splicing into an active TLS session without a certificate or private key
US11924491B2 (en) Securing an overlay network against attack
US10084605B2 (en) Caching of encrypted content
US20160149913A1 (en) Access Control in an Information Centric Network
US11659033B2 (en) Caching content securely within an edge environment
US10142306B1 (en) Methods for providing a secure network channel and devices thereof
WO2022206479A1 (zh) 调度方法、装置、介质及设备
WO2023093772A1 (zh) 一种请求调度的方法、装置、电子设备及存储介质
Kang Efficient botnet herding within the Tor network
US20240223533A1 (en) System and methods for filtering in oblivious deployments and devices thereof
Kim et al. TLS Goes Low Cost: When TLS Meets Edge
WO2024148129A1 (en) System and methods for filtering in oblivious deployments and devices thereof
CN116827619A (zh) 防止http放大攻击的方法、设备以及计算机可读介质
Vidal et al. SCoT: A secure content-oriented transport
CN114338056A (zh) 基于云分发的网络访问方法及其系统、介质、设备
GB2473827A (en) Provision of a network service

Legal Events

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

Ref document number: 22778662

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22778662

Country of ref document: EP

Kind code of ref document: A1