CN109302498B - Network resource access method and device - Google Patents

Network resource access method and device Download PDF

Info

Publication number
CN109302498B
CN109302498B CN201811445868.7A CN201811445868A CN109302498B CN 109302498 B CN109302498 B CN 109302498B CN 201811445868 A CN201811445868 A CN 201811445868A CN 109302498 B CN109302498 B CN 109302498B
Authority
CN
China
Prior art keywords
service server
address
web server
client
target
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.)
Active
Application number
CN201811445868.7A
Other languages
Chinese (zh)
Other versions
CN109302498A (en
Inventor
李娅
易盼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou DPtech Information Technology Co Ltd
Original Assignee
Hangzhou DPTech Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201811445868.7A priority Critical patent/CN109302498B/en
Publication of CN109302498A publication Critical patent/CN109302498A/en
Application granted granted Critical
Publication of CN109302498B publication Critical patent/CN109302498B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/1004Server selection for load balancing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Hardware Redundancy (AREA)

Abstract

The application provides a network resource access method and a device, comprising the following steps: receiving a DNS request sent by a client; the DNS request carries a target domain name to be accessed by the client; determining an IP address corresponding to the target domain name; if the determined IP address is the virtual IP address of the target Web server cluster, detecting the state of each service server in the target Web server cluster; and if all the service servers are in an abnormal state, returning the virtual IP address of the backup Web server cluster to the client so that the client accesses network resources based on the virtual IP address of the backup Web server cluster. By using the method provided by the application, the problem of network access interruption of the client caused by the abnormality of the service server in the target Web server cluster can be prevented.

Description

Network resource access method and device
Technical Field
The present application relates to the field of computer communications, and in particular, to a method and an apparatus for accessing network resources.
Background
A Web server cluster typically includes a load balancing device, and at least one traffic server. The load balancing device can be used for carrying out load balancing processing on the network access request sent by the client. The service server is mainly used for processing the network access request forwarded by the load balancing equipment.
The cluster of Web servers is configured with a virtual IP address. The client may access a network resource in the Web server cluster based on the virtual IP address of the Web server cluster.
For example, when a client accesses a network resource of the Web server cluster, the client may send a network access request to the Web server cluster based on the virtual IP address. After receiving a network access request sent by a client, the load balancing device in the Web server cluster can send the network access request to a selected service server for processing based on a load balancing algorithm.
However, when all the service servers in the Web server cluster are abnormal, the network access request sent by the client cannot be processed, thereby causing the interruption of the network access of the client.
Disclosure of Invention
In view of this, the present application provides a method and an apparatus for accessing a network resource, so as to prevent a problem of network access interruption of a client due to an abnormality of a service server in a target Web server cluster.
Specifically, the method is realized through the following technical scheme:
according to a first aspect of the present application, a network resource access method is provided, where the method is applied to a load balancing device in a target Web server cluster, where the target Web server cluster is configured with a backup Web server cluster, and the method includes:
receiving a DNS request sent by a client; the DNS request carries a target domain name to be accessed by the client;
determining an IP address corresponding to the target domain name;
if the determined IP address is the virtual IP address of the target Web server cluster, detecting the state of each service server in the target Web server cluster;
and if all the service servers are in an abnormal state, returning the virtual IP address of the backup Web server cluster to the client so that the client accesses network resources based on the virtual IP address of the backup Web server cluster.
Optionally, the method further includes:
and if at least one service server in the service servers is in a normal state, returning the virtual IP address of the target Web server cluster to the client so that the client accesses network resources based on the virtual IP address of the target Web server cluster.
Optionally, the method further includes:
and if the determined IP address is not the virtual IP address of the target Web server cluster, returning the determined IP address to the client so that the client accesses the network resource based on the returned IP address.
Optionally, each service server in the target Web server cluster is divided into a plurality of service server groups, where one service server group is a main service server group, and the other service server groups are backup service server groups of the main service server group;
the method further comprises the following steps:
receiving a network access request sent by the client;
if all the service servers in the main service server group are abnormal, selecting a first target service server in the backup service server group based on a preset load balancing algorithm;
and sending the network access request to the first target service server so as to process the network access request by the first target service server.
Optionally, the method further includes:
and if the normal service server exists in the main service server group, selecting a second target service server from the normal service servers based on a preset load balancing algorithm so as to process the network access request by the second target service server.
According to a second aspect of the present application, there is provided a network resource access apparatus, where the apparatus is applied to a load balancing device in a target Web server cluster, where the target Web server cluster is configured with a backup Web server cluster, and the apparatus includes:
the receiving unit is used for receiving a DNS request sent by a client; the DNS request carries a target domain name to be accessed by the client;
a determining unit, configured to determine an IP address corresponding to the target domain name;
the detection unit is used for detecting the state of each service server in the target Web server cluster if the determined IP address is the virtual IP address of the target Web server cluster;
and the return unit is used for returning the virtual IP address of the backup Web server cluster to the client if each service server is in an abnormal state so that the client accesses network resources based on the virtual IP address of the backup Web server cluster.
Optionally, the returning unit is further configured to return the virtual IP address of the target Web server cluster to the client if at least one of the service servers is in a normal state, so that the client accesses a network resource based on the virtual IP address of the target Web server cluster.
Optionally, the returning unit is further configured to, if the determined IP address is not the virtual IP address of the target Web server cluster, return the determined IP address to the client, so that the client accesses the network resource based on the returned IP address.
Optionally, each service server in the target Web server cluster is divided into a plurality of service server groups, where one service server group is a main service server group, and the other service server groups are backup service server groups of the main service server group;
the device further comprises:
the network access processing unit is specifically used for receiving a network access request sent by the client; if all the service servers in the main service server group are abnormal, selecting a first target service server in the backup service server group based on a preset load balancing algorithm; and sending the network access request to the first target service server so as to process the network access request by the first target service server.
Optionally, the network access processing unit is further specifically configured to, if a normal service server exists in the main service server group, select a second target service server from the normal service servers based on a preset load balancing algorithm, so that the second target service server processes the network access request.
As can be seen from the above description, on one hand, when the load balancing device returns the virtual IP address of the target Web server cluster to the client as the network resource access address, it is detected whether the service server in the target Web server cluster can provide network resources for the client, and when it is detected that each service server in the target Web server cluster is abnormal, the load balancing device returns the IP address of the backup Web server cluster to the client as the network resource access address, so that the backup Web server cluster replaces the Web server cluster to provide network resources for the client, thereby preventing the service interruption of the client.
On the other hand, the mechanism of the main service server group and the backup service server group is adopted in the target Web server cluster to process the received network access request. After receiving the network access request, if each service server in the main service server group in the Web server cluster is abnormal, the network access request from the client can be sent to the backup service group for processing, and the interruption of the client service is further prevented.
Drawings
FIG. 1 is a schematic diagram of a conventional networking for network resource access;
FIG. 2 is a schematic diagram illustrating a network resource access networking according to an exemplary embodiment of the present application;
FIG. 3 is a flow chart illustrating a method for network access to resources according to an exemplary embodiment of the present application;
FIG. 4 is a block diagram illustrating a network access resource device according to an exemplary embodiment of the present application;
fig. 5 is a hardware structure diagram of a load balancing apparatus according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Referring to fig. 1, fig. 1 is a schematic diagram of a conventional networking for accessing network resources.
The existing networking for network resource access comprises a user terminal and a Web server cluster. The Web server cluster comprises: load balancing equipment and at least one service server.
After the load balancing device in the Web server cluster receives the network access request sent by the client, the load balancing device may select one service server from at least one service server based on a preset load balancing algorithm, and the service server processes the network access request.
However, when all the service servers in the Web server cluster are abnormal, the Web server cluster cannot process the network access request, thereby causing interruption of the network access of the client.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating a network resource access networking according to an exemplary embodiment of the present application.
The network resource access networking shown in the application comprises the following steps: the system comprises a client, a target Web server cluster and a backup Web server cluster.
The target Web server cluster described in the present application is any Web server cluster, and the present application configures a backup Web server cluster for the target Web server cluster. The network resources provided by the target Web server cluster and the backup Web server cluster for the client are the same.
The target Web server cluster comprises a load balancing device and at least one service server group, wherein each service server group comprises at least one service server. One of the service server groups is a main service server group, and the other service server groups are backup service server groups.
For example, as shown in fig. 2, the target Web server cluster includes two service server groups, i.e., a service server group 1 and a service server group 2.
The service server group 1 is a main service server group, and the service server group 2 is a backup service server group.
The backup Web server cluster also comprises load balancing equipment and at least one service server group, and each service server group comprises at least one service server. One of the service server groups is a main service server group, and the other service server groups are backup service server groups.
For example, as shown in fig. 2, the target Web server cluster includes two service server groups, i.e., a service server group 3 and a service server group 4.
The service server group 3 is a main service server group, and the service server group 4 is a backup service server group.
In this embodiment of the application, when a load balancing device in a target Web server cluster receives a DNS request sent by a client, if an IP address corresponding to a domain name carried in the DNS request is a virtual IP address in the target Web server cluster, the load balancing device detects a state of each service server. And if the service server states are all abnormal states, returning the virtual IP address of the backup Web server cluster of the target Web server cluster to the client so that the backup Web server cluster replaces the target Web server cluster to provide network resources for the client.
When the load balancing device returns the virtual IP address of the target Web server cluster to the client as the network resource access address, whether the service server in the target Web server cluster can provide network resources for the client is detected, and when the abnormality of each service server in the target Web server cluster is detected, the IP address of the backup Web server cluster is returned to the client so that the backup Web server cluster replaces the Web server cluster to provide network resources for the client, thereby preventing the interruption of the client service.
For convenience of description, the virtual IP address of the target Web server cluster is referred to as a first virtual IP address, and the virtual IP address of the backup Web server cluster is referred to as a second virtual IP address. A service server in the target Web server cluster is called a first service server, and a load balancing device in the target Web server cluster is called a first load balancing device. And the service server in the backup Web server cluster is called a second service server, and the load balancing equipment in the backup Web server cluster is called second load balancing equipment.
The first and second terms are not intended to be actual or to indicate quantities, and are merely used for convenience of description.
Referring to fig. 3, fig. 3 is a flowchart illustrating a method for accessing a resource through a network according to an exemplary embodiment of the present application, where the method is applicable to a load balancing device (i.e., a first load balancing device) in a target Web server cluster, where the target Web server cluster is configured with a backup Web server cluster, and the method may include the following steps.
Step 301: the first load balancing equipment can receive a DNS request sent by a client; the DNS request carries a target domain name to be accessed by the client;
step 302: the first load balancing device may determine an IP address corresponding to the target domain name.
When the method is implemented, after the first load balancing device receives the DNS request sent by the client, the target domain name to be accessed by the client, which is carried in the DNS request, can be obtained.
Then, the first load balancing device may search for an IP address corresponding to the target domain name in a preset correspondence between a plurality of domain names and IP addresses.
Step 303: and if the IP address determined by the first load balancing equipment is the virtual IP address of the target Web server cluster, detecting the state of each service server in the target Web server cluster.
When the method is implemented, the first load balancing device can detect whether the determined IP address corresponding to the target domain name is the first virtual IP address.
And if the IP address corresponding to the target domain name is not the first virtual IP address, returning the IP address corresponding to the target domain name to the client, and accessing the network resource by the client based on the IP address corresponding to the target domain name.
And if the IP address corresponding to the target domain name is the first virtual IP address, checking the state of each service server in the target Web server cluster.
For example, assume that the first virtual IP address is IP 2.
And when the determined IP address corresponding to the target domain name is IP1, returning the IP1 to the client so that the client can access the network resource corresponding to the IP 1.
And when the IP address corresponding to the determined target domain name is IP2, detecting the state of each service server in the target Web virtual server.
During detection, for each service server, the first load balancing device may read the recorded state of the service server, where the state of the service server includes a normal state and an abnormal state. The first load balancing device may determine whether the service server is in a normal state or an abnormal state by the read state of the service server.
The recorded status of each service server in the target Web server cluster is continuously updated, and the updating method is as follows.
The first load balancing equipment can periodically send detection messages to each service server;
for each service server, if a response message aiming at the detection message returned by the service server is received within a preset time length, updating the state corresponding to the service server to be a normal state; and if the response message aiming at the detection message returned by the server is not received within the preset time length, updating the state corresponding to the server to be an abnormal state.
Step 304: and if all the service servers are in an abnormal state, the first load balancing equipment returns the virtual IP address of the backup Web server cluster to the client so that the client accesses the network resources in the backup Web server cluster based on the virtual IP address of the backup Web server cluster.
1) And if the states of all the service servers in the target Web server cluster are abnormal states.
If the states of the service servers in the target Web server cluster are all abnormal states, the first load balancing device may return the virtual IP address (i.e., the second virtual IP address) of the backup Web server cluster in the target Web server cluster to the client.
After receiving the second virtual IP address, the client may construct a network access request packet, where a destination IP address of the network access request packet is the second virtual IP address, and then the client may send the network access request packet to the backup Web server cluster to access the network resource.
2) If the target Web server cluster has the service server in the normal state
If the service server in the normal state exists in the target Web server cluster, the first load balancing device may return the first virtual IP address to the client.
After receiving the first virtual IP address, the client may construct a network access request packet, where a destination IP address of the network access request packet is the first virtual IP address, and then the client may send the network access request packet to a target Web server cluster to access a network resource.
It should be noted that the network resources provided by the target Web server cluster and the backup Web server cluster are the same, so when each service server in the target Web server cluster is abnormal, the first load balancing device may return the second virtual IP address of the backup Web server cluster to the client, so that the client may access the network resources provided by the backup Web server cluster based on the second virtual IP address, and thus the backup Web server cluster may provide the network resources for the client instead of the target Web server cluster.
In addition, the present application also provides a mechanism for how a Web server cluster processes a network access request, which is specifically shown as follows.
Specifically, each service server in the target Web server cluster is divided into a plurality of service server groups, wherein one service server group is a main service server group, and the other service server groups are backup service server groups of the main service server group.
After receiving a network access request sent by a client, the first load balancing device can determine the state of each service server in the main service server group in the target Web server cluster.
If all the service servers of the main service server group are abnormal, selecting a first target service server from the backup service server group based on a preset load balancing algorithm, and sending the network access request to the first target service server so that the first target service server processes the network access request.
And if the normal service server exists in the main service server group, selecting a second target service server from the normal service servers based on a preset load balancing algorithm so as to process the network access request by the second target service server.
Of course, the backup Web server cluster may also use the above mechanism when processing a network access request from a client, which is not described herein again.
As can be seen from the above description, on one hand, when the load balancing device returns a network resource access address to the client, it is detected whether the service server in the target Web server cluster can provide a network resource for the client, and when it is detected that each service server in the target Web server cluster is abnormal, an IP address of the backup Web server cluster is returned to the client as the network resource access address, so that the backup Web server cluster replaces the Web server cluster to provide a network resource for the client, thereby preventing the interruption of the client service.
On the other hand, the mechanism of the main service server group and the backup service server group is adopted in the target Web server cluster to process the received network access request. After receiving the network access request, if each service server in the main service server group in the Web server cluster is abnormal, the network access request from the client can be sent to the backup service group for processing, and the interruption of the client service is further prevented.
The network resource access method provided by the present application is described in detail below by way of specific examples and with reference to fig. 2.
Assume that the virtual IP address of the target Web server cluster is IP2 and the virtual IP address of the backup Web server cluster is IP 22.
The service server group 1 in the target Web server cluster is a main service server group, and the service server group 2 is a backup service server group.
The service server group 3 in the backup Web server cluster is a main service server group, and the service server group 4 is a backup service server group.
Assume that the client sends two DNS requests, DNS request 1 and DNS request 2, respectively, to the first load balancing device. The domain name carried in the DNS request 1 is domain name 1. The domain name carried in DNS request 2 is domain name 2.
Assume that the IP address corresponding to domain name 1 is IP1 and the IP address corresponding to domain name 2 is IP 2.
1) For DNS request 1
When a first load balancing device DNS request 1, an IP address (i.e., IP1) corresponding to domain name 1 carried by the DNS request 1 may be determined.
Then, the first load device determines whether the IP address corresponding to the domain name 1 is the same as the virtual IP address of the target Web server cluster.
In this example, the first load device determines that the IP address corresponding to domain name 1 (i.e., IP1) is not the same as the virtual IP address of the target cluster of Web servers (i.e., IP2), and the first load balancing device may return IP1 to the client for the client to access the network resource corresponding to IP 1.
2) For DNS request 2
When the first load balancing device DNS request 2, an IP address (i.e., IP2) corresponding to the domain name 2 carried by the DNS request 2 may be determined.
Then, the first load device determines whether the IP address corresponding to the domain name 2 is the same as the virtual IP address of the target Web server cluster.
In this example, the first load device determines that the IP address corresponding to domain name 2 (i.e., IP2) is the same as the virtual IP address of the target Web server cluster (i.e., IP2), then the status of the service servers in the target Web cluster can be checked.
And if the states of all the service servers in the target Web cluster are abnormal states, returning IP22 to the client so that the client sends a network access request to the backup Web server cluster based on IP 22.
If normal service servers exist in the target Web cluster, returning IP2 to the client so that the client sends a network access request to the target Web server cluster based on IP 2.
For the first load balancing device:
after the first load balancing device receives the network access request sent by the client, the first load device may detect the states of the service servers in the service server group 1.
If a normal service server exists in the service server group 1, the first load balancing device selects a service server from the normal service servers based on a preset load balancing algorithm, and sends the network access request to the selected service server for processing.
If all the service servers in the service server group 1 are abnormal, the second load balancing device selects a service server in the service server group 2 based on a preset load balancing algorithm, and sends the network access request to the selected service server for processing.
For the second load balancing device:
when the second load balancing device receives the network access request sent by the client, the second load device may detect the status of each service server in the service server group 3.
If a normal service server exists in the service server group 3, the second load balancing device selects a service server from the normal service servers based on a preset load balancing algorithm, and sends the network access request to the selected service server for processing.
If the servers in each month in the service server group 3 are abnormal, the second load balancing device selects a service server in the service server group 4 based on a preset load balancing algorithm, and sends the network access request to the selected service server for processing.
The above is a description of a network resource access method.
Correspondingly, the application also provides a network resource access device corresponding to the network resource access method.
Referring to fig. 4, fig. 4 is a block diagram illustrating a network access resource device according to an exemplary embodiment of the present application. The device can be applied to load balancing equipment in a target Web server cluster and can comprise the following units.
A receiving unit 401, configured to receive a DNS request sent by a client; the DNS request carries a target domain name to be accessed by the client;
a determining unit 402, configured to determine an IP address corresponding to the target domain name;
a detecting unit 403, configured to detect a state of each service server in the target Web server cluster if the determined IP address is the virtual IP address of the target Web server cluster;
a returning unit 404, configured to return the virtual IP address of the backup Web server cluster to the client if each of the service servers is in an abnormal state, so that the client accesses a network resource based on the virtual IP address of the backup Web server cluster.
Optionally, the returning unit 404 is further configured to, if at least one of the service servers is in a normal state, return the virtual IP address of the target Web server cluster to the client, so that the client accesses a network resource based on the virtual IP address of the target Web server cluster.
Optionally, the returning unit 404 is further configured to, if the determined IP address is not the virtual IP address of the target Web server cluster, return the determined IP address to the client, so that the client accesses the network resource based on the returned IP address.
Optionally, each service server in the target Web server cluster is divided into a plurality of service server groups, where one service server group is a main service server group, and the other service server groups are backup service server groups of the main service server group;
the device further comprises:
a network access processing unit 405 (not shown in fig. 4), specifically configured to receive a network access request sent by the client; if all the service servers in the main service server group are abnormal, selecting a first target service server in the backup service server group based on a preset load balancing algorithm; and sending the network access request to the first target service server so as to process the network access request by the first target service server.
Optionally, the network access processing unit 405 is further specifically configured to, if a normal service server exists in the main service server group, select a second target service server from the normal service servers based on a preset load balancing algorithm, so that the second target service server processes the network access request.
Correspondingly, the application also provides a hardware structure diagram corresponding to the device shown in FIG. 4.
Referring to fig. 5, fig. 5 is a hardware structure diagram of a load balancing apparatus according to an exemplary embodiment of the present application.
The load balancing apparatus includes: a communication interface 501, a processor 502, a machine-readable storage medium 503, and a bus 504; wherein the communication interface 501, the processor 502 and the machine-readable storage medium 503 are in communication with each other via the bus 404. The processor 502 may perform the network resource access methods described above by reading and executing machine-executable instructions in the machine-readable storage medium 503 corresponding to the network resource access control logic.
The machine-readable storage medium 503 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: volatile memory, non-volatile memory, or similar storage media. In particular, the machine-readable storage medium 503 may be a RAM (random Access Memory), a flash Memory, a storage drive (e.g., a hard disk drive), a solid state disk, any type of storage disk (e.g., a compact disk, a DVD, etc.), or similar storage medium, or a combination thereof.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. A network resource access method is applied to a load balancing device in a target Web server cluster, wherein the target Web server cluster is configured with a backup Web server cluster, and the method comprises the following steps:
receiving a DNS request sent by a client; the DNS request carries a target domain name to be accessed by the client;
determining an IP address corresponding to the target domain name;
if the determined IP address is the virtual IP address of the target Web server cluster, detecting the state of each service server in the target Web server cluster;
and if all the service servers are in an abnormal state, returning the virtual IP address of the backup Web server cluster to the client so that the client accesses network resources based on the virtual IP address of the backup Web server cluster.
2. The method of claim 1, further comprising:
and if at least one service server in the service servers is in a normal state, returning the virtual IP address of the target Web server cluster to the client so that the client accesses network resources based on the virtual IP address of the target Web server cluster.
3. The method of claim 1, further comprising:
and if the determined IP address is not the virtual IP address of the target Web server cluster, returning the determined IP address to the client so that the client accesses the network resource based on the returned IP address.
4. The method of claim 1, wherein each service server in the target Web server cluster is divided into a plurality of service server groups, one of the service server groups is a main service server group, and the other service server groups are backup service server groups of the main service server group;
the method further comprises the following steps:
receiving a network access request sent by the client;
if all the service servers in the main service server group are abnormal, selecting a first target service server in the backup service server group based on a preset load balancing algorithm;
and sending the network access request to the first target service server so as to process the network access request by the first target service server.
5. The method of claim 4, further comprising:
and if the normal service server exists in the main service server group, selecting a second target service server from the normal service servers based on a preset load balancing algorithm so as to process the network access request by the second target service server.
6. A network resource access apparatus, applied to a load balancing device in a target Web server cluster, where the target Web server cluster is configured with a backup Web server cluster, the apparatus comprising:
the receiving unit is used for receiving a DNS request sent by a client; the DNS request carries a target domain name to be accessed by the client;
a determining unit, configured to determine an IP address corresponding to the target domain name;
the detection unit is used for detecting the state of each service server in the target Web server cluster if the determined IP address is the virtual IP address of the target Web server cluster;
and the return unit is used for returning the virtual IP address of the backup Web server cluster to the client if each service server is in an abnormal state so that the client accesses network resources based on the virtual IP address of the backup Web server cluster.
7. The apparatus of claim 6, wherein the returning unit is further configured to return the virtual IP address of the target Web server cluster to the client if at least one of the service servers is in a normal state, so that the client accesses a network resource based on the virtual IP address of the target Web server cluster.
8. The apparatus of claim 6, wherein the returning unit is further configured to return the determined IP address to the client if the determined IP address is not the virtual IP address of the target Web server cluster, so that the client accesses the network resource based on the returned IP address.
9. The apparatus of claim 6, wherein each service server in the target Web server cluster is divided into a plurality of service server groups, one of the service server groups is a main service server group, and the other service server groups are backup service server groups of the main service server group;
the device further comprises:
the network access processing unit is specifically used for receiving a network access request sent by the client; if all the service servers in the main service server group are abnormal, selecting a first target service server in the backup service server group based on a preset load balancing algorithm; and sending the network access request to the first target service server so as to process the network access request by the first target service server.
10. The apparatus according to claim 9, wherein the network access processing unit is further specifically configured to, if there are normal service servers in the main service server group, select a second target service server from the normal service servers based on a preset load balancing algorithm, so that the second target service server processes the network access request.
CN201811445868.7A 2018-11-29 2018-11-29 Network resource access method and device Active CN109302498B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811445868.7A CN109302498B (en) 2018-11-29 2018-11-29 Network resource access method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811445868.7A CN109302498B (en) 2018-11-29 2018-11-29 Network resource access method and device

