CPC H04L 67/02 (2013.01) [H04L 61/4511 (2022.05); H04L 67/1008 (2013.01)] | 6 Claims |
1. An HttpDNS scheduling method comprising:
receiving a domain name resolution request from a client, the domain name resolution request including a customized parameter related to accessing resources; wherein the customized parameter includes at least one of a user parameter, a file type parameter, or a URL parameter;
resolving the domain name resolution request and determining a target server based on the customized parameter; and
returning an IP address of the target server to the client;
wherein resolving the domain name resolution request and determining the target server based on the customized parameter includes:
determining a target node according to a user real IP and a node resource coverage plan, wherein the node resource coverage plan specifies areas covered by resources of each node, and the each node comprises servers for providing the resources ;
in response to obtaining the customized parameter in the domain name resolution request, determining one or more candidate servers from all servers in the target node based on the customized parameter;
in response to not obtaining the customized parameter in the domain name resolution request, determining all servers in the target node as the one or more candidate servers; and
determining the target server according to a current state of each of the one or more candidate servers;
wherein determining the one or more candidate servers from all servers in the target node based on the customized parameter includes:
in response to the customized parameter including a single parameter,
determining the one or more candidate servers according to the single parameter; and
in response to the customized parameter including a plurality of parameters, determining the one or more candidate server in order of priority of the plurality of parameters, including:
determining a first candidate server according to one of the plurality of parameters that has a highest priority; and
in response to a load capacity of the first candidate server is less than a preset threshold, determining a second candidate server according to another one of the plurality of parameters that has a next highest priority; and
wherein determining the target server includes, in response to a load capacity of each of the one or more candidate servers being greater than the preset threshold, determining one or more target servers from the one or more candidate servers.
|