Publications (2)

Publication Number Publication Date
CN109302498A CN109302498A (en) 2019-02-01
CN109302498B true CN109302498B (en) 2021-03-23

Family

ID=65141986

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811445868.7A Active CN109302498B (en) 2018-11-29 2018-11-29 Network resource access method and device

Country Status (1)

Country Link
CN (1) CN109302498B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109933432A (en) * 2019-03-19 2019-06-25 北京百度网讯科技有限公司 Method and apparatus for sending data
CN110012111B (en) * 2019-04-16 2022-04-15 昆山丘钛微电子科技股份有限公司 Data service cluster system and data processing method
CN111628958B (en) * 2019-07-12 2022-08-05 国铁吉讯科技有限公司 Network access method, device and system based on linear networking
CN111131264B (en) * 2019-12-26 2022-12-23 视联动力信息技术股份有限公司 Video networking communication method and first video networking client
CN111010454A (en) * 2019-12-31 2020-04-14 杭州天宽科技有限公司 Load balancing method realized by dynamic routing architecture
CN111131333B (en) * 2020-02-24 2022-10-28 广州虎牙科技有限公司 Business data pushing method and server cluster
CN111526038B (en) * 2020-03-26 2023-01-20 口碑(上海)信息技术有限公司 Service request distribution method and device, computer equipment and readable storage medium
CN112394960A (en) * 2020-11-23 2021-02-23 中国农业银行股份有限公司 Service flow control method and device, electronic equipment and computer storage medium
CN113242299A (en) * 2021-05-11 2021-08-10 鸬鹚科技(深圳)有限公司 Disaster recovery system, method, computer device and medium for multiple data centers
CN113347037B (en) * 2021-06-07 2022-07-12 中国建设银行股份有限公司 Data center access method and device
CN113489691B (en) * 2021-06-22 2023-06-13 腾讯科技(深圳)有限公司 Network access method, network access device, computer readable medium and electronic equipment
CN115150410A (en) * 2022-07-19 2022-10-04 京东科技信息技术有限公司 Multi-cluster access method and system
CN116708459A (en) * 2023-07-20 2023-09-05 广州东瑞科技有限公司 Service access automatic switching method, system, computer equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101815033A (en) * 2010-03-12 2010-08-25 成都市华为赛门铁克科技有限公司 Method, device and system for load balancing
CN102325192A (en) * 2011-09-30 2012-01-18 上海宝信软件股份有限公司 Cloud computing implementation method and system
US8315165B2 (en) * 2010-06-07 2012-11-20 Microsoft Corporation Survivable and resilient real time communication architecture
CN103379184A (en) * 2012-04-23 2013-10-30 深圳市腾讯计算机系统有限公司 Network service access method and system
CN103905531A (en) * 2014-03-14 2014-07-02 浪潮电子信息产业股份有限公司 Method for converting load balancing among nodes in cluster storage system
CN104202409A (en) * 2014-09-12 2014-12-10 成都卫士通信息产业股份有限公司 Balanced load SSL VPN (security socket layer, virtual private network) device cluster system and operating method thereof
CN105743993A (en) * 2016-03-31 2016-07-06 杭州数梦工场科技有限公司 Message processing method and system
CN106330610A (en) * 2016-08-29 2017-01-11 浪潮(北京)电子信息产业有限公司 Load balance processing system and method
CN108011929A (en) * 2017-11-14 2018-05-08 平安科技(深圳)有限公司 Data request processing method, apparatus, computer equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7930427B2 (en) * 2008-03-03 2011-04-19 Microsoft Corporation Client-side load balancing

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101815033A (en) * 2010-03-12 2010-08-25 成都市华为赛门铁克科技有限公司 Method, device and system for load balancing
US8315165B2 (en) * 2010-06-07 2012-11-20 Microsoft Corporation Survivable and resilient real time communication architecture
CN102325192A (en) * 2011-09-30 2012-01-18 上海宝信软件股份有限公司 Cloud computing implementation method and system
CN103379184A (en) * 2012-04-23 2013-10-30 深圳市腾讯计算机系统有限公司 Network service access method and system
CN103905531A (en) * 2014-03-14 2014-07-02 浪潮电子信息产业股份有限公司 Method for converting load balancing among nodes in cluster storage system
CN104202409A (en) * 2014-09-12 2014-12-10 成都卫士通信息产业股份有限公司 Balanced load SSL VPN (security socket layer, virtual private network) device cluster system and operating method thereof
CN105743993A (en) * 2016-03-31 2016-07-06 杭州数梦工场科技有限公司 Message processing method and system
CN106330610A (en) * 2016-08-29 2017-01-11 浪潮(北京)电子信息产业有限公司 Load balance processing system and method
CN108011929A (en) * 2017-11-14 2018-05-08 平安科技(深圳)有限公司 Data request processing method, apparatus, computer equipment and storage medium

Also Published As

Publication number Publication date
CN109302498A (en) 2019-02-01

Similar Documents

Publication Publication Date Title
CN109302498B (en) Network resource access method and device
EP3418877B1 (en) Data writing and reading method and apparatus, and cloud storage system
JP5889914B2 (en) State synchronization between load balancer components
CN103975571B (en) High Availabitity network file manager with automatic Load balance and property regulation
CN101815033B (en) Method, device and system for load balancing
US8635319B1 (en) Operational status of network nodes
CN109714239B (en) Management message issuing method, VNFM (virtual network management frequency) equipment and server
US8706856B2 (en) Service directory
CN107087031B (en) Storage resource load balancing method and device
CN111064804B (en) Network access method and device
WO2007056336A1 (en) System and method for writing data to a directory
US20230421487A1 (en) Reflection route for link local packet processing
US8825877B2 (en) Session persistence
CN112367257B (en) Route notification method and device
CN109873855A (en) A kind of resource acquiring method and system based on block chain network
US10944714B1 (en) Multi-factor domain name resolution
CN111399760A (en) NAS cluster metadata processing method and device, NAS gateway and medium
CN113315853B (en) Cloud protection node scheduling method, system and storage medium
US10044602B2 (en) Network failover and loop detection in hierarchical networks
JP2006236040A (en) Distributed server failure response program, server load distribution device and method
US20060288088A1 (en) Method and apparatus for managing a web cache system
CN113905092B (en) Method, device, terminal and storage medium for determining reusable agent queue
US20090106387A1 (en) Cidr based caching at application layer
WO2017007982A1 (en) Passive delegations and records
CN112199176A (en) Service processing method, device and related equipment

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
TR01 Transfer of patent right

Effective date of registration: 20210615

Address after: 310051 05, room A, 11 floor, Chung Cai mansion, 68 Tong Xing Road, Binjiang District, Hangzhou, Zhejiang.

Patentee after: Hangzhou Dip Information Technology Co.,Ltd.

Address before: 6 / F, Zhongcai building, 68 Tonghe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: Hangzhou DPtech Technologies Co.,Ltd.

TR01 Transfer of patent right